mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
75e4b8f330
We were displaying the "outputs HTML" option in all watched word actions, while it's only supposed to be used in the Replace action.
104 lines
2.7 KiB
Handlebars
104 lines
2.7 KiB
Handlebars
<div class="watched-word-input">
|
|
<label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label>
|
|
<WatchedWords
|
|
@id="watched-words"
|
|
@value={{this.words}}
|
|
@onChange={{fn (mut this.words)}}
|
|
@options={{hash
|
|
filterPlaceholder=this.placeholderKey
|
|
disabled=this.formSubmitted
|
|
}}
|
|
/>
|
|
</div>
|
|
|
|
{{#if this.canReplace}}
|
|
<div class="watched-word-input">
|
|
<label for="watched-replacement">{{i18n
|
|
"admin.watched_words.form.replace_label"
|
|
}}</label>
|
|
<TextField
|
|
@id="watched-replacement"
|
|
@value={{this.replacement}}
|
|
@disabled={{this.formSubmitted}}
|
|
@autocorrect="off"
|
|
@autocapitalize="off"
|
|
@placeholderKey="admin.watched_words.form.replace_placeholder"
|
|
class="watched-word-input-field"
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if this.canTag}}
|
|
<div class="watched-word-input">
|
|
<label for="watched-tag">{{i18n
|
|
"admin.watched_words.form.tag_label"
|
|
}}</label>
|
|
<TagChooser
|
|
@id="watched-tag"
|
|
@tags={{this.selectedTags}}
|
|
@onChange={{this.changeSelectedTags}}
|
|
@everyTag={{true}}
|
|
@options={{hash allowAny=true disabled=this.formSubmitted}}
|
|
class="watched-word-input-field"
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if this.canLink}}
|
|
<div class="watched-word-input">
|
|
<label for="watched-link">{{i18n
|
|
"admin.watched_words.form.link_label"
|
|
}}</label>
|
|
<TextField
|
|
@id="watched-link"
|
|
@value={{this.replacement}}
|
|
@disabled={{this.formSubmitted}}
|
|
@autocorrect="off"
|
|
@autocapitalize="off"
|
|
@placeholderKey="admin.watched_words.form.link_placeholder"
|
|
class="watched-word-input-field"
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="watched-word-input">
|
|
<label for="watched-case-sensitivity">{{i18n
|
|
"admin.watched_words.form.case_sensitivity_label"
|
|
}}</label>
|
|
<label class="case-sensitivity-checkbox checkbox-label">
|
|
<Input
|
|
@type="checkbox"
|
|
@checked={{this.isCaseSensitive}}
|
|
disabled={{this.formSubmitted}}
|
|
/>
|
|
{{i18n "admin.watched_words.form.case_sensitivity_description"}}
|
|
</label>
|
|
</div>
|
|
|
|
{{#if this.canReplace}}
|
|
<div class="watched-word-input">
|
|
<label for="watched-html">{{i18n
|
|
"admin.watched_words.form.html_label"
|
|
}}</label>
|
|
<label class="html-checkbox checkbox-label">
|
|
<Input
|
|
@type="checkbox"
|
|
@checked={{this.isHtml}}
|
|
disabled={{this.formSubmitted}}
|
|
/>
|
|
{{i18n "admin.watched_words.form.html_description"}}
|
|
</label>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<DButton
|
|
@action={{this.submitForm}}
|
|
@disabled={{this.submitDisabled}}
|
|
@label="admin.watched_words.form.add"
|
|
type="submit"
|
|
class="btn-primary"
|
|
/>
|
|
|
|
{{#if this.showMessage}}
|
|
<span class="success-message">{{this.message}}</span>
|
|
{{/if}} |