0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-27 03:20:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/custom-field-input.hbs

64 Zeilen
1,5 KiB
Handlebars

2020-10-20 07:40:23 +02:00
{{#if showInputs}}
<td>
{{combo-box
value=field.klass
content=klassContent
none="admin.wizard.custom_field.klass.select"
onChange=(action (mut field.klass))}}
</td>
<td>
{{combo-box
value=field.type
content=typeContent
none="admin.wizard.custom_field.type.select"
onChange=(action (mut field.type))}}
</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
none="admin.wizard.custom_field.serializers.select"
onChange=(action (mut field.serializers))}}
</td>
2020-11-10 01:56:11 +01:00
<td class="input">
2020-10-20 07:40:23 +02:00
{{input
value=field.name
2020-11-10 01:56:11 +01:00
placeholder=(i18n "admin.wizard.custom_field.name.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
action="destroy"
icon="trash-alt"
class="destroy"
disabled=destroyDisabled}}
{{d-button
icon="save"
action="save"
disabled=saveDisabled
class="save"}}
{{d-button
action="close"
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="multi-select">
2020-10-20 07:40:23 +02:00
{{#each field.serializers as |serializer|}}
<label>{{serializer}}</label>
{{/each}}
</td>
2020-11-10 01:56:11 +01:00
<td class="input"><label>{{field.name}}</label></td>
<td class="actions">
2020-10-20 07:40:23 +02:00
{{d-button action="edit" icon="pencil-alt"}}
</td>
{{/if}}