<form>
  {{#if isCharacter}}

    <div class="hp-field form-group">
      <input type="number" name="hp.max" value="{{source.max}}"
        placeholder="{{hp.max}}" data-tooltip="DND5E.HitPointsOverride">
    </div>

    <div class="form-group">
      <label>{{localize "DND5E.HitPointsBonusLevel"}}</label>
      <input type="text" name="hp.bonuses.level" value="{{hp.bonuses.level}}">
    </div>
    <div class="form-group">
      <label>{{localize "DND5E.HitPointsBonusOverall"}}</label>
      <input type="text" name="hp.bonuses.overall" value="{{hp.bonuses.overall}}">
    </div>

  {{else}}

    <div class="hp-field form-group">
      <input type="number" name="hp.max" value="{{hp.max}}" data-tooltip="DND5E.HitPointsMax">
    </div>

    <div class="form-group">
      <label>{{localize "DND5E.HPFormula"}}</label>
      <div class="form-fields">
        <input type="text" name="hp.formula" value="{{hp.formula}}">
        <button class="roll-hit-points"><i class="fas fa-dice"></i> {{localize "DND5E.Roll"}}</button>
      </div>
    </div>

  {{/if}}

  <button type="submit">
    <i class="far fa-save"></i> {{localize "Save"}}
  </button>
</form>
