2019-06-20 13:37:27 +00:00
|
|
|
<form onsubmit={{action "createOrUpdate" "create"}}>
|
2018-04-03 14:16:57 +00:00
|
|
|
<div class="box is-sideless is-fullwidth is-marginless">
|
2018-08-16 17:48:24 +00:00
|
|
|
{{message-error model=model}}
|
|
|
|
<NamespaceReminder @mode={{mode}} @noun="AWS role" />
|
2018-08-28 00:54:30 +00:00
|
|
|
{{#if (gt model.credentialTypes.length 1)}}
|
2018-10-31 22:08:25 +00:00
|
|
|
<AlertBanner
|
|
|
|
@type="warning"
|
2018-11-02 16:02:45 +00:00
|
|
|
@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."
|
2018-10-31 22:08:25 +00:00
|
|
|
/>
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/if}}
|
2018-08-28 00:54:30 +00:00
|
|
|
{{#each (if (eq mode 'edit') (drop 1 model.fields) model.fields) as |attr|}}
|
|
|
|
{{form-field data-test-field attr=attr model=model}}
|
|
|
|
{{/each}}
|
2018-04-03 14:16:57 +00:00
|
|
|
</div>
|
2018-08-28 00:54:30 +00:00
|
|
|
|
2018-04-03 14:16:57 +00:00
|
|
|
<div class="field is-grouped-split box is-fullwidth is-bottomless">
|
|
|
|
<div class="control">
|
2018-04-16 22:18:46 +00:00
|
|
|
<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>
|
2018-04-03 14:16:57 +00:00
|
|
|
{{#secret-link
|
|
|
|
mode=(if (eq mode "create") "list" "show")
|
|
|
|
class="button"
|
|
|
|
secret=model.id
|
|
|
|
}}
|
|
|
|
Cancel
|
|
|
|
{{/secret-link}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|