open-vault/ui/app/templates/components/mount-backend-form.hbs
Matthew Irish 924d1b4ddc
UI - code cleanup (#4699)
* use lazyCapabilities macro in models

* use expandAttributeMeta and fieldToAttrs everywhere

* add angle bracket component polyfill

* use PageHeader component throughout
2018-06-12 16:06:37 -05:00

31 lines
1.1 KiB
Handlebars

<PageHeader as |p|>
<p.levelLeft>
<h1 class="title is-3" data-test-mount-form-header=true>
{{#if (eq mountType "auth")}}
Enable an authentication method
{{else}}
Enable a secrets engine
{{/if}}
</h1>
</p.levelLeft>
</PageHeader>
<form {{action (perform mountBackend) on="submit"}}>
<div class="box is-sideless is-fullwidth is-marginless">
{{message-error model=mountModel}}
{{form-field-groups model=mountModel onChange=(action "onTypeChange") renderGroup="default"}}
{{#if mountModel.authConfigs.firstObject}}
{{form-field-groups model=mountModel.authConfigs.firstObject}}
{{/if}}
{{form-field-groups model=mountModel onChange=(action "onTypeChange") renderGroup="Method Options"}}
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">
<button type="submit" data-test-mount-submit=true class="button is-primary {{if mountBackend.isRunning 'loading'}}" disabled={{mountBackend.isRunning}}>
{{#if (eq mountType "auth")}}
Enable Method
{{else}}
Enable Engine
{{/if}}
</button>
</div>
</form>