2018-10-06 03:05:53 +00:00
|
|
|
<form class="{{if showAdvancedMode 'advanced-edit' 'simple-edit'}}" onsubmit={{action "createOrUpdateKey" "create"}}>
|
2018-04-03 14:16:57 +00:00
|
|
|
<div class="field box is-fullwidth is-sideless is-marginless">
|
2018-08-16 17:48:24 +00:00
|
|
|
<NamespaceReminder @mode="create" @noun="secret" />
|
2018-10-06 03:05:53 +00:00
|
|
|
<MessageError @model={{model}} @errorMessage={{error}} />
|
2018-10-17 02:42:29 +00:00
|
|
|
<label class="is-label" for="kv-key">Path for this secret</label>
|
2018-10-06 03:05:53 +00:00
|
|
|
<p class="control is-expanded">
|
2018-10-17 02:42:29 +00:00
|
|
|
{{input
|
|
|
|
autocomplete="off"
|
2019-05-16 14:54:11 +00:00
|
|
|
spellcheck="false"
|
2018-10-17 02:42:29 +00:00
|
|
|
data-test-secret-path="true"
|
|
|
|
id="kv-key"
|
|
|
|
class="input"
|
|
|
|
value=(get modelForData modelForData.pathAttr)
|
|
|
|
}}
|
2018-10-06 03:05:53 +00:00
|
|
|
</p>
|
|
|
|
{{#if modelForData.isFolder}}
|
2018-04-03 14:16:57 +00:00
|
|
|
<p class="help is-danger">
|
|
|
|
The secret path may not end in <code>/</code>
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2018-10-09 04:22:29 +00:00
|
|
|
<SecretEditDisplay
|
|
|
|
@showAdvancedMode={{showAdvancedMode}}
|
|
|
|
@codemirrorString={{codemirrorString}}
|
|
|
|
@secretData={{secretData}}
|
2018-10-16 21:08:31 +00:00
|
|
|
@isV2={{isV2}}
|
|
|
|
@model={{model}}
|
|
|
|
@canEditV2Secret={{canEditV2Secret}}
|
2018-10-09 04:22:29 +00:00
|
|
|
@editActions={{hash
|
|
|
|
codemirrorUpdated=(action "codemirrorUpdated")
|
|
|
|
formatJSON=(action "formatJSON")
|
|
|
|
handleKeyDown=(action "handleKeyDown")
|
|
|
|
handleChange=(action "handleChange")
|
|
|
|
deleteRow=(action "deleteRow")
|
|
|
|
addRow=(action "addRow")
|
|
|
|
}}
|
|
|
|
/>
|
2018-04-03 14:16:57 +00:00
|
|
|
<div class="field is-grouped 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-secret-save=true
|
|
|
|
>
|
2018-04-03 14:16:57 +00:00
|
|
|
Save
|
2018-04-16 22:18:46 +00:00
|
|
|
</button>
|
2018-04-03 14:16:57 +00:00
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
{{#secret-link
|
|
|
|
mode="list"
|
2018-10-06 03:05:53 +00:00
|
|
|
secret=model.parentKey
|
2018-04-03 14:16:57 +00:00
|
|
|
class="button"
|
|
|
|
}}
|
|
|
|
Cancel
|
|
|
|
{{/secret-link}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|