REVERT: revert change from action + mut to mut (#10844)

* Revert "FIX: fixes regression where wizard dropdown couldn't update (#10838)"

This reverts commit e3b2fc6074.

* Revert "DEV: replaces unecessary (action (mut .*)) by (mut .*) (#10822)"

This reverts commit c0350dc362.
This commit is contained in:
Joffrey JAFFEUX 2020-10-06 23:50:05 +02:00 committed by GitHub
parent a8c47e7c7f
commit 7b34433fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 93 additions and 93 deletions

View File

@ -17,7 +17,7 @@
options=(hash
maximum=1
)
onChange=(fn (mut buffered.icon))
onChange=(action (mut buffered.icon))
}}
<p class="help">{{i18n "admin.badges.icon_help"}}</p>
@ -35,7 +35,7 @@
name="badge_type_id"
value=buffered.badge_type_id
content=badgeTypes
onChange=(fn (mut buffered.badge_type_id))
onChange=(action (mut buffered.badge_type_id))
isDisabled=readOnly
}}
</div>
@ -50,7 +50,7 @@
content=badgeGroupings
class="badge-selector"
nameProperty="name"
onChange=(fn (mut buffered.badge_grouping_id))
onChange=(action (mut buffered.badge_grouping_id))
}}
{{d-button
class="btn-default"
@ -112,7 +112,7 @@
name="trigger"
value=buffered.trigger
content=badgeTriggers
onChange=(fn (mut buffered.trigger))
onChange=(action (mut buffered.trigger))
disabled=readOnly
}}
</div>

View File

@ -3,7 +3,7 @@
{{combo-box
content=fieldTypes
value=buffered.field_type
onChange=(fn (mut buffered.field_type))
onChange=(action (mut buffered.field_type))
}}
{{/admin-form-row}}

View File

@ -16,7 +16,7 @@
{{category-chooser
value=categoryId
class="small"
onChange=(mut categoryId)
onChange=(action (mut categoryId))
}}
</td>
<td class="editing-controls">

View File

@ -11,7 +11,7 @@
{{combo-box
content=permalinkTypes
value=permalinkType
onChange=(mut permalinkType)
onChange=(action (mut permalinkType))
class="permalink-type"
}}

View File

@ -4,7 +4,7 @@
{{combo-box
content=actionNames
value=actionName
onChange=(mut actionName)
onChange=(action (mut actionName))
}}
{{d-button class="btn-default" action=(action "submit") disabled=formSubmitted label="admin.logs.screened_ips.form.add"}}

View File

@ -1,7 +1,7 @@
{{category-chooser
value=value
allowUncategorized=true
onChange=(mut value)
onChange=(action (mut value))
}}
{{setting-validation-message message=validationMessage}}
<div class="desc">{{html-safe setting.description}}</div>

View File

@ -1,7 +1,7 @@
{{combo-box
content=setting.validValues
value=value
onChange=(mut value)
onChange=(action (mut value))
valueProperty=setting.computedValueProperty
nameProperty=setting.computedNameProperty
options=(hash

View File

@ -4,7 +4,7 @@
{{combo-box
content=model
value=selectedBaseThemeId
onChange=(mut selectedBaseThemeId)
onChange=(action (mut selectedBaseThemeId))
valueProperty="base_scheme_id"
}}
{{/d-modal-body}}

View File

@ -93,7 +93,7 @@
valueProperty="value"
content=createTypes
value=selectedType
onChange=(mut selectedType)
onChange=(action (mut selectedType))
}}
</div>
{{/if}}

View File

@ -1,10 +1,10 @@
<div class="admin-title">
{{period-chooser period=period onChange=(mut period)}}
{{period-chooser period=period onChange=(action (mut period))}}
{{combo-box
content=searchTypeOptions
value=searchType
class="search-logs-filter"
onChange=(mut searchType)
onChange=(action (mut searchType))
}}
</div>

View File

@ -1,10 +1,10 @@
<div class="admin-title">
{{period-chooser period=period onChange=(mut period)}}
{{period-chooser period=period onChange=(action (mut period))}}
{{combo-box
content=searchTypeOptions
value=searchType
class="search-logs-filter"
onChange=(mut searchType)
onChange=(action (mut searchType))
}}
</div>

View File

@ -20,7 +20,7 @@
filterable=true
value=selectedBadgeId
content=grantableBadges
onChange=(mut selectedBadgeId)
onChange=(action (mut selectedBadgeId))
}}
</div>
<div>

View File

@ -371,7 +371,7 @@
content=site.trustLevels
nameProperty="detailedName"
value=model.trustLevel.id
onChange=(mut model.trust_level)
onChange=(action (mut model.trust_level))
}}
{{#if model.dirty}}
@ -537,7 +537,7 @@
content=availableGroups
value=customGroupIdsBuffer
labelProperty="name"
onChange=(fn (mut customGroupIdsBuffer))
onChange=(action (mut customGroupIdsBuffer))
}}
</div>
{{#if customGroupsDirty}}
@ -555,7 +555,7 @@
content=model.customGroups
value=model.primary_group_id
none="admin.groups.no_primary"
onChange=(mut model.primary_group_id)
onChange=(action (mut model.primary_group_id))
}}
</div>
{{#if primaryGroupDirty}}

View File

@ -18,7 +18,7 @@
content=contentTypes
name="content-type"
value=model.content_type
onChange=(mut model.content_type)
onChange=(action (mut model.content_type))
}}
</div>
@ -53,7 +53,7 @@
<label>{{d-icon "circle" class="tracking"}}{{i18n "admin.web_hooks.categories_filter"}}</label>
{{category-selector
categories=model.categories
onChange=(mut model.categories)
onChange=(action (mut model.categories))
}}
<div class="instructions">{{i18n "admin.web_hooks.categories_filter_instructions"}}</div>
</div>

View File

@ -13,7 +13,7 @@
value=selectedUserBadgeId
nameProperty="badge.name"
content=selectableUserBadges
onChange=(fn (mut selectedUserBadgeId))
onChange=(action (mut selectedUserBadgeId))
}}
</div>
</div>

View File

@ -19,7 +19,7 @@
allowSubCategories=true
allowUncategorized=false
allowRestrictedCategories=true
onChange=(fn (mut category.parent_category_id))
onChange=(action (mut category.parent_category_id))
}}
</section>
{{/if}}

View File

@ -38,7 +38,7 @@
id="category-search-priority"
content=searchPrioritiesOptions
value=category.search_priority
onChange=(mut category.search_priority)
onChange=(action (mut category.search_priority))
options=(hash
placementStrategy="absolute"
)
@ -190,7 +190,7 @@
options=(hash
none="category.sort_options.default"
)
onChange=(mut category.sort_order)
onChange=(action (mut category.sort_order))
}}
{{#unless isDefaultSortOrder}}
{{combo-box
@ -201,7 +201,7 @@
none="category.sort_options.default"
placementStrategy="absolute"
)
onChange=(mut category.sort_ascending)
onChange=(action (mut category.sort_ascending))
}}
{{/unless}}
</div>

View File

@ -6,7 +6,7 @@
everyTag=true
excludeSynonyms=true
unlimitedTagCount=true
onChange=(mut category.allowed_tags)
onChange=(action (mut category.allowed_tags))
options=(hash
filterPlaceholder="category.tags_placeholder"
)

View File

@ -13,7 +13,7 @@
{{category-chooser
value=topicTimer.category_id
excludeCategoryId=excludeCategoryId
onChange=(fn (mut topicTimer.category_id))
onChange=(action (mut topicTimer.category_id))
}}
</div>
{{/if}}

View File

@ -18,7 +18,7 @@
name="icon"
value=model.flair_icon
options=(hash maximum=1)
onChange=(mut model.flair_icon)
onChange=(action (mut model.flair_icon))
}}
{{else if flairPreviewImage}}
{{image-uploader

View File

@ -63,7 +63,7 @@
valueProperty="value"
content=mailboxes
none="groups.manage.email.mailboxes.disabled"
onChange=(mut model.imap_mailbox_name)}}
onChange=(action (mut model.imap_mailbox_name))}}
{{else}}
{{i18n "groups.manage.email.mailboxes.none_found"}}
{{/if}}

