2020-04-05 03:37:09 +02:00
|
|
|
import Component from "@ember/component";
|
2021-04-20 19:58:19 +02:00
|
|
|
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({
|
2021-03-28 11:06:49 +02:00
|
|
|
classNames: "wizard-custom-step",
|
|
|
|
|
2021-04-20 19:58:19 +02:00
|
|
|
@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) {
|
|
|
|
this.set("step.banner", upload.url);
|
|
|
|
},
|
2021-03-28 11:06:49 +02:00
|
|
|
|
2020-03-30 01:53:28 +02:00
|
|
|
bannerUploadDeleted() {
|
|
|
|
this.set("step.banner", null);
|
2021-03-28 11:06:49 +02:00
|
|
|
},
|
|
|
|
},
|
2017-09-23 04:34:07 +02:00
|
|
|
});
|