github.com/outbrain/consul@v1.4.5/ui-v2/app/templates/dc/acls/tokens/-form.hbs (about)

     1  <form>
     2  {{#if (not (token/is-legacy item))}}
     3    {{partial 'dc/acls/tokens/fieldsets'}}
     4  {{else}}
     5    {{partial 'dc/acls/tokens/fieldsets-legacy'}}
     6  {{/if}}
     7      {{!TODO: Make this into a slotted component}}
     8      <div>
     9  {{#if create }}
    10    {{! new tokens can be saved without you filling anything in, old tokens remain using isPristine }}
    11          <button type="submit" {{ action "create" item}} disabled={{if (or (and (token/is-legacy item) item.isPristine) item.isInvalid) 'disabled'}}>Save</button>
    12  {{ else }}
    13          <button type="submit" {{ action "update" item}} disabled={{if item.isInvalid 'disabled'}}>Save</button>
    14  {{/if}}
    15          <button type="reset" {{ action "cancel" item}}>Cancel</button>
    16  {{# if (and (not create) (not (token/is-anonymous item)) (not-eq item.AccessorID token.AccessorID) ) }}
    17          {{#confirmation-dialog message='Are you sure you want to delete this Token?'}}
    18              {{#block-slot 'action' as |confirm|}}
    19                  <button type="button" data-test-delete class="type-delete" {{action confirm 'delete' item}}>Delete</button>
    20              {{/block-slot}}
    21              {{#block-slot 'dialog' as |execute cancel message|}}
    22                {{delete-confirmation message=message execute=execute cancel=cancel}}
    23              {{/block-slot}}
    24          {{/confirmation-dialog}}
    25  {{/if}}
    26      </div>
    27  </form>