View File

@ -10,7 +10,7 @@
content=visibilityLevelOptions
castInteger=true
class="groups-form-visibility-level"
onChange=(mut model.visibility_level)
onChange=(action (mut model.visibility_level))
}}
<div class="control-instructions">
@ -26,7 +26,7 @@
value=membersVisibilityLevel
content=visibilityLevelOptions
class="groups-form-members-visibility-level"
onChange=(mut model.members_visibility_level)
onChange=(action (mut model.members_visibility_level))
}}
<div class="control-instructions">
@ -45,7 +45,7 @@
value=mentionableLevel
content=aliasLevelOptions
class="groups-form-mentionable-level"
onChange=(mut model.mentionable_level)
onChange=(action (mut model.mentionable_level))
}}
</div>
@ -58,7 +58,7 @@
value=messageableLevel
content=aliasLevelOptions
class="groups-form-messageable-level"
onChange=(mut model.messageable_level)
onChange=(action (mut model.messageable_level))
}}
</div>

View File

@ -32,7 +32,7 @@
value=groupTrustLevel
content=trustLevelOptions
class="groups-form-grant-trust-level"
onChange=(mut model.grant_trust_level)
onChange=(action (mut model.grant_trust_level))
}}
<label>
{{input type="checkbox"

View File

@ -18,7 +18,7 @@
content=allGroups
value=groupIds
labelProperty="name"
onChange=(mut groupIds)}}
onChange=(action (mut groupIds))}}
</div>
{{/if}}

View File

@ -57,7 +57,7 @@
content=allGroups
value=groupIds
labelProperty="name"
onChange=(mut groupIds)
onChange=(action (mut groupIds))
}}
</div>
{{/if}}

View File

@ -13,7 +13,7 @@
nameProperty=null
value=this.value
none=this.noneLabel
onChange=(fn (mut this.value))
onChange=(action (mut this.value))
}}
<div class="instructions">{{html-safe this.field.description}}</div>
</div>

View File

