open-vault/ui/app/templates/partials/tools/rewrap.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

65 lines
1.6 KiB
Handlebars

<PageHeader as |p|>
<p.levelLeft>
<h1 class="title is-3">
Rewrap Token
</h1>
</p.levelLeft>
</PageHeader>
{{#if rewrap_token}}
<div class="box is-sideless is-fullwidth is-marginless">
<div class="field">
<label for="wrap-info" class="is-label">Rewrapped token</label>
<div class="control">
{{textarea
value=rewrap_token
readonly=true
class="textarea"
id="wrap-info"
name="wrap-info"
data-test-tools-input="rewrapped-token"
}}
</div>
</div>
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">
<div class="control">
{{#copy-button
clipboardText=rewrap_token
class="button is-primary"
buttonType="button"
success=(action (set-flash-message 'Token copied!'))
}}
Copy
{{/copy-button}}
</div>
<div class="control">
<button {{action 'onClear'}} type="button" class="button">
Back
</button>
</div>
</div>
{{else}}
<div class="box is-sideless is-fullwidth is-marginless">
<div class="field">
<label for="token" class="is-label">Wrapping token</label>
<div class="control">
{{input
value=token
class="input"
id="token"
name="token"
data-test-tools-input="wrapping-token"
}}
</div>
</div>
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">
<div class="control">
<button type="submit" data-test-tools-submit="true" class="button is-primary">
Rewrap Token
</button>
</div>
</div>
{{/if}}