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-wizards-wizard-show.hbs

216 Zeilen
6,2 KiB
Handlebars

2021-04-12 16:19:53 +02:00
{{#if wizard}}
2020-03-31 10:30:53 +02:00
<div class="wizard-header large">
2020-04-01 07:03:26 +02:00
{{input
name="name"
2020-04-13 14:17:22 +02:00
value=wizard.name
2020-04-01 07:03:26 +02:00
placeholderKey="admin.wizard.name_placeholder"}}
2021-04-12 16:19:53 +02:00
2020-04-01 07:03:26 +02:00
<div class="wizard-url">
2020-04-13 14:17:22 +02:00
{{#if wizard.name}}
2020-04-11 08:22:12 +02:00
{{#if copiedUrl}}
{{d-button class="btn-hover pull-right" icon="copy" label="ip_lookup.copied"}}
{{else}}
{{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}}
{{/if}}
2021-04-12 16:19:53 +02:00
<a href={{wizardUrl}} target="_blank" rel="noopener noreferrer">{{wizardUrl}}</a>
2020-04-01 07:03:26 +02:00
{{/if}}
</div>
2020-03-31 10:30:53 +02:00
</div>
2020-04-13 14:17:22 +02:00
2021-04-12 16:19:53 +02:00
<div class="wizard-basic-details">
2020-03-29 09:49:33 +02:00
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.background"}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
{{input
name="background"
2020-04-13 14:17:22 +02:00
value=wizard.background
2020-04-01 07:03:26 +02:00
placeholderKey="admin.wizard.background_placeholder"
2020-04-12 01:27:16 +02:00
class="small"}}
2020-03-29 09:49:33 +02:00
</div>
</div>
2021-04-12 16:19:53 +02:00
2020-03-31 10:30:53 +02:00
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.theme_id"}}</label>
2020-03-31 10:30:53 +02:00
</div>
<div class="setting-value">
{{combo-box
2020-04-13 14:17:22 +02:00
content=themes
2021-04-12 16:19:53 +02:00
valueProperty="id"
2020-04-13 14:17:22 +02:00
value=wizard.theme_id
onChange=(action (mut wizard.theme_id))
2020-03-31 10:30:53 +02:00
options=(hash
2021-04-12 16:19:53 +02:00
none="admin.wizard.no_theme"
2020-03-31 10:30:53 +02:00
)}}
</div>
</div>
2020-03-30 08:16:03 +02:00
</div>
2020-04-13 14:17:22 +02:00
2020-03-30 08:16:03 +02:00
<div class="wizard-header medium">
2021-04-12 16:19:53 +02:00
{{i18n "admin.wizard.label"}}
2020-03-30 08:16:03 +02:00
</div>
2020-04-13 14:17:22 +02:00
2020-03-30 08:16:03 +02:00
<div class="wizard-settings">
2020-03-29 09:49:33 +02:00
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.required"}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.required}}
<span>{{i18n "admin.wizard.required_label"}}</span>
2020-03-29 09:49:33 +02:00
</div>
</div>
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.after_signup"}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.after_signup}}
<span>{{i18n "admin.wizard.after_signup_label"}}</span>
2020-03-29 09:49:33 +02:00
</div>
</div>
2021-04-12 16:19:53 +02:00
2020-03-29 09:49:33 +02:00
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.multiple_submissions"}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.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">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.prompt_completion"}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.prompt_completion}}
<span>{{i18n "admin.wizard.prompt_completion_label"}}</span>
2020-03-29 09:49:33 +02:00
</div>
</div>
2021-04-12 16:19:53 +02:00
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">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.after_time"}}</label>
2020-03-29 09:49:33 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.after_time}}
<span>{{i18n "admin.wizard.after_time_label"}}</span>
2020-03-31 10:30:53 +02:00
{{d-button
action="setNextSessionScheduled"
2020-03-31 10:30:53 +02:00
translatedLabel=nextSessionScheduledLabel
class="btn-after-time"
2021-04-12 16:19:53 +02:00
icon="far-calendar"}}
2020-03-29 09:49:33 +02:00
</div>
</div>
2021-04-12 16:19:53 +02:00
2020-03-29 09:49:33 +02:00
<div class="setting full field-mapper-setting">
<div class="setting-label">
2021-04-12 16:19:53 +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-04-13 14:17:22 +02:00
inputs=wizard.permitted
2020-03-29 09:49:33 +02:00
options=(hash
2021-04-12 16:19:53 +02:00
context="wizard"
inputTypes="assignment,validation"
groupSelection="output"
userFieldSelection="key"
textSelection="value"
inputConnector="and"
2020-03-29 09:49:33 +02:00
)}}
</div>
2017-10-06 04:59:02 +02:00
</div>
2021-04-12 16:19:53 +02:00
2020-04-13 14:17:22 +02:00
{{wizard-advanced-toggle showAdvanced=wizard.showAdvanced}}
2021-04-12 16:19:53 +02:00
2020-04-13 14:17:22 +02:00
{{#if wizard.showAdvanced}}
2020-04-02 07:21:57 +02:00
<div class="advanced-settings">
2021-04-12 16:19:53 +02:00
2020-04-02 07:21:57 +02:00
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.save_submissions"}}</label>
2020-04-02 07:21:57 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.save_submissions}}
<span>{{i18n "admin.wizard.save_submissions_label"}}</span>
2020-04-02 07:21:57 +02:00
</div>
</div>
2021-04-12 16:19:53 +02:00
2020-04-02 07:21:57 +02:00
<div class="setting">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
2020-04-02 07:21:57 +02:00
</div>
<div class="setting-value">
2021-04-12 16:19:53 +02:00
{{input type="checkbox" checked=wizard.restart_on_revisit}}
<span>{{i18n "admin.wizard.restart_on_revisit_label"}}</span>
2020-04-02 07:21:57 +02:00
</div>
</div>
2021-04-12 16:19:53 +02:00
<div class="setting">
<div class="setting-label">
<label>{{i18n "admin.wizard.resume_on_revisit"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.resume_on_revisit}}
<span>{{i18n "admin.wizard.resume_on_revisit_label"}}</span>
</div>
</div>
2020-04-02 07:21:57 +02:00
</div>
{{/if}}
2017-10-06 04:59:02 +02:00
</div>
2020-04-08 09:59:54 +02:00
{{wizard-links
2020-04-10 09:57:49 +02:00
itemType="step"
2020-04-08 09:59:54 +02:00
current=currentStep
2020-04-13 14:17:22 +02:00
items=wizard.steps}}
2017-10-07 04:27:38 +02:00
{{#if currentStep}}
2020-04-06 03:54:16 +02:00
{{wizard-custom-step
step=currentStep
2020-04-13 14:17:22 +02:00
wizard=wizard
2020-04-06 03:54:16 +02:00
currentField=currentField
2020-04-13 14:17:22 +02:00
wizardFields=wizardFields
fieldTypes=fieldTypes}}
2020-04-08 04:52:07 +02:00
{{/if}}
2020-04-13 14:17:22 +02:00
2020-04-08 09:59:54 +02:00
{{wizard-links
2020-04-10 09:57:49 +02:00
itemType="action"
2020-04-08 09:59:54 +02:00
current=currentAction
2020-04-13 14:17:22 +02:00
items=wizard.actions
2020-04-08 09:59:54 +02:00
generateLabels=true}}
2020-04-08 04:52:07 +02:00
{{#each wizard.actions as |action|}}
2020-04-08 04:52:07 +02:00
{{wizard-custom-action
action=action
2020-04-20 11:41:13 +02:00
currentActionId=currentAction.id
2020-04-13 14:17:22 +02:00
wizard=wizard
2020-04-22 15:03:18 +02:00
apis=apis
removeAction="removeAction"
2020-04-06 03:54:16 +02:00
wizardFields=wizardFields}}
2020-04-20 11:41:13 +02:00
{{/each}}
2017-09-23 04:34:07 +02:00
2021-04-12 16:19:53 +02:00
<div class="admin-wizard-buttons">
<button {{action "save"}} disabled={{disableSave}} class="btn btn-primary" type="button">
{{i18n "admin.wizard.save"}}
2020-03-29 09:49:33 +02:00
</button>
2021-04-12 16:19:53 +02:00
2020-04-13 14:17:22 +02:00
{{#unless creating}}
2021-04-12 16:19:53 +02:00
<button {{action "remove"}} class="btn btn-danger remove" type="button">
{{d-icon "far-trash-alt"}}{{i18n "admin.wizard.remove"}}
2020-03-29 09:49:33 +02:00
</button>
2017-09-23 04:34:07 +02:00
{{/unless}}
2021-04-12 16:19:53 +02:00
{{conditional-loading-spinner condition=saving size="small"}}
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>
2020-04-13 14:17:22 +02:00
{{/if}}