0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2025-02-02 19:37:01 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs

222 Zeilen
6,1 KiB
Handlebars

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