1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-step.js.es6

41 Zeilen
893 B
Text

2020-04-05 03:37:09 +02:00
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
2017-10-19 04:17:36 +02:00
2020-04-05 03:37:09 +02:00
export default Component.extend({
classNames: "wizard-custom-step",
@discourseComputed("step.index")
stepConditionOptions(stepIndex) {
const options = {
inputTypes: "validation",
context: "step",
textSelection: "value",
userFieldSelection: true,
groupSelection: true,
};
if (stepIndex > 0) {
options["wizardFieldSelection"] = true;
options["wizardActionSelection"] = true;
}
return options;
},
2020-03-30 01:53:28 +02:00
actions: {
bannerUploadDone(upload) {
2022-08-02 13:39:56 +02:00
this.setProperties({
"step.banner": upload.url,
"step.banner_upload_id": upload.id
});
2020-03-30 01:53:28 +02:00
},
2020-03-30 01:53:28 +02:00
bannerUploadDeleted() {
2022-08-02 13:39:56 +02:00
this.setProperties({
"step.banner": null,
"step.banner_upload_id": null
});
},
},
2017-09-23 04:34:07 +02:00
});