@ -75,7 +75,7 @@
{{category-chooser
value=model.categoryId
tabindex="3"
onChange=(fn (mut model.categoryId))
onChange=(action (mut model.categoryId))
isDisabled=disableCategoryChooser
options=(hash
scopedCategoryId=scopedCategoryId
@ -89,7 +89,7 @@
value=model.tags
tabindex=4
isDisabled=disableTagsChooser
onChange=(fn (mut model.tags))
onChange=(action (mut model.tags))
options=(hash
categoryId=model.categoryId
minimum=model.minimumRequiredTags

View File

@ -59,7 +59,7 @@
value=sortOrder
content=sortOrders
castInteger=true
onChange=(mut sortOrder)
onChange=(action (mut sortOrder))
}}
</div>
</div>
@ -213,7 +213,7 @@
<div class="search-advanced-filters">
{{search-advanced-options
searchTerm=(readonly searchTerm)
onChangeSearchTerm=(fn (mut searchTerm))
onChangeSearchTerm=(action (mut searchTerm))
}}
</div>
{{/if}}
@ -221,8 +221,8 @@
<div class="search-advanced-filters">
{{search-advanced-options
searchTerm=(readonly searchTerm)
onChangeSearchTerm=(fn (mut searchTerm))
onChangeCategory=(fn (mut category))
onChangeSearchTerm=(action (mut searchTerm))
onChangeCategory=(action (mut category))
}}
{{d-button

View File

@ -10,7 +10,7 @@
{{category-selector
categories=model.watchingCategories
blockedCategories=selectedCategories
onChange=(mut model.watchingCategories)
onChange=(action (mut model.watchingCategories))
}}
<div class="control-instructions">
@ -24,7 +24,7 @@
{{category-selector
categories=model.trackingCategories
blockedCategories=selectedCategories
onChange=(mut model.trackingCategories)
onChange=(action (mut model.trackingCategories))
}}
<div class="control-instructions">
@ -38,7 +38,7 @@
{{category-selector
categories=model.watchingFirstPostCategories
blockedCategories=selectedCategories
onChange=(mut model.watchingFirstPostCategories)
onChange=(action (mut model.watchingFirstPostCategories))
}}
<div class="control-instructions">
@ -52,7 +52,7 @@
{{category-selector
categories=model.regularCategories
blockedCategories=selectedCategories
onChange=(mut model.regularCategories)
onChange=(action (mut model.regularCategories))
}}
<div class="control-instructions">
@ -66,7 +66,7 @@
{{category-selector
categories=model.mutedCategories
blockedCategories=selectedCategories
onChange=(mut model.mutedCategories)
onChange=(action (mut model.mutedCategories))
}}
<div class="control-instructions">

View File

@ -21,7 +21,7 @@
value=type
content=types
class="groups-header-filters-type"
onChange=(mut type)
onChange=(action (mut type))
options=(hash
clearable=true
none="groups.index.filter"

View File

@ -4,7 +4,7 @@
{{plugin-outlet name="users-top" connectorTagName="div" args=(hash model=model)}}
<div class="directory-controls">
{{period-chooser period=period onChange=(mut period) fullDay=false}}
{{period-chooser period=period onChange=(action (mut period)) fullDay=false}}
{{#if lastUpdatedAt}}
<div class="directory-last-updated">
{{i18n "directory.last_updated"}}

View File

@ -19,7 +19,7 @@
content=autoDeletePreferences
value=autoDeletePreference
class="bookmark-option-selector"
onChange=(fn (mut autoDeletePreference))
onChange=(action (mut autoDeletePreference))
}}
</div>

View File

@ -3,7 +3,7 @@
<p>
{{category-chooser
value=newCategoryId
onChange=(mut newCategoryId)
onChange=(action (mut newCategoryId))
}}
</p>

View File

@ -5,7 +5,7 @@
</div>
{{category-chooser
value=publicCategoryId
onChange=(mut publicCategoryId)
onChange=(action (mut publicCategoryId))
}}
{{/d-modal-body}}

View File

@ -9,7 +9,7 @@
value=selectedBadgeId
content=grantableBadges
none="badges.none"
onChange=(mut selectedBadgeId)
onChange=(action (mut selectedBadgeId))
}}
</p>
{{/if}}

View File

@ -81,7 +81,7 @@
{{category-chooser
value=categoryId
class="small"
onChange=(mut categoryId)
onChange=(action (mut categoryId))
}}
{{#if canAddTags}}
<label>{{i18n "tagging.tags"}}</label>

View File

@ -189,7 +189,7 @@
value=newTitleInput
content=model.availableTitles
none="user.title.none"
onChange=(mut newTitleInput)
onChange=(action (mut newTitleInput))
}}
</div>
</div>

View File

@ -9,7 +9,7 @@
{{category-selector
categories=model.watchedCategories
blockedCategories=selectedCategories
onChange=(mut model.watchedCategories)
onChange=(action (mut model.watchedCategories))
}}
</div>
<div class="instructions">{{i18n "user.watched_categories_instructions"}}</div>
@ -22,7 +22,7 @@
{{category-selector
categories=model.trackedCategories
blockedCategories=selectedCategories
onChange=(mut model.trackedCategories)
onChange=(action (mut model.trackedCategories))
}}
</div>
<div class="instructions">{{i18n "user.tracked_categories_instructions"}}</div>
@ -32,7 +32,7 @@
{{category-selector
categories=model.watchedFirstPostCategories
blockedCategories=selectedCategories
onChange=(mut model.watchedFirstPostCategories)
onChange=(action (mut model.watchedFirstPostCategories))
}}
</div>
<div class="instructions">{{i18n "user.watched_first_post_categories_instructions"}}</div>
@ -43,7 +43,7 @@
{{category-selector
categories=model.regularCategories
blockedCategories=selectedCategories
onChange=(mut model.regularCategories)
onChange=(action (mut model.regularCategories))
}}
</div>
<div class="instructions">{{i18n "user.regular_categories_instructions"}}</div>
@ -56,7 +56,7 @@
{{category-selector
categories=model.mutedCategories
blockedCategories=selectedCategories
onChange=(mut model.mutedCategories)
onChange=(action (mut model.mutedCategories))
}}
</div>
<div class="instructions">{{i18n (if hideMutedTags "user.muted_categories_instructions" "user.muted_categories_instructions_dont_hide")}}</div>

View File

@ -15,7 +15,7 @@
content=emailLevelOptions
value=model.user_option.email_messages_level
id="user-email-messages-level"
onChange=(mut model.user_option.email_messages_level)
onChange=(action (mut model.user_option.email_messages_level))
}}
{{#if emailMessagesLevelAway}}
<div class="instructions">{{emailFrequencyInstructions}}</div>
@ -29,7 +29,7 @@
content=emailLevelOptions
value=model.user_option.email_level
id="user-email-level"
onChange=(mut model.user_option.email_level)
onChange=(action (mut model.user_option.email_level))
}}
{{#if emailLevelAway}}
<div class="instructions">{{emailFrequencyInstructions}}</div>
@ -42,7 +42,7 @@
valueProperty="value"
content=previousRepliesOptions
value=model.user_option.email_previous_replies
onChange=(mut model.user_option.email_previous_replies)
onChange=(action (mut model.user_option.email_previous_replies))
}}
</div>
{{preference-checkbox labelKey="user.email_in_reply_to" checked=model.user_option.email_in_reply_to}}
@ -61,7 +61,7 @@
filterable=true
content=digestFrequencies
value=model.user_option.digest_after_minutes
onChange=(mut model.user_option.digest_after_minutes)
onChange=(action (mut model.user_option.digest_after_minutes))
}}
</div>
{{preference-checkbox labelKey="user.include_tl0_in_digests" disabled=model.user_option.mailing_list_mode checked=model.user_option.include_tl0_in_digests}}
@ -80,7 +80,7 @@
valueProperty="value"
content=mailingListModeOptions
value=model.user_option.mailing_list_mode_frequency
onChange=(mut model.user_option.mailing_list_mode_frequency)
onChange=(action (mut model.user_option.mailing_list_mode_frequency))
}}
</div>
{{/if}}

