Files
threshold-ui/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs
T

81 lines
2.2 KiB
Handlebars
Raw Normal View History

{{#if @model.isOIDC}}
<Rose::Dropdown
@text={{t (concat 'states.' @model.attributes.state)}}
@icon={{if
@model.isInactive
'disabled'
(if @model.isPrivate 'lock-closed-outline' 'check-circle-outline')
}}
@dropdownRight={{true}}
as |dropdown|
>
<dropdown.section @title={{t 'actions.change-state'}}>
<Rose::Form as |form|>
<form.radioGroup
@name='theme'
@selectedValue={{@model.attributes.state}}
@changed={{route-action 'changeState'}}
as |radioGroup|
>
{{#each this.oidcStates as |state|}}
<dropdown.item>
<radioGroup.radio
@label={{t (concat 'states.' state)}}
@value={{state}}
/>
</dropdown.item>
{{/each}}
</form.radioGroup>
</Rose::Form>
</dropdown.section>
</Rose::Dropdown>
{{/if}}
<Rose::Dropdown
@text='{{t 'actions.manage'}}'
@dropdownRight={{true}}
as |dropdown|
>
2021-03-26 12:47:49 -04:00
{{#if (feature-flag 'primary-auth-method')}}
2021-06-04 14:23:08 -04:00
{{#if @model.isPrimary}}
2021-03-26 12:47:49 -04:00
<dropdown.button
@disabled={{@model.canSave}}
2021-06-04 14:23:08 -04:00
{{on 'click' (route-action 'removeAsPrimary' @model)}}
2021-03-26 12:47:49 -04:00
>
2021-06-04 14:23:08 -04:00
{{t 'resources.auth-method.actions.remove-as-primary'}}
2021-03-26 12:47:49 -04:00
</dropdown.button>
2021-06-04 14:23:08 -04:00
{{else}}
2021-03-26 12:47:49 -04:00
<dropdown.button
@disabled={{@model.canSave}}
2021-06-04 14:23:08 -04:00
{{on 'click' (route-action 'makePrimary' @model)}}
2021-03-26 12:47:49 -04:00
>
2021-06-04 14:23:08 -04:00
{{t 'resources.auth-method.actions.make-primary'}}
2021-03-26 12:47:49 -04:00
</dropdown.button>
{{/if}}
{{/if}}
2021-06-04 14:23:08 -04:00
{{#if @model.isOIDC}}
{{#if (feature-flag 'oidc-account-crud')}}
<dropdown.link
@route='scopes.scope.auth-methods.auth-method.accounts.new'
@model={{@model}}
>
{{t 'resources.account.actions.create'}}
</dropdown.link>
{{/if}}
{{else}}
<dropdown.link
@route='scopes.scope.auth-methods.auth-method.accounts.new'
@model={{@model}}
>
{{t 'resources.account.actions.create'}}
</dropdown.link>
{{/if}}
2020-10-07 11:22:41 -04:00
<dropdown.separator />
2020-09-14 15:58:06 -04:00
<dropdown.button
@style='danger'
2020-09-14 15:58:06 -04:00
@disabled={{@model.canSave}}
{{on 'click' (route-action 'delete' @model)}}
2020-09-14 15:58:06 -04:00
>
{{t 'resources.auth-method.actions.delete'}}
2020-09-14 15:58:06 -04:00
</dropdown.button>
</Rose::Dropdown>