UI: Fix cancel button on role transform form (#19135)

This commit is contained in:
Chelsea Shaw
2023-02-10 14:37:22 -06:00
committed by GitHub
parent d08de3e78e
commit 32a009f9ab
2 changed files with 17 additions and 8 deletions

3
changelog/19135.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
ui (enterprise): Fix cancel button from transform engine role creation page
```

View File

@@ -58,7 +58,11 @@
<MessageError @model={{this.model}} /> <MessageError @model={{this.model}} />
<NamespaceReminder @mode={{this.mode}} @noun="Transform role" /> <NamespaceReminder @mode={{this.mode}} @noun="Transform role" />
{{#each this.model.attrs as |attr|}} {{#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}} {{/each}}
</div> </div>
<div class="field is-grouped-split box is-fullwidth is-bottomless"> <div class="field is-grouped-split box is-fullwidth is-bottomless">
@@ -75,13 +79,15 @@
Save Save
{{/if}} {{/if}}
</button> </button>
<SecretLink {{#if (eq this.mode "create")}}
@mode={{if (eq this.mode "create") "list" "show"}} <LinkTo @route={{"vault.cluster.secrets.backend.list-root"}} @query={{hash tab="role"}} class="button">
class="button" Cancel
@secret={{concat "role/" this.model.id}} </LinkTo>
> {{else if (eq this.mode "edit")}}
Cancel <LinkTo @route="vault.cluster.secrets.backend.show" @model={{concat "role/" this.model.id}} class="button">
</SecretLink> Cancel
</LinkTo>
{{/if}}
</div> </div>
</div> </div>
</form> </form>