2022-10-19 21:28:43 +00:00
|
|
|
{{#let (camelize (concat "show" @group)) as |prop|}}
|
|
|
|
<ToggleButton
|
|
|
|
@isOpen={{get @model prop}}
|
|
|
|
@openLabel={{concat "Hide " @group}}
|
|
|
|
@closedLabel={{@group}}
|
|
|
|
@onClick={{fn (mut (get @model prop))}}
|
|
|
|
class="is-block"
|
|
|
|
data-test-toggle-group={{@group}}
|
|
|
|
/>
|
|
|
|
{{#if (get @model prop)}}
|
|
|
|
<div class="box is-tall is-marginless">
|
|
|
|
<FormFieldLabel
|
|
|
|
for="keyParametersLabel"
|
|
|
|
@subText="These are the parameters for generating or validating the certificate's key material."
|
|
|
|
/>
|
|
|
|
{{#each @model.fieldGroups as |fieldGroup|}}
|
|
|
|
{{#each-in fieldGroup as |group fields|}}
|
|
|
|
{{#if (eq group "Key parameters")}}
|
|
|
|
{{#each fields as |attr|}}
|
|
|
|
{{#if (eq attr.name "keyBits")}}
|
|
|
|
<div class="field">
|
|
|
|
<FormFieldLabel for={{attr.name}} @label={{attr.options.label}} />
|
|
|
|
<div class="control is-expanded">
|
|
|
|
<div class="select is-fullwidth">
|
|
|
|
<select
|
|
|
|
name={{attr.name}}
|
|
|
|
id={{attr.name}}
|
|
|
|
onchange={{this.onKeyBitsChange}}
|
|
|
|
data-test-input={{attr.name}}
|
|
|
|
>
|
|
|
|
{{#each this.keyBitOptions as |val|}}
|
|
|
|
<option selected={{eq (get @model this.valuePath) (or val.value val)}} value={{val}}>
|
|
|
|
{{val}}
|
|
|
|
</option>
|
|
|
|
{{/each}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="field">
|
|
|
|
<FormFieldLabel for={{attr.name}} @label={{attr.options.label}} />
|
|
|
|
<div class="control is-expanded">
|
|
|
|
<div class="select is-fullwidth">
|
|
|
|
<select
|
|
|
|
name={{attr.name}}
|
|
|
|
id={{attr.name}}
|
|
|
|
onchange={{fn this.onSignatureBitsOrKeyTypeChange attr.name}}
|
|
|
|
data-test-input={{attr.name}}
|
|
|
|
>
|
|
|
|
{{#each (path-or-array attr.options.possibleValues @model) as |val|}}
|
2022-10-25 19:58:11 +00:00
|
|
|
<option selected={{eq (get @model this.valuePath) (or val.value val)}} value={{val.value}}>
|
2022-10-19 21:28:43 +00:00
|
|
|
{{or val.displayName val}}
|
|
|
|
</option>
|
|
|
|
{{/each}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
|
|
|
{{/each-in}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|