File tree Expand file tree Collapse file tree 4 files changed +43
-39
lines changed
assets/javascripts/discourse
connectors/category-custom-settings Expand file tree Collapse file tree 4 files changed +43
-39
lines changed Original file line number Diff line number Diff line change 1+ <h3 >{{ i18n " admin.wizard.category_settings.custom_wizard.title" }} </h3 >
2+
3+ <section class =" field new-topic-wizard" >
4+ <label for =" new-topic-wizard" >
5+ {{ i18n " admin.wizard.category_settings.custom_wizard.create_topic_wizard" }}
6+ </label >
7+ <div class =" controls" >
8+ <ComboBox
9+ @value ={{ this.wizardListVal }}
10+ @content ={{ this.wizardList }}
11+ @onChange ={{ this.changeWizard }}
12+ @options ={{ hash none =" admin.wizard.select" }}
13+ />
14+ </div >
15+ </section >
Original file line number Diff line number Diff line change 1+ import Component from "@glimmer/component" ;
2+ import { action } from "@ember/object" ;
3+ import { tracked } from "@glimmer/tracking" ;
4+ import CustomWizardAdmin from "../models/custom-wizard-admin" ;
5+ import { popupAjaxError } from "discourse/lib/ajax-error" ;
6+
7+ export default class CustomWizardCategorySettings extends Component {
8+ @tracked wizardList = [ ] ;
9+ @tracked wizardListVal =
10+ this . args ?. category ?. custom_fields ?. create_topic_wizard ;
11+
12+ constructor ( ) {
13+ super ( ...arguments ) ;
14+
15+ CustomWizardAdmin . all ( )
16+ . then ( ( result ) => {
17+ this . wizardList = result ;
18+ } )
19+ . catch ( popupAjaxError ) ;
20+ }
21+
22+ @action
23+ changeWizard ( wizard ) {
24+ this . wizardListVal = wizard ;
25+ this . args . category . custom_fields . create_topic_wizard = wizard ;
26+ }
27+ }
Original file line number Diff line number Diff line change 1- <h3 >{{ i18n " admin.wizard.category_settings.custom_wizard.title" }} </h3 >
2-
3- <section class =" field new-topic-wizard" >
4- <label for =" new-topic-wizard" >
5- {{ i18n " admin.wizard.category_settings.custom_wizard.create_topic_wizard" }}
6- </label >
7- <div class =" controls" >
8- {{ combo-box
9- value =this.wizardListVal
10- content =this.wizardList
11- onChange = (action " changeWizard" )
12- options = (hash none =" admin.wizard.select" )
13- }}
14- </div >
15- </section >
1+ <CustomWizardCategorySettings @category ={{ this.category }} />
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments