UI: Fix cancel button on role transform form (#19135)
This commit is contained in:
parent
674d56d9c7
commit
54c863c747
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui (enterprise): Fix cancel button from transform engine role creation page
|
||||
```
|
|
@ -58,7 +58,11 @@
|
|||
<MessageError @model={{this.model}} />
|
||||
<NamespaceReminder @mode={{this.mode}} @noun="Transform role" />
|
||||
{{#each this.model.attrs as |attr|}}
|
||||
<FormField data-test-field @attr={{attr}} @model={{this.model}} />
|
||||
{{#if (and (eq this.mode "edit") attr.options.readOnly)}}
|
||||
<ReadonlyFormField @attr={{attr}} @value={{get this.model attr.name}} />
|
||||
{{else}}
|
||||
<FormField data-test-field @attr={{attr}} @model={{this.model}} />
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="field is-grouped-split box is-fullwidth is-bottomless">
|
||||
|
@ -75,13 +79,15 @@
|
|||
Save
|
||||
{{/if}}
|
||||
</button>
|
||||
<SecretLink
|
||||
@mode={{if (eq this.mode "create") "list" "show"}}
|
||||
class="button"
|
||||
@secret={{concat "role/" this.model.id}}
|
||||
>
|
||||
Cancel
|
||||
</SecretLink>
|
||||
{{#if (eq this.mode "create")}}
|
||||
<LinkTo @route={{"vault.cluster.secrets.backend.list-root"}} @query={{hash tab="role"}} class="button">
|
||||
Cancel
|
||||
</LinkTo>
|
||||
{{else if (eq this.mode "edit")}}
|
||||
<LinkTo @route="vault.cluster.secrets.backend.show" @model={{concat "role/" this.model.id}} class="button">
|
||||
Cancel
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue