DEV: Make hide category default when custom wizard is selected
Dieser Commit ist enthalten in:
Ursprung
10609f33e2
Commit
0992e9601c
6 geänderte Dateien mit 2 neuen und 30 gelöschten Zeilen
|
@ -13,13 +13,3 @@
|
|||
}}
|
||||
</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,10 +13,6 @@ export default {
|
|||
"wizardListVal",
|
||||
attrs?.category?.custom_fields?.create_topic_wizard
|
||||
);
|
||||
component.set(
|
||||
"hideFromComposer",
|
||||
attrs?.category?.custom_fields?.custom_wizard_hide_from_composer
|
||||
);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -24,12 +20,5 @@ 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
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -89,7 +89,7 @@ export default {
|
|||
let categories = this._super(options);
|
||||
|
||||
return categories.filter((category) => {
|
||||
return !category.custom_fields?.custom_wizard_hide_from_composer;
|
||||
return !category.custom_fields?.create_topic_wizard;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -133,7 +133,6 @@ 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:
|
||||
|
|
|
@ -105,7 +105,6 @@ after_initialize do
|
|||
# preloaded category custom fields
|
||||
%w[
|
||||
create_topic_wizard
|
||||
custom_wizard_hide_from_composer
|
||||
].each do |custom_field|
|
||||
Site.preloaded_category_custom_fields << custom_field
|
||||
end
|
||||
|
|
|
@ -33,7 +33,6 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -78,7 +77,6 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -123,7 +121,6 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -168,7 +165,6 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -210,7 +206,6 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: "t",
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
|
Laden …
In neuem Issue referenzieren