mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use class attribute instead of @class arg (#24804)
This commit is contained in:
@@ -6,15 +6,15 @@
|
||||
<ComboBox
|
||||
@content={{this.reasons}}
|
||||
@value={{this.selectedReason}}
|
||||
@class="suspend-reason"
|
||||
@onChange={{this.setSelectedReason}}
|
||||
class="suspend-reason"
|
||||
/>
|
||||
|
||||
{{#if this.isCustomReason}}
|
||||
<TextField
|
||||
@value={{this.customReason}}
|
||||
@class="suspend-reason"
|
||||
@onChange={{this.setCustomReason}}
|
||||
class="suspend-reason"
|
||||
/>
|
||||
{{/if}}
|
||||
{{else if (eq @penaltyType "silence")}}
|
||||
@@ -24,16 +24,16 @@
|
||||
<ComboBox
|
||||
@content={{this.reasons}}
|
||||
@value={{this.selectedReason}}
|
||||
@class="silence-reason"
|
||||
@onChange={{this.setSelectedReason}}
|
||||
class="silence-reason"
|
||||
/>
|
||||
|
||||
{{#if this.isCustomReason}}
|
||||
<TextField
|
||||
@value={{this.customReason}}
|
||||
@class="silence-reason"
|
||||
@onChange={{this.setCustomReason}}
|
||||
@placeholderKey="admin.user.silence_reason_placeholder"
|
||||
class="silence-reason"
|
||||
/>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{{#if this.onlyHex}}<span class="add-on">#</span>{{/if}}<TextField
|
||||
@class="hex-input"
|
||||
@value={{this.hexValue}}
|
||||
@maxlength={{this.maxlength}}
|
||||
@input={{this.onHexInput}}
|
||||
class="hex-input"
|
||||
/>
|
||||
<input
|
||||
class="picker"
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
||||
<CategoryChooser
|
||||
@value={{this.categoryId}}
|
||||
@class="small"
|
||||
@onChange={{action (mut this.categoryId)}}
|
||||
class="small"
|
||||
/>
|
||||
</td>
|
||||
<td class="editing-controls">
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<TextField
|
||||
@value={{this.templateName}}
|
||||
@name="template-name"
|
||||
@class="form-templates__form-name-input"
|
||||
@placeholderKey="admin.form_templates.new_template_form.name.placeholder"
|
||||
class="form-templates__form-name-input"
|
||||
/>
|
||||
</div>
|
||||
<div class="control-group form-templates__editor">
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
<div class="penalty-duration-controls">
|
||||
{{#if (eq @model.penaltyType "suspend")}}
|
||||
<FutureDateInput
|
||||
@class="suspend-until"
|
||||
@label="admin.user.suspend_duration"
|
||||
@clearable={{false}}
|
||||
@input={{this.penalizeUntil}}
|
||||
@onChangeInput={{action (mut this.penalizeUntil)}}
|
||||
class="suspend-until"
|
||||
/>
|
||||
{{else if (eq @model.penaltyType "silence")}}
|
||||
<FutureDateInput
|
||||
@class="silence-until"
|
||||
@label="admin.user.silence_duration"
|
||||
@clearable={{false}}
|
||||
@input={{this.penalizeUntil}}
|
||||
@onChangeInput={{action (mut this.penalizeUntil)}}
|
||||
class="silence-until"
|
||||
/>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
@@ -5,27 +5,27 @@
|
||||
<TextField
|
||||
@value={{this.url}}
|
||||
@disabled={{this.formSubmitted}}
|
||||
@class="permalink-url"
|
||||
@placeholderKey="admin.permalink.url"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
class="permalink-url"
|
||||
/>
|
||||
|
||||
<ComboBox
|
||||
@content={{this.permalinkTypes}}
|
||||
@value={{this.permalinkType}}
|
||||
@onChange={{action (mut this.permalinkType)}}
|
||||
@class="permalink-type"
|
||||
class="permalink-type"
|
||||
/>
|
||||
|
||||
<TextField
|
||||
@value={{this.permalinkTypeValue}}
|
||||
@disabled={{this.formSubmitted}}
|
||||
@class="permalink-destination"
|
||||
@placeholderKey={{this.permalinkTypePlaceholder}}
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
@keyDown={{this.submitFormOnEnter}}
|
||||
class="permalink-destination"
|
||||
/>
|
||||
|
||||
<DButton
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<TextField
|
||||
@value={{this.ip_address}}
|
||||
@disabled={{this.formSubmitted}}
|
||||
@class="ip-address-input"
|
||||
@placeholderKey="admin.logs.screened_ips.form.ip_address"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
class="ip-address-input"
|
||||
/>
|
||||
|
||||
<ComboBox
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<div class="value">
|
||||
<TextField
|
||||
@value={{this.newKey}}
|
||||
@class="new-value-input key"
|
||||
@placeholder={{this.setting.placeholder.key}}
|
||||
class="new-value-input key"
|
||||
/>
|
||||
<Input
|
||||
@type="password"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
</label>
|
||||
<TextField
|
||||
@value={{this.reason}}
|
||||
@class="silence-reason"
|
||||
@placeholderKey="admin.user.silence_reason_placeholder"
|
||||
class="silence-reason"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
@id="watched-word"
|
||||
@value={{this.word}}
|
||||
@disabled={{this.formSubmitted}}
|
||||
@class="watched-word-input-field"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
@placeholderKey={{this.placeholderKey}}
|
||||
@title={{i18n this.placeholderKey}}
|
||||
class="watched-word-input-field"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
@id="watched-replacement"
|
||||
@value={{this.replacement}}
|
||||
@disabled={{this.formSubmitted}}
|
||||
@class="watched-word-input-field"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
@placeholderKey="admin.watched_words.form.replace_placeholder"
|
||||
class="watched-word-input-field"
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -36,11 +36,11 @@
|
||||
}}</label>
|
||||
<TagChooser
|
||||
@id="watched-tag"
|
||||
@class="watched-word-input-field"
|
||||
@tags={{this.selectedTags}}
|
||||
@onChange={{this.changeSelectedTags}}
|
||||
@everyTag={{true}}
|
||||
@options={{hash allowAny=true disabled=this.formSubmitted}}
|
||||
class="watched-word-input-field"
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -54,10 +54,10 @@
|
||||
@id="watched-link"
|
||||
@value={{this.replacement}}
|
||||
@disabled={{this.formSubmitted}}
|
||||
@class="watched-word-input-field"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
@placeholderKey="admin.watched_words.form.link_placeholder"
|
||||
class="watched-word-input-field"
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
@type="badge_image"
|
||||
@onUploadDone={{action "setImage"}}
|
||||
@onUploadDeleted={{action "removeImage"}}
|
||||
@class="no-repeat contain-image"
|
||||
class="no-repeat contain-image"
|
||||
/>
|
||||
<div class="control-instructions">
|
||||
<p class="help">{{i18n "admin.badges.image_help"}}</p>
|
||||
@@ -98,7 +98,7 @@
|
||||
@name="badge_grouping_id"
|
||||
@value={{this.buffered.badge_grouping_id}}
|
||||
@content={{this.badgeGroupings}}
|
||||
@class="badge-selector"
|
||||
class="badge-selector"
|
||||
@nameProperty="name"
|
||||
@onChange={{action (mut this.buffered.badge_grouping_id)}}
|
||||
/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="color-scheme show-current-style">
|
||||
<div class="admin-container">
|
||||
<h1>{{#if this.model.theme_id}}{{this.model.name}}{{else}}<TextField
|
||||
@class="style-name"
|
||||
@value={{this.model.name}}
|
||||
class="style-name"
|
||||
/>{{/if}}</h1>
|
||||
<div class="controls">
|
||||
{{#unless this.model.theme_id}}
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
<ThemeSettingRelativesSelector
|
||||
@setting={{this.relativesSelectorSettingsForComponent}}
|
||||
@model={{this.model}}
|
||||
@class="theme-setting"
|
||||
class="theme-setting"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
@@ -328,7 +328,7 @@
|
||||
<ThemeSettingRelativesSelector
|
||||
@setting={{this.relativesSelectorSettingsForTheme}}
|
||||
@model={{this.model}}
|
||||
@class="theme-setting"
|
||||
class="theme-setting"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
@@ -430,7 +430,7 @@
|
||||
<ThemeSettingEditor
|
||||
@setting={{setting}}
|
||||
@model={{this.model}}
|
||||
@class="theme-setting control-unit"
|
||||
class="theme-setting control-unit"
|
||||
/>
|
||||
{{/each}}
|
||||
</section>
|
||||
@@ -449,7 +449,7 @@
|
||||
<ThemeTranslation
|
||||
@translation={{translation}}
|
||||
@model={{this.model}}
|
||||
@class="theme-translation"
|
||||
class="theme-translation"
|
||||
/>
|
||||
{{/each}}
|
||||
</section>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<div class="filter-screened-ip-address inline-form">
|
||||
<TextField
|
||||
@value={{this.filter}}
|
||||
@class="ip-address-input"
|
||||
@placeholderKey="admin.logs.screened_ips.form.filter"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
class="ip-address-input"
|
||||
/>
|
||||
<DButton
|
||||
@action={{this.exportScreenedIpList}}
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<div class="permalink-search">
|
||||
<TextField
|
||||
@value={{this.filter}}
|
||||
@class="url-input"
|
||||
@placeholderKey="admin.permalink.form.filter"
|
||||
@autocorrect="off"
|
||||
@autocapitalize="off"
|
||||
class="url-input"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="admin-controls">
|
||||
<HorizontalOverflowNav @className="main-nav nav plugin-nav">
|
||||
<HorizontalOverflowNav class="main-nav nav plugin-nav">
|
||||
<NavItem @route="adminPlugins.index" @label="admin.plugins.title" />
|
||||
{{#each this.adminRoutes as |route|}}
|
||||
<NavItem @route={{route.full_location}} @label={{route.label}} />
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<ComboBox
|
||||
@content={{this.searchTypeOptions}}
|
||||
@value={{this.searchType}}
|
||||
@class="search-logs-filter"
|
||||
@onChange={{action (mut this.searchType)}}
|
||||
class="search-logs-filter"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<ComboBox
|
||||
@content={{this.searchTypeOptions}}
|
||||
@value={{this.searchType}}
|
||||
@class="search-logs-filter"
|
||||
@onChange={{action (mut this.searchType)}}
|
||||
class="search-logs-filter"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@id="setting-filter"
|
||||
@value={{this.filter}}
|
||||
@placeholderKey="type_to_filter"
|
||||
@class="no-blur"
|
||||
class="no-blur"
|
||||
/>
|
||||
<DButton
|
||||
@action={{this.clearFilter}}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<ExpandingTextArea
|
||||
@value={{this.buffered.value}}
|
||||
@rows="1"
|
||||
@class="site-text-value"
|
||||
class="site-text-value"
|
||||
/>
|
||||
|
||||
{{#if this.siteText.has_interpolation_keys}}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<TextField
|
||||
@value={{this.q}}
|
||||
@placeholderKey="admin.site_text.search"
|
||||
@class="no-blur site-text-search"
|
||||
@autofocus="true"
|
||||
@key-up={{this.search}}
|
||||
class="no-blur site-text-search"
|
||||
/>
|
||||
|
||||
<div class="reseed">
|
||||
@@ -27,8 +27,8 @@
|
||||
@content={{this.availableLocales}}
|
||||
@value={{this.locale}}
|
||||
@onChange={{this.updateLocale}}
|
||||
@class="locale-search"
|
||||
@options={{hash filterable=true}}
|
||||
class="locale-search"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
/>
|
||||
</div>
|
||||
<LoadMore
|
||||
@class="users-list-container"
|
||||
@selector=".directory-table .directory-table__cell"
|
||||
@action={{action "loadMore"}}
|
||||
class="users-list-container"
|
||||
>
|
||||
{{#if this.model}}
|
||||
<ResponsiveTable
|
||||
@@ -46,24 +46,24 @@
|
||||
>
|
||||
<:header>
|
||||
<TableHeaderToggle
|
||||
@class="directory-table__column-header--username"
|
||||
@field="username"
|
||||
@labelKey="username"
|
||||
@order={{this.order}}
|
||||
@asc={{this.asc}}
|
||||
@automatic={{true}}
|
||||
class="directory-table__column-header--username"
|
||||
/>
|
||||
<TableHeaderToggle
|
||||
@class={{if
|
||||
this.showEmails
|
||||
"directory-table__column-header--email"
|
||||
"hidden"
|
||||
}}
|
||||
@field="email"
|
||||
@labelKey="email"
|
||||
@order={{this.order}}
|
||||
@asc={{this.asc}}
|
||||
@automatic={{true}}
|
||||
class={{if
|
||||
this.showEmails
|
||||
"directory-table__column-header--email"
|
||||
"hidden"
|
||||
}}
|
||||
/>
|
||||
<TableHeaderToggle
|
||||
@field="last_emailed"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TextField
|
||||
@value={{this.filter}}
|
||||
@placeholderKey="admin.watched_words.search"
|
||||
@class="no-blur"
|
||||
class="no-blur"
|
||||
/>
|
||||
<DButton
|
||||
@action={{this.clearFilter}}
|
||||
|
||||
Reference in New Issue
Block a user