View File

@ -101,7 +101,7 @@
valueProperty="value"
content=availableLocales
value=model.locale
onChange=(fn (mut model.locale))
onChange=(action (mut model.locale))
options=(hash
filterable=true
none="user.locale.default"
@ -121,7 +121,7 @@
content=userSelectableHome
valueProperty="value"
value=homepageId
onChange=(fn (mut model.user_option.homepage_id))
onChange=(action (mut model.user_option.homepage_id))
}}
</div>
</div>
@ -147,7 +147,7 @@
content=titleCountModes
value=model.user_option.title_count_mode
id="user-title-count-mode"
onChange=(fn (mut model.user_option.title_count_mode))
onChange=(action (mut model.user_option.title_count_mode))
}}
</div>
{{preference-checkbox labelKey="user.skip_new_user_tips.description" checked=model.user_option.skip_new_user_tips class="pref-new-user-tips"}}

View File

@ -8,7 +8,7 @@
valueProperty="value"
content=considerNewTopicOptions
value=model.user_option.new_topic_duration_minutes
onChange=(mut model.user_option.new_topic_duration_minutes)
onChange=(action (mut model.user_option.new_topic_duration_minutes))
}}
</div>
@ -18,7 +18,7 @@
valueProperty="value"
content=autoTrackDurations
value=model.user_option.auto_track_topics_after_msecs
onChange=(mut model.user_option.auto_track_topics_after_msecs)
onChange=(action (mut model.user_option.auto_track_topics_after_msecs))
}}
</div>
@ -28,7 +28,7 @@
valueProperty="value"
content=notificationLevelsForReplying
value=model.user_option.notification_level_when_replying
onChange=(mut model.user_option.notification_level_when_replying)
onChange=(action (mut model.user_option.notification_level_when_replying))
}}
</div>
@ -38,7 +38,7 @@
valueProperty="value"
content=likeNotificationFrequencies
value=model.user_option.like_notification_frequency
onChange=(mut model.user_option.like_notification_frequency)
onChange=(action (mut model.user_option.like_notification_frequency))
}}
</div>
</div>

View File

