0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 12:22:54 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs
Angus McLeod 9f40821db0 Various
2017-10-06 10:59:02 +08:00

51 Zeilen
1,3 KiB
Handlebars

<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}}