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

115 Zeilen
3,4 KiB
Handlebars

2017-10-07 04:27:38 +02:00
<div class="setting">
<div class="setting-label">
2017-10-13 15:02:34 +02:00
<h3>{{i18n 'admin.wizard.id'}}</h3>
2017-10-07 04:27:38 +02:00
</div>
<div class="setting-value">
2017-10-17 15:17:53 +02:00
{{input name="id" value=field.id placeholderKey="admin.wizard.id_placeholder" disabled=disableId}}
2017-10-13 15:02:34 +02:00
</div>
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.key'}}</h3>
</div>
<div class="setting-value">
{{input name="key" value=field.key placeholderKey="admin.wizard.key_placeholder"}}
2017-10-07 04:27:38 +02:00
</div>
</div>
2017-10-06 04:59:02 +02:00
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.label'}}</h3>
2017-09-23 04:34:07 +02:00
</div>
2017-10-06 04:59:02 +02:00
<div class="setting-value">
2017-10-13 15:02:34 +02:00
{{input name="label" value=field.label placeholder=(i18n "admin.wizard.custom_text_placeholder")}}
2017-09-23 04:34:07 +02:00
</div>
2017-10-06 04:59:02 +02:00
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.description'}}</h3>
</div>
<div class="setting-value">
2017-10-13 15:02:34 +02:00
{{textarea name="description" value=field.description placeholder=(i18n "admin.wizard.custom_text_placeholder")}}
2017-10-06 04:59:02 +02:00
</div>
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.image'}}</h3>
</div>
<div class="setting-value">
{{input name="image" value=field.image placeholderKey="admin.wizard.field.image_placeholder"}}
</div>
</div>
2017-10-06 04:59:02 +02:00
<div class="setting">
<div class="setting-label">
2017-10-13 15:02:34 +02:00
<h3>{{i18n 'admin.wizard.type'}}</h3>
2017-10-06 04:59:02 +02:00
</div>
<div class="setting-value">
2017-11-23 10:02:25 +01:00
{{combo-box value=field.type content=types none="admin.wizard.field.type"}}
2017-09-23 04:34:07 +02:00
</div>
2017-10-06 04:59:02 +02:00
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.required'}}</h3>
</div>
<div class="setting-value">
2017-09-23 04:34:07 +02:00
{{input type='checkbox' checked=field.required}}
2017-10-06 04:59:02 +02:00
<span>{{i18n 'admin.wizard.field.required_label'}}</span>
2017-09-23 04:34:07 +02:00
</div>
</div>
2017-10-06 04:59:02 +02:00
2017-10-13 15:02:34 +02:00
{{#if isInput}}
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.min_length'}}</h3>
</div>
<div class="setting-value">
{{input type="number" name="min_length" value=field.min_length placeholder=(i18n 'admin.wizard.field.min_length_placeholder')}}
</div>
</div>
{{/if}}
2017-10-06 04:59:02 +02:00
{{#if isDropdown}}
<div class="wizard-dropdown-choices">
2017-10-30 07:24:51 +01:00
<div class="wizard-header small underline">
2017-10-06 04:59:02 +02:00
{{i18n 'admin.wizard.field.choices_label'}}
</div>
2017-10-30 07:24:51 +01:00
2017-11-08 09:52:50 +01:00
{{combo-box value=field.choices_type content=choicesTypes none="admin.wizard.field.choices_type"}}
2017-10-30 07:24:51 +01:00
{{#if choicesTranslation}}
2017-10-13 15:02:34 +02:00
<div class="wizard-header small">
{{i18n 'admin.wizard.field.choices_translation'}}
</div>
2017-10-30 07:24:51 +01:00
{{input name="key" value=field.choices_key placeholderKey="admin.wizard.key_placeholder"}}
{{/if}}
{{#if choicesPreset}}
2017-10-13 15:02:34 +02:00
<div class="wizard-header small">
{{i18n 'admin.wizard.field.choices_preset.label'}}
</div>
2017-10-19 04:17:36 +02:00
{{combo-box value=field.choices_preset content=presetChoices none='admin.wizard.none'}}
2017-10-30 07:24:51 +01:00
<div class="wizard-header small">
{{i18n 'admin.wizard.field.choices_preset.filter'}}
</div>
2017-10-17 15:17:53 +02:00
{{wizard-custom-input inputs=field.choices_filters}}
2017-10-30 07:24:51 +01:00
{{/if}}
{{#if choicesCustom}}
2017-10-13 15:02:34 +02:00
<div class="wizard-header small">
{{i18n 'admin.wizard.field.choices_custom'}}
</div>
2017-10-17 15:17:53 +02:00
{{wizard-custom-input inputs=field.choices}}
2017-10-30 07:24:51 +01:00
{{/if}}
2017-11-09 03:50:48 +01:00
<div class="wizard-header small">
{{i18n 'admin.wizard.field.dropdown_none'}}
</div>
{{input name="dropdown_none" value=field.dropdown_none placeholder=(i18n 'admin.wizard.field.dropdown_none_placeholder')}}
2017-10-06 04:59:02 +02:00
</div>
{{/if}}