41 lines
1.3 KiB
Handlebars
41 lines
1.3 KiB
Handlebars
<form onsubmit={{action "createOrUpdate" "create"}}>
|
|
<div class="box is-sideless is-fullwidth is-marginless">
|
|
{{message-error model=model}}
|
|
<NamespaceReminder @mode={{mode}} @noun="AWS role" />
|
|
{{#if (gt model.credentialTypes.length 1)}}
|
|
<AlertBanner
|
|
@type="warning"
|
|
@message="This role has more than one credential_type, currently: {{join ', ' model.credentialTypes}}.
|
|
Multiple credential types is deprecated and you must choose one in order to save this role."
|
|
/>
|
|
{{/if}}
|
|
{{#each (if (eq mode 'edit') (drop 1 (or model.fields (array))) model.fields) as |attr|}}
|
|
{{form-field data-test-field attr=attr model=model}}
|
|
{{/each}}
|
|
</div>
|
|
|
|
<div class="field is-grouped-split box is-fullwidth is-bottomless">
|
|
<div class="control">
|
|
<button
|
|
type="submit"
|
|
disabled={{buttonDisabled}}
|
|
class="button is-primary"
|
|
data-test-role-aws-create=true
|
|
>
|
|
{{#if (eq mode 'create')}}
|
|
Create role
|
|
{{else if (eq mode 'edit')}}
|
|
Save
|
|
{{/if}}
|
|
</button>
|
|
{{#secret-link
|
|
mode=(if (eq mode "create") "list" "show")
|
|
class="button"
|
|
secret=model.id
|
|
}}
|
|
Cancel
|
|
{{/secret-link}}
|
|
</div>
|
|
</div>
|
|
</form>
|