0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-14 05:52:52 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/admin-wizard.hbs

182 Zeilen
5,3 KiB
Handlebars

2017-10-06 04:59:02 +02:00
<div class="admin-wizard settings">
2020-03-31 10:30:53 +02:00
<div class="wizard-header large">
2020-04-01 07:03:26 +02:00
{{input
name="name"
value=model.name
placeholderKey="admin.wizard.name_placeholder"}}
2020-03-31 10:30:53 +02:00
2020-04-01 07:03:26 +02:00
<div class="wizard-url">
{{#if model.name}}
2020-03-30 01:53:28 +02:00
<a href="{{wizardUrl}}" target="_blank">{{wizardUrl}}</a>
2020-04-01 07:03:26 +02:00
{{/if}}
</div>
2020-03-31 10:30:53 +02:00
</div>
2020-03-30 01:53:28 +02:00
2020-04-01 07:03:26 +02:00
<div class="wizard-basic-details">
2020-03-29 09:49:33 +02:00
<div class="setting">
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.background'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
{{input
name="background"
value=model.background
2020-04-01 07:03:26 +02:00
placeholderKey="admin.wizard.background_placeholder"
class="medium"}}
2020-03-29 09:49:33 +02:00
</div>
</div>
2020-03-31 10:30:53 +02:00
<div class="setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.theme_id'}}</label>
</div>
<div class="setting-value">
{{combo-box
content=model.themes
valueProperty='id'
value=model.theme_id
onChange=(action (mut model.theme_id))
options=(hash
none='admin.wizard.no_theme'
)}}
</div>
</div>
2020-03-30 08:16:03 +02:00
</div>
<div class="wizard-header medium">
{{i18n 'admin.wizard.label'}}
</div>
<div class="wizard-settings">
2020-03-29 09:49:33 +02:00
<div class="setting">
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.required'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
{{input type='checkbox' checked=model.required}}
<span>{{i18n 'admin.wizard.required_label'}}</span>
</div>
</div>
<div class="setting">
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.after_signup'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
{{input type='checkbox' checked=model.after_signup}}
<span>{{i18n 'admin.wizard.after_signup_label'}}</span>
</div>
</div>
2020-03-31 10:30:53 +02:00
2020-03-29 09:49:33 +02:00
<div class="setting">
<div class="setting-label">
2020-04-02 07:21:57 +02:00
<label>{{i18n 'admin.wizard.multiple_submissions'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2020-04-02 07:21:57 +02:00
{{input type='checkbox' checked=model.multiple_submissions}}
<span>{{i18n 'admin.wizard.multiple_submissions_label'}}</span>
2020-03-29 09:49:33 +02:00
</div>
</div>
<div class="setting">
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.prompt_completion'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
{{input type='checkbox' checked=model.prompt_completion}}
<span>{{i18n 'admin.wizard.prompt_completion_label'}}</span>
</div>
</div>
2020-03-31 10:30:53 +02:00
<div class="setting full-inline">
2020-03-29 09:49:33 +02:00
<div class="setting-label">
2020-03-31 10:30:53 +02:00
<label>{{i18n 'admin.wizard.after_time'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2020-03-31 10:30:53 +02:00
{{input type='checkbox' checked=model.after_time}}
<span>{{i18n 'admin.wizard.after_time_label'}}</span>
{{d-button
action='setNextSessionScheduled'
translatedLabel=nextSessionScheduledLabel
class="btn-after-time"
icon='far-calendar'}}
2020-03-29 09:49:33 +02:00
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
2020-03-30 08:16:03 +02:00
<label>{{i18n 'admin.wizard.permitted'}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2020-04-01 07:03:26 +02:00
{{wizard-mapper
2020-03-30 08:16:03 +02:00
inputs=model.permitted
2020-03-29 09:49:33 +02:00
options=(hash
2020-04-06 03:54:16 +02:00
context='wizard'
2020-04-06 10:36:38 +02:00
inputTypes='assignment,validation'
2020-03-30 08:16:03 +02:00
groupSelection='output'
2020-04-06 10:36:38 +02:00
userFieldSelection='key'
textSelection='value'
inputConnector='and'
2020-03-29 09:49:33 +02:00
)}}
</div>
2017-10-06 04:59:02 +02:00
</div>
2020-04-02 07:21:57 +02:00
{{wizard-advanced-toggle showAdvanced=model.showAdvanced}}
{{#if model.showAdvanced}}
<div class="advanced-settings">
<div class="setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.save_submissions'}}</label>
</div>
<div class="setting-value">
{{input type='checkbox' checked=model.save_submissions}}
<span>{{i18n 'admin.wizard.save_submissions_label'}}</span>
</div>
</div>
<div class="setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.restart_on_revisit'}}</label>
</div>
<div class="setting-value">
{{input type='checkbox' checked=model.restart_on_revisit}}
<span>{{i18n 'admin.wizard.restart_on_revisit_label'}}</span>
</div>
</div>
</div>
{{/if}}
2017-10-06 04:59:02 +02:00
</div>
2017-10-17 09:18:53 +02:00
{{wizard-links type="step" current=currentStep items=model.steps}}
2020-03-29 09:49:33 +02:00
2017-10-07 04:27:38 +02:00
{{#if currentStep}}
2020-04-06 03:54:16 +02:00
{{wizard-custom-step
step=currentStep
wizard=model
currentField=currentField
currentAction=currentAction
wizardFields=wizardFields}}
2017-10-07 04:27:38 +02:00
{{/if}}
2017-09-23 04:34:07 +02:00
2020-04-01 07:03:26 +02:00
<div class='admin-wizard-buttons'>
2020-03-29 09:49:33 +02:00
<button {{action "save"}} disabled={{disableSave}} class='btn btn-primary'>
{{i18n 'admin.wizard.save'}}
</button>
2017-10-07 04:27:38 +02:00
{{#unless newWizard}}
2020-03-29 09:49:33 +02:00
<button {{action "remove"}} class='btn btn-danger remove'>
{{d-icon "far-trash-alt"}}{{i18n 'admin.wizard.remove'}}
</button>
2017-09-23 04:34:07 +02:00
{{/unless}}
2020-03-29 09:49:33 +02:00
2017-10-13 15:02:34 +02:00
{{conditional-loading-spinner condition=saving size='small'}}
2020-03-29 09:49:33 +02:00
2017-10-13 15:02:34 +02:00
{{#if error}}
<span class="error">{{d-icon "times"}}{{error}}</span>
{{/if}}
2017-09-23 04:34:07 +02:00
</div>
</div>