70 lines
2.0 KiB
Handlebars
70 lines
2.0 KiB
Handlebars
{{#if @model.isOIDC}}
|
|
<Rose::Dropdown
|
|
@text='{{concat
|
|
(t 'resources.auth-method.actions.change-state')
|
|
' : '
|
|
(t (concat 'states.auth-method.oidc.states.' @model.attributes.state))
|
|
}}'
|
|
@dropdownRight={{true}}
|
|
as |dropdown|
|
|
>
|
|
<dropdown.section @title={{t 'resources.auth-method.actions.change-state'}}>
|
|
<Rose::Form as |form|>
|
|
<form.radioGroup
|
|
@name='theme'
|
|
@selectedValue={{@model.attributes.state}}
|
|
@changed={{route-action 'changeState'}}
|
|
as |radioGroup|
|
|
>
|
|
{{#each @model.STATES_ENUM as |state|}}
|
|
<dropdown.item>
|
|
<radioGroup.radio
|
|
@label={{t (concat 'states.auth-method.oidc.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|
|
|
>
|
|
{{#if (feature-flag 'primary-auth-method')}}
|
|
{{#unless @model.isPrimary}}
|
|
<dropdown.button
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'makePrimary' @model)}}
|
|
>
|
|
{{t 'resources.auth-method.actions.make-primary'}}
|
|
</dropdown.button>
|
|
{{/unless}}
|
|
{{#if @model.isPrimary}}
|
|
<dropdown.button
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'removeAsPrimary' @model)}}
|
|
>
|
|
{{t 'resources.auth-method.actions.remove-as-primary'}}
|
|
</dropdown.button>
|
|
{{/if}}
|
|
{{/if}}
|
|
<dropdown.link
|
|
@route='scopes.scope.auth-methods.auth-method.accounts.new'
|
|
@model={{@model}}
|
|
>
|
|
{{t 'resources.account.actions.create'}}
|
|
</dropdown.link>
|
|
<dropdown.separator />
|
|
<dropdown.button
|
|
@style='danger'
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'delete' @model)}}
|
|
>
|
|
{{t 'resources.auth-method.actions.delete'}}
|
|
</dropdown.button>
|
|
</Rose::Dropdown> |