From a76cda0c0246c44519faa94e1edc25c809109b69 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Mon, 12 Apr 2021 19:49:53 +0530 Subject: [PATCH 1/4] fixed linting for all the hbs files --- .../admin-menu/wizards-nav-button.hbs | 2 +- .../top-notices/prompt-completion.hbs | 8 +- .../templates/admin-wizards-api-show.hbs | 118 ++--- .../discourse/templates/admin-wizards-api.hbs | 6 +- .../templates/admin-wizards-custom-fields.hbs | 32 +- .../templates/admin-wizards-logs.hbs | 10 +- .../templates/admin-wizards-manager.hbs | 28 +- .../admin-wizards-submissions-show.hbs | 38 +- .../templates/admin-wizards-submissions.hbs | 4 +- .../templates/admin-wizards-wizard-show.hbs | 126 ++--- .../templates/admin-wizards-wizard.hbs | 10 +- .../discourse/templates/admin-wizards.hbs | 12 +- .../components/wizard-advanced-toggle.hbs | 2 +- .../components/wizard-custom-action.hbs | 470 +++++++++--------- .../components/wizard-custom-field.hbs | 454 ++++++++--------- .../components/wizard-custom-step.hbs | 222 ++++----- .../templates/components/wizard-links.hbs | 8 +- .../components/wizard-mapper-input.hbs | 14 +- .../components/wizard-mapper-pair.hbs | 6 +- .../components/wizard-mapper-selector.hbs | 20 +- .../templates/components/wizard-mapper.hbs | 14 +- .../templates/components/wizard-message.hbs | 10 +- .../wizard-realtime-validations.hbs | 20 +- .../components/wizard-text-editor.hbs | 14 +- .../templates/components/field-validators.hbs | 26 +- .../components/wizard-composer-editor.hbs | 4 +- .../components/wizard-composer-hyperlink.hbs | 8 +- .../templates/components/wizard-editor.hbs | 14 +- .../components/wizard-field-checkbox.hbs | 2 +- .../components/wizard-field-composer.hbs | 12 +- .../components/wizard-field-dropdown.hbs | 2 +- .../components/wizard-field-group.hbs | 2 +- .../components/wizard-field-number.hbs | 2 +- .../components/wizard-field-upload.hbs | 12 +- .../templates/components/wizard-field-url.hbs | 2 +- .../templates/components/wizard-field.hbs | 58 +-- .../templates/components/wizard-no-access.hbs | 4 +- .../components/wizard-similar-topic.hbs | 2 +- .../components/wizard-similar-topics.hbs | 20 +- .../templates/components/wizard-step.hbs | 32 +- .../javascripts/wizard/templates/custom.hbs | 10 +- .../wizard/templates/custom.index.hbs | 30 +- .../wizard/templates/custom.step.hbs | 4 +- 43 files changed, 953 insertions(+), 941 deletions(-) diff --git a/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs b/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs index 5398e27d..f76722fc 100644 --- a/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs +++ b/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs @@ -1,3 +1,3 @@ {{#if currentUser.admin}} - {{nav-item route='adminWizards' label='admin.wizard.nav_label'}} + {{nav-item route="adminWizards" label="admin.wizard.nav_label"}} {{/if}} diff --git a/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs b/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs index 503ee113..70c0b7c4 100644 --- a/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs +++ b/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs @@ -1,7 +1,7 @@ {{#each site.complete_custom_wizard as |wizard|}} -
-
- {{i18n 'wizard.complete_custom' name=wizard.name}} + -{{/each}} \ No newline at end of file +{{/each}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs index 465e11aa..4d3def3d 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs @@ -1,5 +1,5 @@
-
+
{{#if updating}} {{loading-spinner size="small"}} {{else}} @@ -23,7 +23,7 @@
{{#if api.isNew}} - {{i18n 'admin.wizard.api.new'}} + {{i18n "admin.wizard.api.new"}} {{else}} {{api.title}} {{/if}} @@ -31,14 +31,14 @@ @@ -72,13 +72,13 @@
- {{i18n 'admin.wizard.api.auth.settings'}} + {{i18n "admin.wizard.api.auth.settings"}}
{{#if showRedirectUri}}
- +
{{api.redirectUri}}
@@ -87,14 +87,14 @@ {{/if}}
- +
{{combo-box - value=api.authType + value=api.authType content=authorizationTypes onChange=(action (mut api.authType)) options=(hash - none='admin.wizard.api.auth.type_none' + none="admin.wizard.api.auth.type_none" )}}
@@ -102,7 +102,7 @@ {{#if isOauth}} {{#if threeLeggedOauth}}
- +
{{input value=api.authUrl}}
@@ -110,51 +110,51 @@ {{/if}}
- +
{{input value=api.tokenUrl}}
- +
{{input value=api.clientId}}
- +
{{input value=api.clientSecret}}
- +
{{#each api.authParams as |param|}}
- {{input value=param.key placeholder=(i18n 'admin.wizard.key')}} - {{input value=param.value placeholder=(i18n 'admin.wizard.value')}} - {{d-button action=(action "removeParam") actionParam=param icon='times'}} + {{input value=param.key placeholder=(i18n "admin.wizard.key")}} + {{input value=param.value placeholder=(i18n "admin.wizard.value")}} + {{d-button action=(action "removeParam") actionParam=param icon="times"}}
{{/each}} - {{d-button label='admin.wizard.api.auth.params.new' icon='plus' action=(action "addParam")}} + {{d-button label="admin.wizard.api.auth.params.new" icon="plus" action=(action "addParam")}}
{{/if}} {{#if isBasicAuth}}
- +
{{input value=api.username}}
- +
{{input value=api.password}}
@@ -175,12 +175,12 @@
- {{i18n 'admin.wizard.api.status.label'}} + {{i18n "admin.wizard.api.status.label"}}
{{#if threeLeggedOauth}}
- +
{{api.code}}
@@ -188,7 +188,7 @@ {{/if}}
- +
{{api.accessToken}}
@@ -196,7 +196,7 @@ {{#if threeLeggedOauth}}
- +
{{api.refreshToken}}
@@ -204,14 +204,14 @@ {{/if}}
- +
{{api.tokenExpiresAt}}
- +
{{api.tokenRefreshAt}}
@@ -221,11 +221,11 @@
- {{i18n 'admin.wizard.api.endpoint.label'}} + {{i18n "admin.wizard.api.endpoint.label"}}
- {{d-button action=(action "addEndpoint") label='admin.wizard.api.endpoint.add' icon='plus'}} + {{d-button action=(action "addEndpoint") label="admin.wizard.api.endpoint.add" icon="plus"}} {{#if api.endpoints}}
@@ -236,14 +236,14 @@
{{input value=endpoint.name - placeholder=(i18n 'admin.wizard.api.endpoint.name')}} + placeholder=(i18n "admin.wizard.api.endpoint.name")}} {{input value=endpoint.url - placeholder=(i18n 'admin.wizard.api.endpoint.url') - class='endpoint-url'}} + placeholder=(i18n "admin.wizard.api.endpoint.url") + class="endpoint-url"}} {{d-button action=(action "removeEndpoint") actionParam=endpoint - icon='times' - class='remove-endpoint'}} + icon="times" + class="remove-endpoint"}}
{{combo-box @@ -278,33 +278,37 @@
- {{i18n 'admin.wizard.api.log.label'}} + {{i18n "admin.wizard.api.log.label"}} {{d-button action=(action "clearLogs") - icon='trash-alt' - class='clear-logs'}} + icon="trash-alt" + class="clear-logs"}}
- - - - - - {{#each api.log as |logentry|}} - - - - - - - - {{/each}} + + + + + + + + + {{#each api.log as |logentry|}} + + + + + + + + {{/each}} +
DatetimeUserStatusURLError
{{logentry.time}} - - {{logentry.status}}{{logentry.url}}{{logentry.error}}
DatetimeUserStatusURLError
{{logentry.time}} + + {{logentry.status}}{{logentry.url}}{{logentry.error}}
diff --git a/assets/javascripts/discourse/templates/admin-wizards-api.hbs b/assets/javascripts/discourse/templates/admin-wizards-api.hbs index 5f0c02ff..00d8ad60 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api.hbs @@ -2,11 +2,11 @@ {{combo-box value=apiName content=apiList - onChange=(route-action 'changeApi') + onChange=(route-action "changeApi") options=(hash - none='admin.wizard.api.select' + none="admin.wizard.api.select" )}} - + {{d-button action="createApi" label="admin.wizard.api.create" diff --git a/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs b/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs index 4633344b..10501498 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs @@ -1,6 +1,6 @@
-

{{i18n 'admin.wizard.custom_field.nav_label'}}

- +

{{i18n "admin.wizard.custom_field.nav_label"}}

+
{{d-button label="admin.wizard.custom_field.add" @@ -14,23 +14,27 @@ opts=messageOpts type=messageType url=documentationUrl - component='custom_fields'}} + component="custom_fields"}}
{{#if customFields}} - - {{#each fieldKeys as |key|}} - + + + {{#each fieldKeys as |key|}} + + {{/each}} + + + + + {{#each customFields as |field|}} + {{custom-field-input + field=field + removeField=(action "removeField") + saveField=(action "saveField")}} {{/each}} - - - {{#each customFields as |field|}} - {{custom-field-input - field=field - removeField=(action 'removeField') - saveField=(action 'saveField')}} - {{/each}} +
{{i18n (concat "admin.wizard.custom_field." key ".label")}}
{{i18n (concat "admin.wizard.custom_field." key ".label")}}
{{/if}}
diff --git a/assets/javascripts/discourse/templates/admin-wizards-logs.hbs b/assets/javascripts/discourse/templates/admin-wizards-logs.hbs index 28052fe2..f98623aa 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-logs.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-logs.hbs @@ -1,6 +1,6 @@
-

{{i18n 'admin.wizard.log.nav_label'}}

- +

{{i18n "admin.wizard.log.nav_label"}}

+ {{d-button label="refresh" icon="refresh" @@ -10,7 +10,7 @@ {{#load-more selector=".log-list tr" action=(action "loadMore") class="wizard-logs"}} {{#if noResults}} -

{{i18n 'search.no_results'}}

+

{{i18n "search.no_results"}}

{{else}} @@ -27,8 +27,8 @@ {{/each}} -
+ {{/if}} - + {{conditional-loading-spinner condition=refreshing}} {{/load-more}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-manager.hbs b/assets/javascripts/discourse/templates/admin-wizards-manager.hbs index 3eda71e2..cc26d808 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-manager.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-manager.hbs @@ -1,18 +1,18 @@
-

{{i18n 'admin.wizard.manager.title'}}

- +

{{i18n "admin.wizard.manager.title"}}

+
{{#if filename}} {{/if}} - + {{input - id='file-upload' + id="file-upload" type="file" accept="application/json" change=(action "setFile")}} @@ -45,15 +45,15 @@ opts=messageOpts items=messageItems loading=loading - component='manager'}} + component="manager"}}
- - - + + + @@ -65,16 +65,16 @@ {{/link-to}} {{/each}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs index 3b4cb401..6d1f255b 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs @@ -1,29 +1,33 @@ {{#if submissions}}
{{i18n 'admin.wizard.label'}}{{i18n 'admin.wizard.manager.export'}}{{i18n 'admin.wizard.manager.destroy'}}{{i18n "admin.wizard.label"}}{{i18n "admin.wizard.manager.export"}}{{i18n "admin.wizard.manager.destroy"}}
- {{input + {{input type="checkbox" class="export" - change=(action 'selectWizard')}} + change=(action "selectWizard")}} - {{input + {{input type="checkbox" class="destroy" - change=(action 'selectWizard')}} + change=(action "selectWizard")}}
- - {{#each fields as |f|}} - - {{/each}} - - {{#each submissions as |s|}} + - {{#each-in s as |k v|}} - - {{/each-in}} + {{#each fields as |f|}} + + {{/each}} - {{/each}} + + + {{#each submissions as |s|}} + + {{#each-in s as |k v|}} + + {{/each-in}} + + {{/each}} +
{{f}}
{{v}}{{f}}
{{v}}
{{/if}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs b/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs index ca0b835e..d843485a 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs @@ -2,9 +2,9 @@ {{combo-box value=wizardId content=wizardList - onChange=(route-action 'changeWizard') + onChange=(route-action "changeWizard") options=(hash - none='admin.wizard.select' + none="admin.wizard.select" )}}
diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs index 65cbc16e..7e5b0ee0 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs @@ -1,10 +1,10 @@ -{{#if wizard}} +{{#if wizard}}
{{input name="name" value=wizard.name placeholderKey="admin.wizard.name_placeholder"}} - +
{{#if wizard.name}} {{#if copiedUrl}} @@ -12,15 +12,15 @@ {{else}} {{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}} {{/if}} - {{wizardUrl}} + {{wizardUrl}} {{/if}}
-
+
- +
{{input @@ -30,127 +30,127 @@ class="small"}}
- +
- +
{{combo-box content=themes - valueProperty='id' + valueProperty="id" value=wizard.theme_id onChange=(action (mut wizard.theme_id)) options=(hash - none='admin.wizard.no_theme' + none="admin.wizard.no_theme" )}}
- {{i18n 'admin.wizard.label'}} + {{i18n "admin.wizard.label"}}
- +
- {{input type='checkbox' checked=wizard.required}} - {{i18n 'admin.wizard.required_label'}} + {{input type="checkbox" checked=wizard.required}} + {{i18n "admin.wizard.required_label"}}
- +
- {{input type='checkbox' checked=wizard.after_signup}} - {{i18n 'admin.wizard.after_signup_label'}} -
-
- -
-
- -
-
- {{input type='checkbox' checked=wizard.multiple_submissions}} - {{i18n 'admin.wizard.multiple_submissions_label'}} + {{input type="checkbox" checked=wizard.after_signup}} + {{i18n "admin.wizard.after_signup_label"}}
- +
- {{input type='checkbox' checked=wizard.prompt_completion}} - {{i18n 'admin.wizard.prompt_completion_label'}} + {{input type="checkbox" checked=wizard.multiple_submissions}} + {{i18n "admin.wizard.multiple_submissions_label"}}
- + +
+
+ +
+
+ {{input type="checkbox" checked=wizard.prompt_completion}} + {{i18n "admin.wizard.prompt_completion_label"}} +
+
+
- +
- {{input type='checkbox' checked=wizard.after_time}} - {{i18n 'admin.wizard.after_time_label'}} + {{input type="checkbox" checked=wizard.after_time}} + {{i18n "admin.wizard.after_time_label"}} {{d-button - action='setNextSessionScheduled' + action="setNextSessionScheduled" translatedLabel=nextSessionScheduledLabel class="btn-after-time" - icon='far-calendar'}} + icon="far-calendar"}}
- +
- +
{{wizard-mapper inputs=wizard.permitted options=(hash - context='wizard' - inputTypes='assignment,validation' - groupSelection='output' - userFieldSelection='key' - textSelection='value' - inputConnector='and' + context="wizard" + inputTypes="assignment,validation" + groupSelection="output" + userFieldSelection="key" + textSelection="value" + inputConnector="and" )}}
- + {{wizard-advanced-toggle showAdvanced=wizard.showAdvanced}} - + {{#if wizard.showAdvanced}}
- +
- +
- {{input type='checkbox' checked=wizard.save_submissions}} - {{i18n 'admin.wizard.save_submissions_label'}} + {{input type="checkbox" checked=wizard.save_submissions}} + {{i18n "admin.wizard.save_submissions_label"}}
- +
- +
- {{input type='checkbox' checked=wizard.restart_on_revisit}} - {{i18n 'admin.wizard.restart_on_revisit_label'}} + {{input type="checkbox" checked=wizard.restart_on_revisit}} + {{i18n "admin.wizard.restart_on_revisit_label"}}
- +
{{/if}}
@@ -185,19 +185,19 @@ wizardFields=wizardFields}} {{/each}} -
- - + {{#unless creating}} - {{/unless}} - - {{conditional-loading-spinner condition=saving size='small'}} - + + {{conditional-loading-spinner condition=saving size="small"}} + {{#if error}} {{d-icon "times"}}{{error}} {{/if}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs index 049184e2..081cd5f3 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs @@ -2,11 +2,11 @@ {{combo-box value=wizardListVal content=wizardList - onChange=(route-action 'changeWizard') + onChange=(route-action "changeWizard") options=(hash - none='admin.wizard.select' + none="admin.wizard.select" )}} - + {{d-button action="createWizard" label="admin.wizard.create" @@ -16,8 +16,8 @@ {{wizard-message key=messageKey url=messageUrl - component='wizard'}} + component="wizard"}}
{{outlet}} -
\ No newline at end of file +
diff --git a/assets/javascripts/discourse/templates/admin-wizards.hbs b/assets/javascripts/discourse/templates/admin-wizards.hbs index c616e668..bd575aae 100644 --- a/assets/javascripts/discourse/templates/admin-wizards.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards.hbs @@ -1,12 +1,12 @@ {{#admin-nav}} - {{nav-item route='adminWizardsWizard' label='admin.wizard.nav_label'}} - {{nav-item route='adminWizardsCustomFields' label='admin.wizard.custom_field.nav_label'}} - {{nav-item route='adminWizardsSubmissions' label='admin.wizard.submissions.nav_label'}} + {{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}} + {{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}} + {{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}} {{#if siteSettings.wizard_apis_enabled}} - {{nav-item route='adminWizardsApi' label='admin.wizard.api.nav_label'}} + {{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}} {{/if}} - {{nav-item route='adminWizardsLogs' label='admin.wizard.log.nav_label'}} - {{nav-item route='adminWizardsManager' label='admin.wizard.manager.nav_label'}} + {{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}} + {{nav-item route="adminWizardsManager" label="admin.wizard.manager.nav_label"}} {{/admin-nav}}
diff --git a/assets/javascripts/discourse/templates/components/wizard-advanced-toggle.hbs b/assets/javascripts/discourse/templates/components/wizard-advanced-toggle.hbs index e77e3a31..9f8563fc 100644 --- a/assets/javascripts/discourse/templates/components/wizard-advanced-toggle.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-advanced-toggle.hbs @@ -1,4 +1,4 @@ {{d-button action="toggleAdvanced" - label='admin.wizard.advanced' + label="admin.wizard.advanced" class=toggleClass}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index 265da2a3..121a797b 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -10,11 +10,11 @@
- +
{{combo-box value=action.type - content=actionTypes + content=actionType onChange=(action "changeType") options=(hash none="admin.wizard.select_type" @@ -26,7 +26,7 @@
- +
{{combo-box value=action.run_after @@ -38,23 +38,23 @@ {{wizard-message key=messageKey url=messageUrl - component='action'}} + component="action"}} {{#if basicTopicFields}}
- +
{{wizard-mapper inputs=action.title - property='title' - onUpdate=(action 'mappedFieldUpdated') + property="title" + onUpdate=(action "mappedFieldUpdated") options=(hash wizardFieldSelection=true - userFieldSelection='key,value' - context='action' + userFieldSelection="key,value" + context="action" )}}
@@ -63,21 +63,21 @@
- +
{{combo-box value=action.post - content=wizardFields - nameProperty='label' + content=wizardField + nameProperty="label" onChange=(action (mut action.post)) options=(hash - none='admin.wizard.selector.placeholder.wizard_field' + none="admin.wizard.selector.placeholder.wizard_field" isDisabled=showPostBuilder )}} - +
- {{input type='checkbox' checked=action.post_builder}} - {{i18n 'admin.wizard.action.post_builder.checkbox'}} + {{input type="checkbox" checked=action.post_builder}} + {{i18n "admin.wizard.action.post_builder.checkbox"}}
@@ -85,9 +85,9 @@ {{#if action.post_builder}}
- +
- +
{{wizard-text-editor value=action.post_template @@ -102,83 +102,83 @@
- +
{{wizard-mapper inputs=action.category - property='category' - onUpdate=(action 'mappedFieldUpdated') + property="category" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='key,value' + textSelection="key,value" wizardFieldSelection=true - userFieldSelection='key,value' - categorySelection='output' - wizardActionSelection='output' - outputDefaultSelection='category' - context='action' + userFieldSelection="key,value" + categorySelection="output" + wizardActionSelection="output" + outputDefaultSelection="category" + context="action" )}}
- +
- +
{{wizard-mapper - inputs=action.tags - property='tags' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.tag + property="tags" + onUpdate=(action "mappedFieldUpdated") options=(hash - tagSelection='output' - outputDefaultSelection='tag' - listSelection='output' + tagSelection="output" + outputDefaultSelection="tag" + listSelection="output" wizardFieldSelection=true - userFieldSelection='key,value' - context='action' + userFieldSelection="key,value" + context="action" )}}
- +
- +
{{wizard-mapper inputs=action.visible - property='visible' - onUpdate=(action 'mappedFieldUpdated') + property="visible" + onUpdate=(action "mappedFieldUpdated") options=(hash wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
{{/if}} -{{#if sendMessage}} +{{#if sendMessage}}
- +
{{wizard-mapper inputs=action.recipient - property='recipient' - onUpdate=(action 'mappedFieldUpdated') + property="recipient" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='value,output' + textSelection="value,output" wizardFieldSelection=true - userFieldSelection='key,value' - groupSelection='key,value' - userSelection='output' - outputDefaultSelection='user' - context='action' + userFieldSelection="key,value" + groupSelection="key,value" + userSelection="output" + outputDefaultSelection="user" + context="action" )}}
@@ -187,21 +187,21 @@ {{#if updateProfile}}
- +
- - {{wizard-mapper - inputs=action.profile_updates - property='profile_updates' - onUpdate=(action 'mappedFieldUpdated') + + {{wizard-mapper + inputs=action.profile_update + property="profile_updates" + onUpdate=(action "mappedFieldUpdated") options=(hash - inputTypes='association' - textSelection='value' - userFieldSelection='key' - wizardFieldSelection='value' - wizardActionSelection='value' - keyDefaultSelection='userField' - context='action' + inputTypes="association" + textSelection="value" + userFieldSelection="key" + wizardFieldSelection="value" + wizardActionSelection="value" + keyDefaultSelection="userField" + context="action" )}}
{{/if}} @@ -211,15 +211,15 @@
- +
{{combo-box value=action.api - content=availableApis + content=availableApi onChange=(action (mut action.api)) options=(hash isDisabled=action.custom_title_enabled - none='admin.wizard.action.send_to_api.select_an_api' + none="admin.wizard.action.send_to_api.select_an_api" )}}
@@ -228,15 +228,15 @@
- +
{{combo-box value=action.api_endpoint - content=availableEndpoints + content=availableEndpoint onChange=(action (mut action.api_endpoint)) options=(hash isDisabled=apiEmpty - none='admin.wizard.action.send_to_api.select_an_endpoint' + none="admin.wizard.action.send_to_api.select_an_endpoint" )}}
@@ -245,14 +245,14 @@
- +
{{wizard-text-editor value=action.api_body previewEnabled=false barEnabled=false - wizardFields=wizardFields - placeholder='admin.wizard.action.send_to_api.body_placeholder'}} + wizardFields=wizardField + placeholder="admin.wizard.action.send_to_api.body_placeholder"}}
{{/if}} @@ -262,20 +262,20 @@
- +
{{wizard-mapper inputs=action.group - property='group' - onUpdate=(action 'mappedFieldUpdated') + property="group" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='value,output' - wizardFieldSelection='key,value,assignment' - userFieldSelection='key,value,assignment' + textSelection="value,output" + wizardFieldSelection="key,value,assignment" + userFieldSelection="key,value,assignment" wizardActionSelection=true - groupSelection='value,output' - outputDefaultSelection='group' - context='action' + groupSelection="value,output" + outputDefaultSelection="group" + context="action" )}}
@@ -286,19 +286,19 @@
- +
{{wizard-mapper inputs=action.url - property='url' - onUpdate=(action 'mappedFieldUpdated') + property="url" + onUpdate=(action "mappedFieldUpdated") options=(hash - context='action' + context="action" wizardFieldSelection=true - userFieldSelection='key,value' - groupSelection='key,value' - categorySelection='key,value' - userSelection='key,value' + userFieldSelection="key,value" + groupSelection="key,value" + categorySelection="key,value" + userSelection="key,value" )}}
@@ -309,19 +309,19 @@
- +
{{wizard-mapper - inputs=action.categories - property='categories' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.categorie + property="categories" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='key,value' + textSelection="key,value" wizardFieldSelection=true wizardActionSelection=true - userFieldSelection='key,value' - categorySelection='output' - context='action' + userFieldSelection="key,value" + categorySelection="output" + context="action" )}}
@@ -334,12 +334,12 @@
{{wizard-mapper inputs=action.mute_remainder - property='mute_remainder' - onUpdate=(action 'mappedFieldUpdated') + property="mute_remainder" + onUpdate=(action "mappedFieldUpdated") options=(hash - context='action' + context="action" wizardFieldSelection=true - userFieldSelection='key,value' + userFieldSelection="key,value" )}}
@@ -352,15 +352,15 @@
{{combo-box value=action.notification_level - content=availableNotificationLevels + content=availableNotificationLevel onChange=(action (mut action.notification_level)) options=(hash isDisabled=action.custom_title_enabled - none='admin.wizard.action.watch_categories.select_a_notification_level' + none="admin.wizard.action.watch_categories.select_a_notification_level" )}}
- +
@@ -370,7 +370,7 @@ {{input type="checkbox" checked=action.wizard_user}}
- +
@@ -378,14 +378,14 @@
{{wizard-mapper - inputs=action.usernames - property='usernames' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.username + property="usernames" + onUpdate=(action "mappedFieldUpdated") options=(hash - context='action' + context="action" wizardFieldSelection=true - userFieldSelection='key,value' - userSelection='output' + userFieldSelection="key,value" + userSelection="output" )}}
@@ -396,17 +396,17 @@
- +
{{wizard-mapper inputs=action.name - property='name' - onUpdate=(action 'mappedFieldUpdated') + property="name" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -414,17 +414,17 @@
- +
{{wizard-mapper inputs=action.full_name - property='full_name' - onUpdate=(action 'mappedFieldUpdated') + property="full_name" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -432,17 +432,17 @@
- +
{{wizard-mapper inputs=action.title - property='title' - onUpdate=(action 'mappedFieldUpdated') + property="title" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -450,17 +450,17 @@
- +
{{wizard-mapper inputs=action.bio_raw - property='bio_raw' - onUpdate=(action 'mappedFieldUpdated') + property="bio_raw" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -468,18 +468,18 @@
- +
{{wizard-mapper - inputs=action.owner_usernames - property='owner_usernames' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.owner_username + property="owner_usernames" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - userSelection='output' - context='action' + userSelection="output" + context="action" )}}
@@ -487,18 +487,18 @@
- +
{{wizard-mapper - inputs=action.usernames - property='usernames' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.username + property="usernames" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - userSelection='output' - context='action' + userSelection="output" + context="action" )}}
@@ -506,17 +506,17 @@
- +
{{wizard-mapper inputs=action.grant_trust_level - property='grant_trust_level' - onUpdate=(action 'mappedFieldUpdated') + property="grant_trust_level" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -524,17 +524,17 @@
- +
{{wizard-mapper inputs=action.mentionable_level - property='mentionable_level' - onUpdate=(action 'mappedFieldUpdated') + property="mentionable_level" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -542,17 +542,17 @@
- +
{{wizard-mapper inputs=action.messageable_level - property='messageable_level' - onUpdate=(action 'mappedFieldUpdated') + property="messageable_level" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -560,35 +560,35 @@
- +
{{wizard-mapper inputs=action.visibility_level - property='visibility_level' - onUpdate=(action 'mappedFieldUpdated') + property="visibility_level" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
-
+
- +
{{wizard-mapper inputs=action.members_visibility_level - property='members_visibility_level' - onUpdate=(action 'mappedFieldUpdated') + property="members_visibility_level" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true userFieldSelection=true - context='action' + context="action" )}}
@@ -599,116 +599,116 @@
- +
{{wizard-mapper inputs=action.name - property='name' - onUpdate=(action 'mappedFieldUpdated') + property="name" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='key,value' + textSelection="key,value" wizardFieldSelection=true - userFieldSelection='key,value' - context='action' + userFieldSelection="key,value" + context="action" )}}
- +
- +
{{wizard-mapper inputs=action.slug - property='slug' - onUpdate=(action 'mappedFieldUpdated') + property="slug" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true - userFieldSelection='key,value' - context='action' + userFieldSelection="key,value" + context="action" )}}
- +
- +
{{wizard-mapper inputs=action.color - property='color' - onUpdate=(action 'mappedFieldUpdated') + property="color" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true - userFieldSelection='key,value' - context='action' + userFieldSelection="key,value" + context="action" )}}
- +
- +
{{wizard-mapper inputs=action.text_color - property='text_color' - onUpdate=(action 'mappedFieldUpdated') + property="text_color" + onUpdate=(action "mappedFieldUpdated") options=(hash textSelection=true wizardFieldSelection=true - userFieldSelection='key,value' - context='action' + userFieldSelection="key,value" + context="action" )}}
- +
- +
{{wizard-mapper inputs=action.parent_category_id - property='parent_category_id' - onUpdate=(action 'mappedFieldUpdated') + property="parent_category_id" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='key,value' + textSelection="key,value" wizardFieldSelection=true - userFieldSelection='key,value' - categorySelection='output' - context='action' + userFieldSelection="key,value" + categorySelection="output" + context="action" )}}
- +
- +
{{wizard-mapper - inputs=action.permissions - property='permissions' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.permission + property="permissions" + onUpdate=(action "mappedFieldUpdated") options=(hash - inputTypes='association' + inputTypes="association" textSelection=true wizardFieldSelection=true - wizardActionSelection='key' + wizardActionSelection="key" userFieldSelection=true - groupSelection='key' - context='action' + groupSelection="key" + context="action" )}}
@@ -719,89 +719,89 @@ {{#if action.showAdvanced}}
- + {{#if hasCustomFields}}
- +
- +
{{wizard-mapper - inputs=action.custom_fields - property='custom_fields' - onUpdate=(action 'mappedFieldUpdated') + inputs=action.custom_field + property="custom_fields" + onUpdate=(action "mappedFieldUpdated") options=(hash - inputTypes='association' - customFieldSelection='key' - wizardFieldSelection='value' - wizardActionSelection='value' - userFieldSelection='value' - keyPlaceholder='admin.wizard.action.custom_fields.key' - context='action' + inputTypes="association" + customFieldSelection="key" + wizardFieldSelection="value" + wizardActionSelection="value" + userFieldSelection="value" + keyPlaceholder="admin.wizard.action.custom_fields.key" + context="action" )}}
{{/if}} - + {{#if sendMessage}}
- +
- +
{{wizard-mapper inputs=action.required - property='required' - onUpdate=(action 'mappedFieldUpdated') + property="required" + onUpdate=(action "mappedFieldUpdated") options=(hash - textSelection='value' + textSelection="value" wizardFieldSelection=true userFieldSelection=true groupSelection=true - context='action' + context="action" )}}
{{/if}} - + {{#if showPostAdvanced}}
- +
- {{input type='checkbox' checked=action.skip_redirect}} - + {{input type="checkbox" checked=action.skip_redirect}} + - {{i18n 'admin.wizard.action.skip_redirect.description' type='topic'}} + {{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
- +
- +
- {{input type='checkbox' checked=action.suppress_notifications}} - + {{input type="checkbox" checked=action.suppress_notifications}} + - {{i18n 'admin.wizard.action.suppress_notifications.description' type='topic'}} + {{i18n "admin.wizard.action.suppress_notifications.description" type="topic"}}
{{/if}} - + {{#if routeTo}}
- +
{{input value=action.code}}
diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs index 62c5ea1e..de97d44b 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs @@ -1,227 +1,227 @@ -{{#if showUndo}} - {{d-button - action="undoChanges" - icon=undoIcon - label=undoKey - class="undo-changes"}} -{{/if}} - -
-
- -
-
- {{input name="label" value=field.label}} -
-
- -
-
- -
- -
- {{i18n 'admin.wizard.field.required_label'}} - {{input type='checkbox' checked=field.required}} -
-
- -
-
- -
-
- {{textarea name="description" value=field.description}} -
-
- -
-
- -
-
- {{image-uploader - imageUrl=field.image - onUploadDone=(action "imageUploadDone") - onUploadDeleted=(action "imageUploadDeleted") - type="wizard-step" - class="no-repeat contain-image"}} -
-
- -
-
- -
- -
- {{combo-box - value=field.type - content=fieldTypes - onChange=(action "changeType") - options=(hash - none="admin.wizard.select_type" - )}} -
-
- -{{wizard-message - key=messageKey - url=messageUrl - component='field'}} - -{{#if isTextType}} -
-
- -
- -
- {{input - type="number" - name="min_length" - value=field.min_length - class="small"}} -
-
- -
-
- -
- -
- {{input - type="number" - name="max_length" - value=field.max_length - class="small"}} -
-
- -
-
- -
- -
- {{i18n 'admin.wizard.field.char_counter_placeholder'}} - {{input - type="checkbox" - checked=field.char_counter}} -
-
-{{/if}} - -{{#if isUpload}} -
-
- -
- -
- {{input value=field.file_types class="medium"}} -
-
-{{/if}} - -{{#if showLimit}} -
-
- -
- -
- {{input type="number" value=field.limit class="small"}} -
-
-{{/if}} - -{{#if isDateTime}} -
-
- -
- -
- {{input value=field.format class="medium"}} - -
-
-{{/if}} - -{{#if showPrefill}} -
-
- -
- -
- {{wizard-mapper - inputs=field.prefill - property='prefill' - onUpdate=(action 'mappedFieldUpdated') - options=prefillOptions}} -
-
-{{/if}} - -{{#if showContent}} -
-
- -
- -
- {{wizard-mapper - inputs=field.content - property='content' - onUpdate=(action 'mappedFieldUpdated') - options=contentOptions}} -
-
-{{/if}} - -{{#if showAdvanced}} - {{wizard-advanced-toggle showAdvanced=field.showAdvanced}} - - {{#if field.showAdvanced}} -
- - {{#if isCategory}} -
-
- -
- -
- {{combo-box - value=field.property - content=categoryPropertyTypes - onChange=(action (mut field.property)) - options=(hash - none='admin.wizard.selector.placeholder.property' - )}} -
-
- {{/if}} - -
-
- -
-
- {{input - name="key" - value=field.key - class="medium" - placeholderKey="admin.wizard.translation_placeholder"}} -
-
- - {{#if validations}} - {{wizard-realtime-validations field=field validations=validations}} - {{/if}} -
- {{/if}} -{{/if}} +{{#if showUndo}} + {{d-button + action="undoChanges" + icon=undoIcon + label=undoKey + class="undo-changes"}} +{{/if}} + +
+
+ +
+
+ {{input name="label" value=field.label}} +
+
+ +
+
+ +
+ +
+ {{i18n "admin.wizard.field.required_label"}} + {{input type="checkbox" checked=field.required}} +
+
+ +
+
+ +
+
+ {{textarea name="description" value=field.description}} +
+
+ +
+
+ +
+
+ {{image-uploader + imageUrl=field.image + onUploadDone=(action "imageUploadDone") + onUploadDeleted=(action "imageUploadDeleted") + type="wizard-step" + class="no-repeat contain-image"}} +
+
+ +
+
+ +
+ +
+ {{combo-box + value=field.type + content=fieldTypes + onChange=(action "changeType") + options=(hash + none="admin.wizard.select_type" + )}} +
+
+ +{{wizard-message + key=messageKey + url=messageUrl + component="field"}} + +{{#if isTextType}} +
+
+ +
+ +
+ {{input + type="number" + name="min_length" + value=field.min_length + class="small"}} +
+
+ +
+
+ +
+ +
+ {{input + type="number" + name="max_length" + value=field.max_length + class="small"}} +
+
+ +
+
+ +
+ +
+ {{i18n "admin.wizard.field.char_counter_placeholder"}} + {{input + type="checkbox" + checked=field.char_counter}} +
+
+{{/if}} + +{{#if isUpload}} +
+
+ +
+ +
+ {{input value=field.file_types class="medium"}} +
+
+{{/if}} + +{{#if showLimit}} +
+
+ +
+ +
+ {{input type="number" value=field.limit class="small"}} +
+
+{{/if}} + +{{#if isDateTime}} +
+
+ +
+ +
+ {{input value=field.format class="medium"}} + +
+
+{{/if}} + +{{#if showPrefill}} +
+
+ +
+ +
+ {{wizard-mapper + inputs=field.prefill + property="prefill" + onUpdate=(action "mappedFieldUpdated") + options=prefillOptions}} +
+
+{{/if}} + +{{#if showContent}} +
+
+ +
+ +
+ {{wizard-mapper + inputs=field.content + property="content" + onUpdate=(action "mappedFieldUpdated") + options=contentOptions}} +
+
+{{/if}} + +{{#if showAdvanced}} + {{wizard-advanced-toggle showAdvanced=field.showAdvanced}} + + {{#if field.showAdvanced}} +
+ + {{#if isCategory}} +
+
+ +
+ +
+ {{combo-box + value=field.property + content=categoryPropertyTypes + onChange=(action (mut field.property)) + options=(hash + none="admin.wizard.selector.placeholder.property" + )}} +
+
+ {{/if}} + +
+
+ +
+
+ {{input + name="key" + value=field.key + class="medium" + placeholderKey="admin.wizard.translation_placeholder"}} +
+
+ + {{#if validations}} + {{wizard-realtime-validations field=field validations=validations}} + {{/if}} +
+ {{/if}} +{{/if}} diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs index 147b9a21..e468c9ab 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs @@ -1,112 +1,112 @@ -
-
- -
-
- {{input - name="title" - value=step.title}} -
-
- -
-
- -
-
- {{image-uploader - imageUrl=step.banner - onUploadDone=(action "bannerUploadDone") - onUploadDeleted=(action "bannerUploadDeleted") - type="wizard-banner" - class="no-repeat contain-image"}} -
-
- -
-
- -
-
- {{wizard-text-editor - value=step.raw_description}} -
-
- -{{wizard-advanced-toggle showAdvanced=step.showAdvanced}} - -{{#if step.showAdvanced}} -
- -
-
- -
-
- {{wizard-mapper - inputs=step.required_data - options=(hash - inputTypes='validation' - inputConnector='and' - wizardFieldSelection='value' - userFieldSelection='value' - keyPlaceholder="admin.wizard.submission_key" - context='step' - )}} - {{#if step.required_data}} -
-
- {{i18n 'admin.wizard.step.required_data.not_permitted_message'}} -
- {{input value=step.required_data_message}} -
- {{/if}} -
-
- -
-
- -
-
- {{wizard-mapper - inputs=step.permitted_params - options=(hash - pairConnector='set' - inputTypes='association' - keyPlaceholder='admin.wizard.param_key' - valuePlaceholder='admin.wizard.submission_key' - context='step' - )}} -
-
- -
-
- -
-
- {{input - name="key" - value=step.key - placeholderKey="admin.wizard.translation_placeholder"}} -
-
- -
-{{/if}} - -{{wizard-links - itemType="field" - current=currentField - items=step.fields - parentId=step.id}} - -{{#each step.fields as |field|}} - {{wizard-custom-field - field=field - currentFieldId=currentField.id - fieldTypes=fieldTypes - removeField="removeField" - wizardFields=wizardFields}} +
+
+ +
+
+ {{input + name="title" + value=step.title}} +
+
+ +
+
+ +
+
+ {{image-uploader + imageUrl=step.banner + onUploadDone=(action "bannerUploadDone") + onUploadDeleted=(action "bannerUploadDeleted") + type="wizard-banner" + class="no-repeat contain-image"}} +
+
+ +
+
+ +
+
+ {{wizard-text-editor + value=step.raw_description}} +
+
+ +{{wizard-advanced-toggle showAdvanced=step.showAdvanced}} + +{{#if step.showAdvanced}} +
+ +
+
+ +
+
+ {{wizard-mapper + inputs=step.required_data + options=(hash + inputTypes="validation" + inputConnector="and" + wizardFieldSelection="value" + userFieldSelection="value" + keyPlaceholder="admin.wizard.submission_key" + context="step" + )}} + {{#if step.required_data}} +
+
+ {{i18n "admin.wizard.step.required_data.not_permitted_message"}} +
+ {{input value=step.required_data_message}} +
+ {{/if}} +
+
+ +
+
+ +
+
+ {{wizard-mapper + inputs=step.permitted_params + options=(hash + pairConnector="set" + inputTypes="association" + keyPlaceholder="admin.wizard.param_key" + valuePlaceholder="admin.wizard.submission_key" + context="step" + )}} +
+
+ +
+
+ +
+
+ {{input + name="key" + value=step.key + placeholderKey="admin.wizard.translation_placeholder"}} +
+
+ +
+{{/if}} + +{{wizard-links + itemType="field" + current=currentField + items=step.fields + parentId=step.id}} + +{{#each step.fields as |field|}} + {{wizard-custom-field + field=field + currentFieldId=currentField.id + fieldTypes=fieldTypes + removeField="removeField" + wizardFields=wizardFields}} {{/each}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/wizard-links.hbs b/assets/javascripts/discourse/templates/components/wizard-links.hbs index b24b5083..5271b043 100644 --- a/assets/javascripts/discourse/templates/components/wizard-links.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-links.hbs @@ -1,14 +1,14 @@ -
{{{i18n header}}}
+
{{html-safe (i18n header)}}
@@ -40,7 +40,7 @@
{{wizard-mapper-selector - selectorType='output' + selectorType="output" inputType=input.type value=input.output activeType=input.output_type @@ -49,6 +49,6 @@
{{/if}} - - {{d-icon 'times'}} + + {{d-icon "times"}} diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper-pair.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper-pair.hbs index 6c0b4aa6..272b0b58 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper-pair.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper-pair.hbs @@ -1,6 +1,6 @@
{{wizard-mapper-selector - selectorType='key' + selectorType="key" inputType=inputType value=pair.key activeType=pair.key_type @@ -18,7 +18,7 @@
{{wizard-mapper-selector - selectorType='value' + selectorType="value" inputType=inputType value=pair.value activeType=pair.value_type @@ -31,5 +31,5 @@ {{/if}} {{#if showRemove}} - {{d-icon 'times'}} + {{d-icon "times"}} {{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs index c86d2a7d..94870416 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs @@ -1,16 +1,16 @@
{{#if hasTypes}} - + {{activeTypeLabel}} - + {{#if showTypes}}
{{#each selectorTypes as |item|}} {{wizard-mapper-selector-type activeType=activeType item=item - toggle=(action 'toggleType')}} + toggle=(action "toggleType")}} {{/each}}
{{/if}} @@ -38,7 +38,7 @@ allowAny=comboBoxAllowAny )}} {{/if}} - + {{#if showMultiSelect}} {{multi-select content=multiSelectContent @@ -46,14 +46,14 @@ onChange=(action "changeValue") options=multiSelectOptions}} {{/if}} - + {{#if showList}} {{wizard-value-list values=value addKey=placeholderKey onChange=(action "changeValue")}} {{/if}} - + {{#if showTag}} {{tag-chooser tags=value @@ -63,13 +63,13 @@ filterable=true )}} {{/if}} - + {{#if showUser}} - {{user-selector - includeMessageableGroups='true' + {{user-selector + includeMessageableGroups="true" placeholderKey=placeholderKey usernames=value autocomplete="discourse" onChangeCallback=(action "changeUserValue")}} {{/if}} -
\ No newline at end of file +
diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper.hbs index 25ee9512..2de35e0d 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper.hbs @@ -3,18 +3,18 @@ {{wizard-mapper-connector connector=input.connector connectorType="input" - onUpdate=(action 'inputUpdated')}} + onUpdate=(action "inputUpdated")}} {{/if}} - - {{wizard-mapper-input + + {{wizard-mapper-input input=input options=inputOptions - remove=(action 'remove') - onUpdate=(action 'inputUpdated')}} + remove=(action "remove") + onUpdate=(action "inputUpdated")}} {{/each}} {{#if canAdd}} - {{d-button action='add' label='admin.wizard.add' icon='plus'}} + {{d-button action="add" label="admin.wizard.add" icon="plus"}} -{{/if}} \ No newline at end of file +{{/if}} diff --git a/assets/javascripts/discourse/templates/components/wizard-message.hbs b/assets/javascripts/discourse/templates/components/wizard-message.hbs index 78c7558b..4c48002a 100644 --- a/assets/javascripts/discourse/templates/components/wizard-message.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-message.hbs @@ -2,13 +2,13 @@ {{#if showIcon}} {{d-icon icon}} {{/if}} - {{{message}}} + {{html-safe message}} {{#if hasItems}}
    {{#each items as |item|}}
  • {{d-icon item.icon}} - {{{item.html}}} + {{html-safe item.html}}
  • {{/each}}
@@ -17,9 +17,9 @@ {{#if showDocumentation}} diff --git a/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs b/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs index 39734761..cd1298a9 100644 --- a/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs @@ -1,28 +1,28 @@ -

{{i18n 'admin.wizard.field.validations.header'}}

+

{{i18n "admin.wizard.field.validations.header"}}

    {{#each-in field.validations as |type props|}}
  • -

    {{i18n (concat 'admin.wizard.field.validations.' type)}}

    +

    {{i18n (concat "admin.wizard.field.validations." type)}}

    {{input type="checkbox" checked=props.status}} - {{i18n 'admin.wizard.field.validations.enabled'}} + {{i18n "admin.wizard.field.validations.enabled"}}
    - +
    {{category-selector - categories=(get this (concat 'validationBuffer.' type '.categories')) - onChange=(action 'updateValidationCategories' type props) + categories=(get this (concat "validationBuffer." type ".categories")) + onChange=(action "updateValidationCategories" type props) class="wizard"}}
    - +
    {{input type="number" class="time-n-value" value=props.time_n_value}} @@ -35,13 +35,13 @@
    - +
    {{radio-button name=(concat type field.id) value="above" selection=props.position}} - {{i18n 'admin.wizard.field.validations.above'}} + {{i18n "admin.wizard.field.validations.above"}} {{radio-button name=(concat type field.id) value="below" selection=props.position}} - {{i18n 'admin.wizard.field.validations.below'}} + {{i18n "admin.wizard.field.validations.below"}}
    diff --git a/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs b/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs index 36be715f..a37f37a3 100644 --- a/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs @@ -9,29 +9,29 @@ action="togglePreview" translatedLabel=previewLabel}} {{/if}} - + {{#if fieldsEnabled}} {{d-button action="togglePopover" translatedLabel=popoverLabel}} - + {{#if showPopover}}
    - + {{#if hasWizardFields}} {{/if}} - + {{#if hasWizardActions}} {{/if}} diff --git a/assets/javascripts/wizard/templates/components/field-validators.hbs b/assets/javascripts/wizard/templates/components/field-validators.hbs index 704c5c63..1fc04012 100644 --- a/assets/javascripts/wizard/templates/components/field-validators.hbs +++ b/assets/javascripts/wizard/templates/components/field-validators.hbs @@ -1,13 +1,13 @@ -{{#if field.validations}} - {{#each-in field.validations.above as |type validation|}} - {{component validation.component field=field type=type validation=validation}} - {{/each-in}} - - {{yield (hash perform=(action 'perform') autocomplete="off")}} - - {{#each-in field.validations.below as |type validation|}} - {{component validation.component field=field type=type validation=validation}} - {{/each-in}} -{{else}} - {{yield}} -{{/if}} +{{#if field.validations}} + {{#each-in field.validations.above as |type validation|}} + {{component validation.component field=field type=type validation=validation}} + {{/each-in}} + + {{yield (hash perform=(action "perform") autocomplete="off")}} + + {{#each-in field.validations.below as |type validation|}} + {{component validation.component field=field type=type validation=validation}} + {{/each-in}} +{{else}} + {{yield}} +{{/if}} diff --git a/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs b/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs index 03d56f85..1e7c27df 100644 --- a/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-composer-editor.hbs @@ -25,8 +25,8 @@ {{#if showHyperlinkBox}} {{wizard-composer-hyperlink - addLink=(action 'addLink') - hideBox=(action 'hideBox')}} + addLink=(action "addLink") + hideBox=(action "hideBox")}} {{/if}} {{#if isUploading}} diff --git a/assets/javascripts/wizard/templates/components/wizard-composer-hyperlink.hbs b/assets/javascripts/wizard/templates/components/wizard-composer-hyperlink.hbs index f5b7afb5..c4403633 100644 --- a/assets/javascripts/wizard/templates/components/wizard-composer-hyperlink.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-composer-hyperlink.hbs @@ -2,20 +2,20 @@

    {{wizard-i18n "composer.link_dialog_title"}}

    {{input class="composer-link-name" - placeholder=(wizard-i18n 'composer.link_optional_text') + placeholder=(wizard-i18n "composer.link_optional_text") type="text" value=linkName}} {{input class="composer-link-url" - placeholder=(wizard-i18n 'composer.link_url_placeholder') + placeholder=(wizard-i18n "composer.link_url_placeholder") type="text" value=linkUrl}} {{d-button label="wizard_composer.modal_ok" class="add-link btn-primary" - click=(action 'addLink')}} + click=(action "addLink")}} {{d-button label="wizard_composer.modal_cancel" class="hide-hyperlink-box btn-danger" - click=(action 'hideBox')}} + click=(action "hideBox")}}
    diff --git a/assets/javascripts/wizard/templates/components/wizard-editor.hbs b/assets/javascripts/wizard/templates/components/wizard-editor.hbs index 189920ff..861d2449 100644 --- a/assets/javascripts/wizard/templates/components/wizard-editor.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-editor.hbs @@ -1,15 +1,15 @@ - + -
    +
    {{#if showPreview}} -
    +
    - {{{preview}}} + {{html-safe preview}}
    {{else}}
    -
    +
    {{#each toolbar.groups as |group|}} {{#each group.buttons as |b|}} {{#if b.popupMenu}} @@ -24,7 +24,7 @@ )}} {{else}}
    {{d.icon}}
    -
    diff --git a/assets/javascripts/wizard/templates/components/wizard-field-checkbox.hbs b/assets/javascripts/wizard/templates/components/wizard-field-checkbox.hbs index d9ec7c91..8cbc2b3e 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-checkbox.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-checkbox.hbs @@ -1 +1 @@ -{{input type='checkbox' id=field.id checked=field.value tabindex=field.tabindex}} \ No newline at end of file +{{input type="checkbox" id=field.id checked=field.value tabindex=field.tabindex}} \ No newline at end of file diff --git a/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs b/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs index 3160d9fb..802c0339 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-composer.hbs @@ -8,11 +8,11 @@ afterRefresh=(action "afterRefresh")}}
    - + -{{#if field.char_counter}} - {{char-counter field.value field.max_length}} -{{/if}} + {{#if field.char_counter}} + {{char-counter field.value field.max_length}} + {{/if}}
    diff --git a/assets/javascripts/wizard/templates/components/wizard-field-dropdown.hbs b/assets/javascripts/wizard/templates/components/wizard-field-dropdown.hbs index de4a4d83..fbb68721 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-dropdown.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-dropdown.hbs @@ -1,4 +1,4 @@ -{{combo-box +{{combo-box class=fieldClass value=field.value content=field.content diff --git a/assets/javascripts/wizard/templates/components/wizard-field-group.hbs b/assets/javascripts/wizard/templates/components/wizard-field-group.hbs index c208d45f..0c3b102d 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-group.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-group.hbs @@ -6,5 +6,5 @@ tabindex=field.tabindex onChange=(action (mut field.value)) options=(hash - none='group.select' + none="group.select" )}} \ No newline at end of file diff --git a/assets/javascripts/wizard/templates/components/wizard-field-number.hbs b/assets/javascripts/wizard/templates/components/wizard-field-number.hbs index c90cca9d..8704dac0 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-number.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-number.hbs @@ -1 +1 @@ -{{input type='number' step='0.01' id=field.id value=field.value tabindex=field.tabindex}} \ No newline at end of file +{{input type="number" step="0.01" id=field.id value=field.value tabindex=field.tabindex}} \ No newline at end of file diff --git a/assets/javascripts/wizard/templates/components/wizard-field-upload.hbs b/assets/javascripts/wizard/templates/components/wizard-field-upload.hbs index af5aeb79..f4bea9ff 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-upload.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-upload.hbs @@ -1,4 +1,4 @@ -