2024-11-22 16:45:50 +01:00
|
|
|
{{#if this.showInputs}}
|
2020-10-20 07:40:23 +02:00
|
|
|
<td>
|
2021-09-24 11:58:42 +02:00
|
|
|
{{wizard-subscription-selector
|
2024-11-22 16:45:50 +01:00
|
|
|
value=this.field.klass
|
2022-03-25 12:18:54 +01:00
|
|
|
feature="custom_field"
|
|
|
|
attribute="klass"
|
2024-11-22 16:45:50 +01:00
|
|
|
onChange=(action (mut this.field.klass))
|
2023-07-10 08:55:54 +02:00
|
|
|
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
|
2024-11-22 16:45:50 +01:00
|
|
|
value=this.field.type
|
2022-03-25 12:18:54 +01:00
|
|
|
feature="custom_field"
|
|
|
|
attribute="type"
|
2024-11-22 16:45:50 +01:00
|
|
|
onChange=(action (mut this.field.type))
|
2023-07-10 08:55:54 +02:00
|
|
|
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">
|
2023-04-03 04:28:06 +02:00
|
|
|
<Input
|
|
|
|
@value={{this.field.name}}
|
|
|
|
placeholder={{i18n "admin.wizard.custom_field.name.select"}}
|
|
|
|
/>
|
2021-06-08 13:39:49 +02:00
|
|
|
</td>
|
2020-11-10 01:56:11 +01:00
|
|
|
<td class="multi-select">
|
2020-10-20 07:40:23 +02:00
|
|
|
{{multi-select
|
2024-11-22 16:45:50 +01:00
|
|
|
value=this.field.serializers
|
|
|
|
content=this.serializerContent
|
|
|
|
onChange=(action (mut this.field.serializers))
|
2023-07-10 08:55:54 +02:00
|
|
|
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">
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#if this.loading}}
|
2020-11-10 01:56:11 +01:00
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{else}}
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#if this.saveIcon}}
|
|
|
|
{{d-icon this.saveIcon}}
|
2020-11-10 01:56:11 +01:00
|
|
|
{{/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"
|
2024-11-22 16:45:50 +01:00
|
|
|
disabled=this.destroyDisabled
|
2023-07-10 08:55:54 +02:00
|
|
|
}}
|
2020-11-10 01:56:11 +01:00
|
|
|
{{d-button
|
|
|
|
icon="save"
|
2022-03-29 21:15:09 +02:00
|
|
|
action=(action "save")
|
2024-11-22 16:45:50 +01:00
|
|
|
disabled=this.saveDisabled
|
2023-07-10 08:55:54 +02:00
|
|
|
class="save"
|
|
|
|
}}
|
2024-11-22 16:45:50 +01:00
|
|
|
{{d-button action=(action "close") icon="times" disabled=this.closeDisabled}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
|
|
|
{{else}}
|
2024-11-22 16:45:50 +01:00
|
|
|
<td><label>{{this.field.klass}}</label></td>
|
|
|
|
<td><label>{{this.field.type}}</label></td>
|
|
|
|
<td class="input"><label>{{this.field.name}}</label></td>
|
2021-06-08 13:39:49 +02:00
|
|
|
<td class="multi-select">
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#if this.isExternal}}
|
2021-06-08 13:39:49 +02:00
|
|
|
—
|
|
|
|
{{else}}
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#each this.field.serializers as |serializer|}}
|
2021-06-08 13:39:49 +02:00
|
|
|
<label>{{serializer}}</label>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
2020-10-20 07:40:23 +02:00
|
|
|
</td>
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#if this.isExternal}}
|
2021-06-08 13:39:49 +02:00
|
|
|
<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}}
|
2023-07-10 08:55:54 +02:00
|
|
|
{{/if}}
|