Skip to content

Commit

Permalink
FIX: category settings for calendar were incorrect
Browse files Browse the repository at this point in the history
Following the key change in d31933b this has been broken.

This commit also hides the section if `sort_categories_by_event_start_date_enabled` AND `disable_resorting_on_categories_enabled` are not enabled, prior to this change we would just show the title, with no checkbox to check.
  • Loading branch information
jjaffeux committed Oct 24, 2024
1 parent 52ebb59 commit e2cea03
Showing 1 changed file with 36 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
<section>
<h3>{{i18n "category.settings_sections.event_sorting"}}</h3>
{{#if
(or
siteSettings.sort_categories_by_event_start_date_enabled
siteSettings.disable_resorting_on_categories_enabled
)
}}
<section>
<h3>{{i18n
"discourse_post_event.category.settings_sections.event_sorting"
}}</h3>

{{#if siteSettings.sort_categories_by_event_start_date_enabled}}
<section class="field show-subcategory-list-field">
<label>
<Input
@type="checkbox"
@checked={{this.category.custom_fields.sort_topics_by_event_start_date}}
/>
{{i18n "category.sort_topics_by_event_start_date"}}
</label>
</section>
{{/if}}
{{#if siteSettings.sort_categories_by_event_start_date_enabled}}
<section class="field show-subcategory-list-field">
<label>
<Input
@type="checkbox"
@checked={{this.category.custom_fields.sort_topics_by_event_start_date}}
/>
{{i18n
"discourse_post_event.category.sort_topics_by_event_start_date"
}}
</label>
</section>
{{/if}}

{{#if siteSettings.disable_resorting_on_categories_enabled}}
<section class="field show-subcategory-list-field">
<label>
<Input
@type="checkbox"
@checked={{this.category.custom_fields.disable_topic_resorting}}
/>
{{i18n "category.disable_topic_resorting"}}
</label>
</section>
{{/if}}
</section>
{{#if siteSettings.disable_resorting_on_categories_enabled}}
<section class="field show-subcategory-list-field">
<label>
<Input
@type="checkbox"
@checked={{this.category.custom_fields.disable_topic_resorting}}
/>
{{i18n "discourse_post_event.category.disable_topic_resorting"}}
</label>
</section>
{{/if}}
</section>
{{/if}}

0 comments on commit e2cea03

Please sign in to comment.