2020-10-20 07:40:23 +02:00
|
|
|
{{#if showInputs}}
|
|
|
|
<td>
|
2021-09-24 11:58:42 +02:00
|
|
|
{{wizard-subscription-selector
|
2020-10-20 07:40:23 +02:00
|
|
|
value=field.klass
|
2022-03-25 12:18:54 +01:00
|
|
|
feature="custom_field"
|
|
|
|
attribute="klass"
|
|
|
|
onChange=(action (mut field.klass))
|
|
|
|
options=(hash
|
|
|
|
none="admin.wizard.custom_field.klass.select"
|
|
|
|
)}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2021-09-24 11:58:42 +02:00
|
|
|
{{wizard-subscription-selector
|
2020-10-20 07:40:23 +02:00
|
|
|
value=field.type
|
2022-03-25 12:18:54 +01:00
|
|
|
feature="custom_field"
|
|
|
|
attribute="type"
|
|
|
|
onChange=(action (mut field.type))
|
|
|
|
options=(hash
|
|
|
|
none="admin.wizard.custom_field.type.select"
|
|
|
|
)}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
2021-06-08 13:39:49 +02:00
|
|
|
<td class="input">
|
|
|
|
{{input
|
|
|
|
value=field.name
|
|
|
|
placeholder=(i18n "admin.wizard.custom_field.name.select")}}
|
|
|
|
</td>
|
2020-11-10 01:56:11 +01:00
|
|
|
<td class="multi-select">
|
2020-10-20 07:40:23 +02:00
|
|
|
{{multi-select
|
|
|
|
value=field.serializers
|
|
|
|
content=serializerContent
|
2022-03-25 12:18:54 +01:00
|
|
|
onChange=(action (mut field.serializers))
|
|
|
|
options=(hash
|
|
|
|
none="admin.wizard.custom_field.serializers.select"
|
|
|
|
)}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
2020-11-10 01:56:11 +01:00
|
|
|
<td class="actions">
|
|
|
|
{{#if loading}}
|
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{else}}
|
|
|
|
{{#if saveIcon}}
|
|
|
|
{{d-icon saveIcon}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{d-button
|
2022-03-29 21:15:09 +02:00
|
|
|
action=(action "destroy")
|
2020-11-10 01:56:11 +01:00
|
|
|
icon="trash-alt"
|
|
|
|
class="destroy"
|
|
|
|
disabled=destroyDisabled}}
|
|
|
|
{{d-button
|
|
|
|
icon="save"
|
2022-03-29 21:15:09 +02:00
|
|
|
action=(action "save")
|
2020-11-10 01:56:11 +01:00
|
|
|
disabled=saveDisabled
|
|
|
|
class="save"}}
|
|
|
|
{{d-button
|
2022-03-29 21:15:09 +02:00
|
|
|
action=(action "close")
|
2020-11-10 01:56:11 +01:00
|
|
|
icon="times"
|
|
|
|
disabled=closeDisabled}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
|
|
|
{{else}}
|
|
|
|
<td><label>{{field.klass}}</label></td>
|
|
|
|
<td><label>{{field.type}}</label></td>
|
2020-11-10 01:56:11 +01:00
|
|
|
<td class="input"><label>{{field.name}}</label></td>
|
2021-06-08 13:39:49 +02:00
|
|
|
<td class="multi-select">
|
|
|
|
{{#if isExternal}}
|
|
|
|
—
|
|
|
|
{{else}}
|
|
|
|
{{#each field.serializers as |serializer|}}
|
|
|
|
<label>{{serializer}}</label>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
2021-06-08 13:39:49 +02:00
|
|
|
{{#if isExternal}}
|
|
|
|
<td class="external">
|
|
|
|
<label title={{i18n "admin.wizard.custom_field.external.title"}}>
|
|
|
|
{{i18n "admin.wizard.custom_field.external.label"}}
|
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
{{else}}
|
|
|
|
<td class="actions">
|
2022-03-29 21:15:09 +02:00
|
|
|
{{d-button action=(action "edit") icon="pencil-alt"}}
|
2021-06-08 13:39:49 +02:00
|
|
|
</td>
|
|
|
|
{{/if}}
|
2021-04-20 19:58:19 +02:00
|
|
|
{{/if}}
|