DEV: Avoid using the old action helper (#26935)
This commit is contained in:
parent
1b80ee9eb7
commit
e579cfc08f
|
@ -38,7 +38,7 @@
|
|||
<ComboBox
|
||||
@content={{this.validValues}}
|
||||
@value={{this.newValue}}
|
||||
@onChange={{action this.addValue}}
|
||||
@onChange={{this.addValue}}
|
||||
@valueProperty={{this.setting.computedValueProperty}}
|
||||
@nameProperty={{this.setting.computedNameProperty}}
|
||||
@options={{hash castInteger=true allowAny=false}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<WatchedWords
|
||||
@id="watched-words"
|
||||
@value={{this.words}}
|
||||
@onChange={{action (mut this.words)}}
|
||||
@onChange={{fn (mut this.words)}}
|
||||
@options={{hash
|
||||
filterPlaceholder=this.placeholderKey
|
||||
disabled=this.formSubmitted
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<ComboBox
|
||||
@value={{this.group}}
|
||||
@content={{this.groupOptions}}
|
||||
@onChange={{action this.groupChanged}}
|
||||
@onChange={{this.groupChanged}}
|
||||
@options={{hash none="directory.group.all"}}
|
||||
class="directory-group-selector"
|
||||
/>
|
||||
|
|
|
@ -15,16 +15,16 @@ export default class AutomationNew extends Controller {
|
|||
}
|
||||
|
||||
@action
|
||||
saveAutomation(automation) {
|
||||
saveAutomation() {
|
||||
this.set("error", null);
|
||||
|
||||
automation
|
||||
this.model.automation
|
||||
.save(this.form.getProperties("name", "script"))
|
||||
.then(() => {
|
||||
this._resetForm();
|
||||
this.router.transitionTo(
|
||||
"adminPlugins.discourse-automation.edit",
|
||||
automation.id
|
||||
this.model.automation.id
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<DropdownSelectBox
|
||||
@value={{form.script}}
|
||||
@content={{model.scriptables.content}}
|
||||
@onChange={{action (mut form.script)}}
|
||||
@onChange={{fn (mut form.script)}}
|
||||
@options={{hash
|
||||
showCaret=true
|
||||
filterable=true
|
||||
|
@ -39,12 +39,11 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<div class="controls">
|
||||
<DButton
|
||||
@icon="plus"
|
||||
@label="discourse_automation.create"
|
||||
@action={{action "saveAutomation" model.automation}}
|
||||
@action={{this.saveAutomation}}
|
||||
class="btn-primary create-automation"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</label>
|
||||
<CategoryChooser
|
||||
@value={{this.categoryId}}
|
||||
@onChange={{action this.onCategoryChange}}
|
||||
@onChange={{this.onCategoryChange}}
|
||||
@options={{hash
|
||||
formName="chatable_id"
|
||||
none="chat.create_channel.choose_category.none"
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
@minDate={{this.minDate}}
|
||||
@timeFormat={{this.timeFormat}}
|
||||
@dateFormat={{this.dateFormat}}
|
||||
@onChangeDate={{action this.changeSelectedDate}}
|
||||
@onChangeTime={{action this.changeSelectedTime}}
|
||||
@onChangeDate={{this.changeSelectedDate}}
|
||||
@onChangeTime={{this.changeSelectedTime}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
@content={{this.groupableUserFields}}
|
||||
@value={{this.groupedBy}}
|
||||
@nameProperty="label"
|
||||
@onChange={{action this.setGrouping}}
|
||||
@onChange={{this.setGrouping}}
|
||||
class="poll-breakdown-dropdown"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
@minDate={{this.minDate}}
|
||||
@timeFormat={{this.timeFormat}}
|
||||
@dateFormat={{this.dateFormat}}
|
||||
@onChangeDate={{action this.changeDate}}
|
||||
@onChangeTime={{action this.changeTime}}
|
||||
@onChangeDate={{this.changeDate}}
|
||||
@onChangeTime={{this.changeTime}}
|
||||
/>
|
||||
</Styleguide::Component>
|
||||
|
||||
|
|
Loading…
Reference in New Issue