{{#link-to "adminApiKeys.index" class="go-back"}} {{d-icon "arrow-left"}} {{i18n "admin.api.all_api_keys"}} {{/link-to}}
{{#if model.id}} {{#admin-form-row label="admin.api.key"}}
{{model.key}}
{{/admin-form-row}} {{#admin-form-row}} {{i18n "admin.api.not_shown_again"}} {{/admin-form-row}} {{#admin-form-row}} {{d-button icon="angle-right" label="admin.api.continue" action=(action "continue") class="btn-primary"}} {{/admin-form-row}} {{else}} {{#admin-form-row label="admin.api.description"}} {{input value=model.description maxlength="255" placeholder=(i18n "admin.api.description_placeholder")}} {{/admin-form-row}} {{#admin-form-row label="admin.api.user_mode"}} {{combo-box content=userModes value=userMode onChange=(action "changeUserMode")}} {{/admin-form-row}} {{#if showUserSelector}} {{#admin-form-row label="admin.api.user"}} {{email-group-user-chooser value=model.username onChange=(action "updateUsername") options=(hash maximum=1 filterPlaceholder="admin.api.user_placeholder" ) }} {{/admin-form-row}} {{/if}} {{#admin-form-row label="admin.api.scope_mode"}} {{combo-box content=scopeModes value=scopeMode onChange=(action "changeScopeMode")}} {{#if (eq scopeMode "read_only")}}

{{i18n "admin.api.scopes.descriptions.global.read"}}

{{else if (eq scopeMode "global")}}

{{i18n "admin.api.scopes.global_description"}}

{{/if}} {{/admin-form-row}} {{#if (eq scopeMode "granular")}}

{{i18n "admin.api.scopes.title"}}

{{i18n "admin.api.scopes.description"}}

{{#each-in scopes as |resource actions|}} {{#each actions as |act|}} {{/each}} {{/each-in}}
{{i18n "admin.api.scopes.allowed_urls"}} {{i18n "admin.api.scopes.optional_allowed_parameters"}}
{{resource}}
{{input type="checkbox" checked=act.selected}}
{{act.name}}
{{d-icon "question-circle"}}
{{d-button icon="link" action=(action "showURLs" act.urls) class="btn-info"}} {{#each act.params as |p|}} {{input maxlength="255" value=(get act p) placeholder=p}} {{/each}}
{{/if}} {{d-button icon="check" label="admin.api.save" action=(action "save") class="btn-primary" disabled=saveDisabled}} {{/if}}