From 14778ba52e6f9281f58f74dbf4090c53e971a966 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 5 Apr 2022 19:01:09 +0200 Subject: [PATCH] DEV: Fix select-kit deprecations (#15080) --- .../admin/addon/templates/badges-show.hbs | 8 ++++-- .../components/report-filters/group.hbs | 4 +-- .../components/report-filters/list.hbs | 8 +++--- .../components/site-settings/category.hbs | 2 +- .../addon/templates/components/value-list.hbs | 8 +++--- .../addon/templates/customize-themes-show.hbs | 8 +++--- .../templates/logs/staff-action-logs.hbs | 4 ++- .../admin/addon/templates/user-badges.hbs | 4 ++- .../admin/addon/templates/user-index.hbs | 4 ++- .../components/edit-category-general.hbs | 2 +- .../components/edit-topic-timer-form.hbs | 4 ++- .../components/group-imap-email-settings.hbs | 4 ++- .../components/reviewable-bundled-action.hbs | 2 +- .../components/search-advanced-options.hbs | 2 +- .../templates/components/tag-groups-form.hbs | 6 ++--- .../components/user-fields/dropdown.hbs | 4 ++- .../components/user-fields/multiselect.hbs | 4 ++- .../discourse/app/templates/composer.hbs | 4 +-- .../app/templates/group/manage/tags.hbs | 20 +++++++++++---- .../app/templates/modal/grant-badge.hbs | 6 +++-- .../app/templates/modal/move-to-topic.hbs | 6 ++--- .../app/templates/preferences/account.hbs | 13 +++++++--- .../app/templates/preferences/emails.hbs | 4 ++- .../app/templates/preferences/tags.hbs | 25 +++++++++++++------ .../discourse/app/templates/review-index.hbs | 8 ++++-- .../select-kit/category-chooser-test.js | 2 +- .../select-kit/addon/components/select-kit.js | 1 + .../select-kit/select-kit-header.js | 2 +- .../discourse-local-dates-create-form.hbs | 11 +++++--- .../templates/styleguide/atoms/dropdowns.hbs | 8 +++++- 30 files changed, 129 insertions(+), 59 deletions(-) diff --git a/app/assets/javascripts/admin/addon/templates/badges-show.hbs b/app/assets/javascripts/admin/addon/templates/badges-show.hbs index a1260d04816..524a53c8121 100644 --- a/app/assets/javascripts/admin/addon/templates/badges-show.hbs +++ b/app/assets/javascripts/admin/addon/templates/badges-show.hbs @@ -68,7 +68,9 @@ value=buffered.badge_type_id content=badgeTypes onChange=(action (mut buffered.badge_type_id)) - isDisabled=readOnly + options=(hash + disabled=readOnly + ) }} @@ -155,7 +157,9 @@ value=buffered.trigger content=badgeTriggers onChange=(action (mut buffered.trigger)) - disabled=readOnly + options=(hash + disabled=readOnly + ) }} {{/if}} diff --git a/app/assets/javascripts/admin/addon/templates/components/report-filters/group.hbs b/app/assets/javascripts/admin/addon/templates/components/report-filters/group.hbs index bac1facc694..c306bcc68ff 100644 --- a/app/assets/javascripts/admin/addon/templates/components/report-filters/group.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/report-filters/group.hbs @@ -1,11 +1,11 @@ {{combo-box - filterable=true valueProperty="value" content=groupOptions value=groupId - none="admin.dashboard.reports.groups" onChange=(action "onChange") options=(hash allowAny=filter.allow_any + filterable=true + none="admin.dashboard.reports.groups" ) }} diff --git a/app/assets/javascripts/admin/addon/templates/components/report-filters/list.hbs b/app/assets/javascripts/admin/addon/templates/components/report-filters/list.hbs index 88d71d0747e..e01c74268bd 100644 --- a/app/assets/javascripts/admin/addon/templates/components/report-filters/list.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/report-filters/list.hbs @@ -1,8 +1,10 @@ {{combo-box content=filter.choices - filterable=true - allowAny=filter.allow_any value=filter.default - none="admin.dashboard.report_filter_any" onChange=(action "onChange") + options=(hash + allowAny=filter.allow_any + filterable=true + none="admin.dashboard.report_filter_any" + ) }} diff --git a/app/assets/javascripts/admin/addon/templates/components/site-settings/category.hbs b/app/assets/javascripts/admin/addon/templates/components/site-settings/category.hbs index e2545c68637..27a80e7aaaf 100644 --- a/app/assets/javascripts/admin/addon/templates/components/site-settings/category.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/site-settings/category.hbs @@ -1,8 +1,8 @@ {{category-chooser value=value - allowUncategorized=true onChange=(action (mut value)) options=(hash + allowUncategorized=true none=(eq setting.default "") ) }} diff --git a/app/assets/javascripts/admin/addon/templates/components/value-list.hbs b/app/assets/javascripts/admin/addon/templates/components/value-list.hbs index 518922c9659..c9852ed170f 100644 --- a/app/assets/javascripts/admin/addon/templates/components/value-list.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/value-list.hbs @@ -34,13 +34,13 @@ {{/if}} {{combo-box - options=(hash - allowAny=true - ) - none=noneKey valueProperty=null nameProperty=null value=newValue content=filteredChoices onChange=(action "selectChoice") + options=(hash + allowAny=true + none=noneKey + ) }} diff --git a/app/assets/javascripts/admin/addon/templates/customize-themes-show.hbs b/app/assets/javascripts/admin/addon/templates/customize-themes-show.hbs index ee702a56d52..811510fa3ed 100644 --- a/app/assets/javascripts/admin/addon/templates/customize-themes-show.hbs +++ b/app/assets/javascripts/admin/addon/templates/customize-themes-show.hbs @@ -159,10 +159,12 @@
{{color-palettes content=colorSchemes - filterable=true - forceEscape=true value=colorSchemeId - icon="paint-brush"}} + icon="paint-brush" + options=(hash + filterable=true + ) + }}
{{i18n "admin.customize.theme.color_scheme_select"}}
diff --git a/app/assets/javascripts/admin/addon/templates/logs/staff-action-logs.hbs b/app/assets/javascripts/admin/addon/templates/logs/staff-action-logs.hbs index 4213160362a..afb605991bf 100644 --- a/app/assets/javascripts/admin/addon/templates/logs/staff-action-logs.hbs +++ b/app/assets/javascripts/admin/addon/templates/logs/staff-action-logs.hbs @@ -34,8 +34,10 @@ {{combo-box content=userHistoryActions value=filterActionId - none="admin.logs.staff_actions.all" onChange=(action "filterActionIdChanged") + options=(hash + none="admin.logs.staff_actions.all" + ) }} {{/if}} diff --git a/app/assets/javascripts/admin/addon/templates/user-badges.hbs b/app/assets/javascripts/admin/addon/templates/user-badges.hbs index 1b401b7e42c..44549f6613d 100644 --- a/app/assets/javascripts/admin/addon/templates/user-badges.hbs +++ b/app/assets/javascripts/admin/addon/templates/user-badges.hbs @@ -17,10 +17,12 @@
{{combo-box - filterable=true value=selectedBadgeId content=grantableBadges onChange=(action (mut selectedBadgeId)) + options=(hash + filterable=true + ) }}
diff --git a/app/assets/javascripts/admin/addon/templates/user-index.hbs b/app/assets/javascripts/admin/addon/templates/user-index.hbs index ad93faf07d8..c8e3b9dfd8d 100644 --- a/app/assets/javascripts/admin/addon/templates/user-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/user-index.hbs @@ -551,8 +551,10 @@ {{combo-box content=model.customGroups value=model.primary_group_id - none="admin.groups.no_primary" onChange=(action (mut model.primary_group_id)) + options=(hash + none="admin.groups.no_primary" + ) }}
{{#if primaryGroupDirty}} diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs index 8e16ab00a91..aa408070cbb 100644 --- a/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs @@ -15,10 +15,10 @@ value=category.parent_category_id categories=parentCategories allowSubCategories=true - allowUncategorized=false allowRestrictedCategories=true onChange=(action (mut category.parent_category_id)) options=(hash + allowUncategorized=false excludeCategoryId=category.id none=true ) diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs index 5f5bdb8dad3..c9d6d28ed77 100644 --- a/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/edit-topic-timer-form.hbs @@ -12,8 +12,10 @@ {{category-chooser value=topicTimer.category_id - excludeCategoryId=excludeCategoryId onChange=(action (mut topicTimer.category_id)) + options=(hash + excludeCategoryId=excludeCategoryId + ) }} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/group-imap-email-settings.hbs b/app/assets/javascripts/discourse/app/templates/components/group-imap-email-settings.hbs index e4d19aaf309..9b66d8079fd 100644 --- a/app/assets/javascripts/discourse/app/templates/components/group-imap-email-settings.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/group-imap-email-settings.hbs @@ -28,9 +28,11 @@ value=group.imap_mailbox_name valueProperty="value" content=mailboxes - none="groups.manage.email.mailboxes.disabled" tabindex="10" onChange=(action (mut group.imap_mailbox_name)) + options=(hash + none="groups.manage.email.mailboxes.disabled" + ) }} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/reviewable-bundled-action.hbs b/app/assets/javascripts/discourse/app/templates/components/reviewable-bundled-action.hbs index c40ac432c36..17eb8837522 100644 --- a/app/assets/javascripts/discourse/app/templates/components/reviewable-bundled-action.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/reviewable-bundled-action.hbs @@ -2,13 +2,13 @@ {{dropdown-select-box class="reviewable-action-dropdown" nameProperty="label" - title=bundle.label content=bundle.actions onChange=(action "performById") options=(hash icon=bundle.icon disabled=reviewableUpdating placement=placement + translatedNone=bundle.label ) }} {{else}} diff --git a/app/assets/javascripts/discourse/app/templates/components/search-advanced-options.hbs b/app/assets/javascripts/discourse/app/templates/components/search-advanced-options.hbs index 5cafc9ede91..d3d0aa4aa06 100644 --- a/app/assets/javascripts/discourse/app/templates/components/search-advanced-options.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/search-advanced-options.hbs @@ -23,11 +23,11 @@ {{tag-chooser id="search-with-tags" tags=searchedTerms.tags - allowCreate=false everyTag=true unlimitedTagCount=true onChange=(action "onChangeSearchTermForTags") options=(hash + allowAny=false headerAriaLabel=(i18n "search.advanced.with_tags.aria_label") ) }} diff --git a/app/assets/javascripts/discourse/app/templates/components/tag-groups-form.hbs b/app/assets/javascripts/discourse/app/templates/components/tag-groups-form.hbs index 4437c845450..3fabd1678d1 100644 --- a/app/assets/javascripts/discourse/app/templates/components/tag-groups-form.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/tag-groups-form.hbs @@ -8,10 +8,10 @@ {{tag-chooser tags=buffered.tag_names everyTag=true - allowCreate=true unlimitedTagCount=true excludeSynonyms=true options=(hash + allowAny=true filterPlaceholder="tagging.groups.tags_placeholder" ) }} @@ -23,11 +23,11 @@ {{tag-chooser tags=buffered.parent_tag_name everyTag=true - maximum=1 - allowCreate=true excludeSynonyms=true options=(hash + allowAny=true filterPlaceholder="tagging.groups.parent_tag_placeholder" + maximum=1 ) }} diff --git a/app/assets/javascripts/discourse/app/templates/components/user-fields/dropdown.hbs b/app/assets/javascripts/discourse/app/templates/components/user-fields/dropdown.hbs index f34fe5267b7..540b3f9756e 100644 --- a/app/assets/javascripts/discourse/app/templates/components/user-fields/dropdown.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/user-fields/dropdown.hbs @@ -12,8 +12,10 @@ valueProperty=null nameProperty=null value=this.value - none=this.noneLabel onChange=(action (mut this.value)) + options=(hash + none=this.noneLabel + ) }}
{{html-safe this.field.description}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/user-fields/multiselect.hbs b/app/assets/javascripts/discourse/app/templates/components/user-fields/multiselect.hbs index f81fa36fd43..250206d8197 100644 --- a/app/assets/javascripts/discourse/app/templates/components/user-fields/multiselect.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/user-fields/multiselect.hbs @@ -12,8 +12,10 @@ valueProperty=null nameProperty=null value=this.value - none=this.noneLabel onChange=(action (mut this.value)) + options=(hash + none=this.noneLabel + ) }}
{{html-safe this.field.description}}
diff --git a/app/assets/javascripts/discourse/app/templates/composer.hbs b/app/assets/javascripts/discourse/app/templates/composer.hbs index b447c883c84..71d136501cb 100644 --- a/app/assets/javascripts/discourse/app/templates/composer.hbs +++ b/app/assets/javascripts/discourse/app/templates/composer.hbs @@ -118,8 +118,8 @@ {{category-chooser value=model.categoryId onChange=(action (mut model.categoryId)) - isDisabled=disableCategoryChooser options=(hash + disabled=disableCategoryChooser scopedCategoryId=scopedCategoryId prioritizedCategoryId=prioritizedCategoryId ) @@ -131,9 +131,9 @@ {{#if canEditTags}} {{mini-tag-chooser value=model.tags - isDisabled=disableTagsChooser onChange=(action (mut model.tags)) options=(hash + disabled=disableTagsChooser categoryId=model.categoryId minimum=model.minimumRequiredTags ) diff --git a/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs b/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs index 3b1206b1788..74a2ba061d0 100644 --- a/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs +++ b/app/assets/javascripts/discourse/app/templates/group/manage/tags.hbs @@ -13,9 +13,11 @@ {{tag-chooser tags=model.watching_tags blacklist=selectedTags - allowCreate=false everyTag=true unlimitedTagCount=true + options=(hash + allowAny=false + ) }}
@@ -29,9 +31,11 @@ {{tag-chooser tags=model.tracking_tags blacklist=selectedTags - allowCreate=false everyTag=true unlimitedTagCount=true + options=(hash + allowAny=false + ) }}
@@ -45,9 +49,11 @@ {{tag-chooser tags=model.watching_first_post_tags blacklist=selectedTags - allowCreate=false everyTag=true unlimitedTagCount=true + options=(hash + allowAny=false + ) }}
@@ -61,9 +67,11 @@ {{tag-chooser tags=model.regular_tags blacklist=selectedTags - allowCreate=false everyTag=true unlimitedTagCount=true + options=(hash + allowAny=false + ) }}
@@ -77,9 +85,11 @@ {{tag-chooser tags=model.muted_tags blacklist=selectedTags - allowCreate=false everyTag=true unlimitedTagCount=true + options=(hash + allowAny=false + ) }}
diff --git a/app/assets/javascripts/discourse/app/templates/modal/grant-badge.hbs b/app/assets/javascripts/discourse/app/templates/modal/grant-badge.hbs index 4a4d4646901..edfb21507b2 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/grant-badge.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/grant-badge.hbs @@ -5,11 +5,13 @@ {{else}}

{{combo-box - filterable=true value=selectedBadgeId content=grantableBadges - none="badges.none" onChange=(action (mut selectedBadgeId)) + options=(hash + filterable=true + none="badges.none" + ) }}

{{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/modal/move-to-topic.hbs b/app/assets/javascripts/discourse/app/templates/modal/move-to-topic.hbs index 9a867e9f813..777684f5fcf 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/move-to-topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/move-to-topic.hbs @@ -24,7 +24,7 @@ {{#if canTagMessages}} - {{tag-chooser tags=tags filterable=true}} + {{tag-chooser tags=tags}} {{/if}} {{/if}} @@ -89,7 +89,7 @@ }} {{#if canAddTags}} - {{tag-chooser tags=tags filterable=true categoryId=categoryId}} + {{tag-chooser tags=tags categoryId=categoryId}} {{/if}} {{/if}} @@ -104,7 +104,7 @@ {{#if canTagMessages}} - {{tag-chooser tags=tags filterable=true}} + {{tag-chooser tags=tags}} {{/if}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences/account.hbs b/app/assets/javascripts/discourse/app/templates/preferences/account.hbs index a8cdcbead13..c6671525f11 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/account.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/account.hbs @@ -154,8 +154,10 @@ {{combo-box value=newTitleInput content=model.availableTitles - none="user.title.none" onChange=(action (mut newTitleInput)) + options=(hash + none="user.title.none" + ) }}
@@ -171,8 +173,10 @@ {{flair-chooser value=newFlairGroupId content=model.availableFlairs - none="user.flair.none" onChange=(action (mut newFlairGroupId)) + options=(hash + none="user.flair.none" + ) }}
@@ -188,7 +192,10 @@ {{combo-box value=newPrimaryGroupInput content=model.filteredGroups - none="user.primary_group.none"}} + options=(hash + none="user.primary_group.none" + ) + }}
{{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences/emails.hbs b/app/assets/javascripts/discourse/app/templates/preferences/emails.hbs index 31bed6e6110..0d7f54528a7 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/emails.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/emails.hbs @@ -58,10 +58,12 @@
{{combo-box valueProperty="value" - filterable=true content=digestFrequencies value=model.user_option.digest_after_minutes onChange=(action (mut model.user_option.digest_after_minutes)) + options=(hash + filterable=true + ) }}
{{preference-checkbox labelKey="user.include_tl0_in_digests" disabled=model.user_option.mailing_list_mode checked=model.user_option.include_tl0_in_digests}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs b/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs index 59c5f2dbd38..e22d9c54d94 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs @@ -7,9 +7,11 @@ {{tag-chooser tags=model.watched_tags blockedTags=selectedTags - allowCreate=false everyTag=true unlimitedTagCount=true + options=(hash + allowAny=false + ) }}
@@ -20,9 +22,12 @@ {{tag-chooser tags=model.tracked_tags blockedTags=selectedTags - allowCreate=false everyTag=true - unlimitedTagCount=true}} + unlimitedTagCount=true + options=(hash + allowAny=false + ) + }}
{{i18n "user.tracked_tags_instructions"}}
@@ -32,9 +37,12 @@ {{tag-chooser tags=model.watching_first_post_tags blockedTags=selectedTags - allowCreate=false everyTag=true - unlimitedTagCount=true}} + unlimitedTagCount=true + options=(hash + allowAny=false + ) + }}
@@ -46,9 +54,12 @@ {{tag-chooser tags=model.muted_tags blockedTags=selectedTags - allowCreate=false everyTag=true - unlimitedTagCount=true}} + unlimitedTagCount=true + options=(hash + allowAny=false + ) + }}
{{i18n "user.muted_tags_instructions"}}
diff --git a/app/assets/javascripts/discourse/app/templates/review-index.hbs b/app/assets/javascripts/discourse/app/templates/review-index.hbs index b287e0c7717..2a13c4772b8 100644 --- a/app/assets/javascripts/discourse/app/templates/review-index.hbs +++ b/app/assets/javascripts/discourse/app/templates/review-index.hbs @@ -35,8 +35,10 @@ {{combo-box value=filterType content=allTypes - none="review.filters.type.all" onChange=(action (mut filterType)) + options=(hash + none="review.filters.type.all" + ) }} @@ -52,9 +54,11 @@
{{category-chooser - none="review.filters.all_categories" value=filterCategoryId onChange=(action (mut filterCategoryId)) + options=(hash + none="review.filters.all_categories" + ) }}
diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js index fbd64f98867..8ae75bbd32f 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js @@ -141,7 +141,7 @@ discourseModule( }, }); - componentTest("with allowUncategorized=null rootNone=true", { + componentTest("with allowUncategorized=null none=true", { template: hbs` {{category-chooser value=value diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit.js b/app/assets/javascripts/select-kit/addon/components/select-kit.js index ec9061b3419..3de48b094c3 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js @@ -1118,6 +1118,7 @@ export default Component.extend( none: "options.none", rootNone: "options.none", disabled: "options.disabled", + isDisabled: "options.disabled", rootNoneLabel: "options.none", showFullTitle: "options.showFullTitle", title: "options.translatedNone", diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-header.js b/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-header.js index 689da33de02..5bd78815f7b 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-header.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-header.js @@ -74,7 +74,7 @@ export default Component.extend(UtilsMixin, { }, keyDown(event) { - if (this.selectKit.isDisabled) { + if (this.selectKit.isDisabled || this.selectKit.options.disabled) { return; } diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs b/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs index 847a3b31cdf..025c14372f3 100644 --- a/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs +++ b/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs @@ -94,7 +94,10 @@ class="recurrence-input" value=recurring onChange=(action (mut recurring)) - none="discourse_local_dates.create.form.recurring_none"}} + options=(hash + none="discourse_local_dates.create.form.recurring_none" + ) + }} {{/unless}} @@ -134,10 +137,12 @@ valueProperty=null nameProperty=null class="timezones-input" - allowAny=false - maximum=5 content=allTimezones value=timezones + options=(hash + allowAny=false + maximum=5 + ) }} diff --git a/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/dropdowns.hbs b/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/dropdowns.hbs index 0e8d40f3608..23d1c30f54a 100644 --- a/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/dropdowns.hbs +++ b/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/dropdowns.hbs @@ -47,7 +47,13 @@ {{/styleguide-example}} {{#styleguide-example title="dropdown-select-box"}} - {{dropdown-select-box content=dummy.options title="Something" onChange=(action "dummy")}} + {{dropdown-select-box + content=dummy.options + onChange=(action "dummy") + options=(hash + translatedNone="Something" + ) + }} {{/styleguide-example}} {{#styleguide-example title="future-date-input-selector"}}