@ -11,7 +11,7 @@
<label class="control-label">{{i18n "user.timezone"}}</label>
{{timezone-input
value=model.user_option.timezone
onChange=(mut model.user_option.timezone)
onChange=(action (mut model.user_option.timezone))
class="input-xxlarge"
}}
{{d-button icon="globe" label="user.use_current_timezone" action=(action "useCurrentTimezone") }}

View File

@ -22,7 +22,7 @@
{{combo-box
value=filterStatus
content=statuses
onChange=(mut filterStatus)
onChange=(action (mut filterStatus))
}}
</div>
@ -36,7 +36,7 @@
value=filterType
content=allTypes
none="review.filters.type.all"
onChange=(mut filterType)
onChange=(action (mut filterType))
}}
</div>
@ -45,7 +45,7 @@
{{combo-box
value=filterPriority
content=priorities
onChange=(mut filterPriority)
onChange=(action (mut filterPriority))
}}
</div>
@ -54,7 +54,7 @@
{{category-chooser
none="review.filters.all_categories"
value=filterCategoryId
onChange=(mut filterCategoryId)
onChange=(action (mut filterCategoryId))
}}
</div>
@ -91,7 +91,7 @@
{{combo-box
value=filterSortOrder
content=sortOrders
onChange=(mut filterSortOrder)
onChange=(action (mut filterSortOrder))
}}
</div>
{{/if}}

View File

@ -8,7 +8,7 @@
{{combo-box
value=rst.reviewable_priority
content=settings.reviewable_priorities
onChange=(mut rst.reviewable_priority)
onChange=(action (mut rst.reviewable_priority))
}}
</div>
</div>

View File

@ -9,7 +9,7 @@
{{/if}}
<div class="user-notifications-filter-select-kit">
{{notifications-filter value=filter onChange=(fn (mut filter))}}
{{notifications-filter value=filter onChange=(action (mut filter))}}
</div>
{{#if hasFilteredNotifications}}

View File

@ -5,7 +5,7 @@
{{plugin-outlet name="users-top" connectorTagName="div" args=(hash model=model)}}
<div class="directory-controls">
<div class="period-controls">
{{period-chooser period=period onChange=(mut period) fullDay=false}}
{{period-chooser period=period onChange=(action (mut period)) fullDay=false}}
{{#if lastUpdatedAt}}
<div class="directory-last-updated">
{{i18n "directory.last_updated"}}

View File

@ -16,7 +16,7 @@
value=inviteRole
content=roles
nameProperty="label"
onChange=(mut inviteRole)
onChange=(action (mut inviteRole))
}}
<button type="button" class="wizard-btn small add-user" {{action "addUser"}}>

View File

@ -5,5 +5,5 @@
content=field.choices
nameProperty="label"
tabindex="9"
onChange=(fn (mut field.value))
onChange=(action (mut field.value))
}}

View File

@ -44,7 +44,7 @@
{{timezone-input
options=(hash icon="globe")
value=timezone
onChange=(mut timezone)
onChange=(action (mut timezone))
}}
{{/unless}}
</div>
@ -74,7 +74,7 @@
{{timezone-input
value=timezone
options=(hash icon="globe")
onChange=(mut timezone)
onChange=(action (mut timezone))
}}
{{/if}}
</div>
@ -92,7 +92,7 @@
content=recurringOptions
class="recurrence-input"
value=recurring
onChange=(mut recurring)
onChange=(action (mut recurring))
none="discourse_local_dates.create.form.recurring_none"}}
</div>
</div>

View File

@ -8,7 +8,7 @@
value=pollType
valueProperty="value"
class="poll-type"
onChange=(mut pollType)
onChange=(action (mut pollType))
}}
</div>
@ -19,7 +19,7 @@
value=pollResult
class="poll-result"
valueProperty="value"
onChange=(mut pollResult)
onChange=(action (mut pollResult))
}}
</div>
@ -28,7 +28,7 @@
{{group-chooser
content=siteGroups
value=pollGroups
onChange=(mut pollGroups)
onChange=(action (mut pollGroups))
labelProperty="name"
valueProperty="name"}}
</div>
@ -41,7 +41,7 @@
content=pollChartTypes
value=chartType
valueProperty="value"
onChange=(mut chartType)
onChange=(action (mut chartType))
}}
</div>
{{/unless}}