From 37685ea8cf25c24e909b7e4498c18fc64b11657e Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 29 Mar 2022 21:15:09 +0200 Subject: [PATCH] Update action usage --- .../discourse/templates/admin-wizards-api.hbs | 2 +- .../templates/admin-wizards-custom-fields.hbs | 2 +- .../discourse/templates/admin-wizards-wizard-show.hbs | 4 ++-- .../discourse/templates/admin-wizards-wizard.hbs | 2 +- .../templates/components/custom-field-input.hbs | 8 ++++---- .../templates/components/wizard-custom-action.hbs | 2 +- .../templates/components/wizard-custom-field.hbs | 2 +- .../discourse/templates/components/wizard-links.hbs | 11 +++++------ .../discourse/templates/components/wizard-mapper.hbs | 2 +- .../templates/components/wizard-text-editor.hbs | 4 ++-- .../templates/modal/next-session-scheduled.hbs | 2 +- 11 files changed, 20 insertions(+), 21 deletions(-) diff --git a/assets/javascripts/discourse/templates/admin-wizards-api.hbs b/assets/javascripts/discourse/templates/admin-wizards-api.hbs index 00d8ad60..f5e3214d 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api.hbs @@ -8,7 +8,7 @@ )}} {{d-button - action="createApi" + action=(action "createApi") label="admin.wizard.api.create" icon="plus"}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs b/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs index 10501498..a90f6299 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs @@ -5,7 +5,7 @@ {{d-button label="admin.wizard.custom_field.add" icon="plus" - action="addField"}} + action=(action "addField")}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs index c5ed70a7..6d4fa553 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs @@ -101,7 +101,7 @@ {{input type="checkbox" checked=wizard.after_time}} {{i18n "admin.wizard.after_time_label"}} {{d-button - action="setNextSessionScheduled" + action=(action "setNextSessionScheduled") translatedLabel=nextSessionScheduledLabel class="btn-after-time" icon="far-calendar"}} @@ -191,7 +191,7 @@ currentActionId=currentAction.id wizard=wizard apis=apis - removeAction="removeAction" + removeAction=(action "removeAction") wizardFields=wizardFields}} {{/each}} diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs index 081cd5f3..11b0cd11 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs @@ -8,7 +8,7 @@ )}} {{d-button - action="createWizard" + action=(action "createWizard") label="admin.wizard.create" icon="plus"}} diff --git a/assets/javascripts/discourse/templates/components/custom-field-input.hbs b/assets/javascripts/discourse/templates/components/custom-field-input.hbs index 43a97be8..5f4d1ba1 100644 --- a/assets/javascripts/discourse/templates/components/custom-field-input.hbs +++ b/assets/javascripts/discourse/templates/components/custom-field-input.hbs @@ -34,17 +34,17 @@ {{/if}} {{/if}} {{d-button - action="destroy" + action=(action "destroy") icon="trash-alt" class="destroy" disabled=destroyDisabled}} {{d-button icon="save" - action="save" + action=(action "save") disabled=saveDisabled class="save"}} {{d-button - action="close" + action=(action "close") icon="times" disabled=closeDisabled}} @@ -69,7 +69,7 @@ {{else}} - {{d-button action="edit" icon="pencil-alt"}} + {{d-button action=(action "edit") icon="pencil-alt"}} {{/if}} {{/if}} diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index 4c645cf7..c39623d7 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -1,6 +1,6 @@ {{#if showUndo}} {{d-button - action="undoChanges" + action=(action "undoChanges") icon=undoIcon label=undoKey class="undo-changes"}} diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs index f51b9fbb..b9c14999 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs @@ -1,6 +1,6 @@ {{#if showUndo}} {{d-button - action="undoChanges" + action=(action "undoChanges") icon=undoIcon label=undoKey class="undo-changes"}} diff --git a/assets/javascripts/discourse/templates/components/wizard-links.hbs b/assets/javascripts/discourse/templates/components/wizard-links.hbs index a7a7662e..368acd35 100644 --- a/assets/javascripts/discourse/templates/components/wizard-links.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-links.hbs @@ -4,17 +4,16 @@ {{#if anyLinks}} {{#each links as |link|}}
- {{d-button action="change" actionParam=link.id translatedLabel=link.label class=link.classes}} + {{d-button action=(action "change") actionParam=link.id translatedLabel=link.label class=link.classes}} {{#unless link.first}} - {{d-button action="back" actionParam=link icon="arrow-left" class="back"}} + {{d-button action=(action "back") actionParam=link icon="arrow-left" class="back"}} {{/unless}} {{#unless link.last}} - {{d-button action="forward" actionParam=link icon="arrow-right" class="forward"}} + {{d-button action=(action "forward") actionParam=link icon="arrow-right" class="forward"}} {{/unless}} - {{d-button action="remove" actionParam=link.id icon="times" class="remove"}} + {{d-button action=(action "remove") actionParam=link.id icon="times" class="remove"}}
{{/each}} {{/if}} - {{d-button action="add" label="admin.wizard.add" icon="plus"}} + {{d-button action=(action "add") label="admin.wizard.add" icon="plus"}} - diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper.hbs index 2de35e0d..c0cc6818 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper.hbs @@ -15,6 +15,6 @@ {{#if canAdd}} - {{d-button action="add" label="admin.wizard.add" icon="plus"}} + {{d-button action=(action "add") label="admin.wizard.add" icon="plus"}} {{/if}} diff --git a/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs b/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs index c657049d..37a3e549 100644 --- a/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-text-editor.hbs @@ -6,13 +6,13 @@
{{#if previewEnabled}} {{d-button - action="togglePreview" + action=(action "togglePreview") translatedLabel=previewLabel}} {{/if}} {{#if fieldsEnabled}} {{d-button - action="togglePopover" + action=(action "togglePopover") translatedLabel=popoverLabel}} {{#if showPopover}} diff --git a/assets/javascripts/discourse/templates/modal/next-session-scheduled.hbs b/assets/javascripts/discourse/templates/modal/next-session-scheduled.hbs index 1b138360..cbc9d610 100644 --- a/assets/javascripts/discourse/templates/modal/next-session-scheduled.hbs +++ b/assets/javascripts/discourse/templates/modal/next-session-scheduled.hbs @@ -9,7 +9,7 @@