1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/templates/components/wizard-custom-field.hbs
Angus McLeod a43f4b1344 various
2017-10-07 10:27:38 +08:00

60 Zeilen
1,6 KiB
Handlebars

<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.translation'}}</h3>
</div>
<div class="setting-value">
{{input name="translation_key" value=field.translation_key placeholderKey="admin.wizard.field.translation_placeholder"}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.label'}}</h3>
</div>
<div class="setting-value">
{{input name="label" value=field.label}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.description'}}</h3>
</div>
<div class="setting-value">
{{textarea name="description" value=field.description}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.type'}}</h3>
</div>
<div class="setting-value">
{{combo-box value=field.type content=types}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<h3>{{i18n 'admin.wizard.field.required'}}</h3>
</div>
<div class="setting-value">
{{input type='checkbox' checked=field.required}}
<span>{{i18n 'admin.wizard.field.required_label'}}</span>
</div>
</div>
{{#if isDropdown}}
<div class="wizard-dropdown-choices">
<div class="wizard-header small">
{{i18n 'admin.wizard.field.choices_label'}}
</div>
{{#each dropdownChoices as |c|}}
<span class='wizard-dropdown-choice'>
{{input type='text' value=c.label}}
</span>
{{d-button action='removeChoice' actionParam=c icon='times'}}
{{/each}}
{{d-button action='addChoice' label='admin.wizard.add' icon='plus'}}
</div>
{{/if}}