Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 01:10:28 +01:00
DEV: Implement control to hide category from composer dropdown in specified categories
Dieser Commit ist enthalten in:
Ursprung
29d7818a4a
Commit
de03cbd15a
3 geänderte Dateien mit 23 neuen und 0 gelöschten Zeilen
|
@ -13,3 +13,14 @@
|
|||
}}
|
||||
</div>
|
||||
</section>
|
||||
<section class="field hide-from-composer">
|
||||
<label>
|
||||
<Input
|
||||
@type="checkbox"
|
||||
@checked={{hideFromComposer}}
|
||||
{{on "change" (action "toggleHideFromComposer")}}
|
||||
/>
|
||||
{{i18n "admin.wizard.category_settings.custom_wizard.hide_from_composer"}}
|
||||
</label>
|
||||
|
||||
</section>
|
|
@ -13,6 +13,10 @@ export default {
|
|||
"wizardListVal",
|
||||
attrs?.category?.custom_fields?.create_topic_wizard
|
||||
);
|
||||
component.set(
|
||||
"hideFromComposer",
|
||||
attrs?.category?.custom_fields?.custom_wizard_hide_from_composer
|
||||
);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -20,5 +24,12 @@ export default {
|
|||
this.set("wizardListVal", wizard);
|
||||
this.set("category.custom_fields.create_topic_wizard", wizard);
|
||||
},
|
||||
toggleHideFromComposer() {
|
||||
this.toggleProperty("hideFromComposer");
|
||||
this.set(
|
||||
"category.custom_fields.custom_wizard_hide_from_composer",
|
||||
this.hideFromComposer
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -133,6 +133,7 @@ en:
|
|||
custom_wizard:
|
||||
title: "Custom Wizard"
|
||||
create_topic_wizard: "Select a wizard to replace the new topic composer in this category."
|
||||
hide_from_composer: "Exclude category from composer dropdown"
|
||||
|
||||
message:
|
||||
wizard:
|
||||
|
|
Laden …
In neuem Issue referenzieren