2021-02-25 07:00:58 -05:00
|
|
|
<div class="watched-word-input">
|
|
|
|
<label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label>
|
2024-04-29 06:20:55 -04:00
|
|
|
<WatchedWords
|
|
|
|
@id="watched-words"
|
|
|
|
@value={{this.words}}
|
2024-05-08 14:26:48 -04:00
|
|
|
@onChange={{fn (mut this.words)}}
|
2024-04-29 06:20:55 -04:00
|
|
|
@options={{hash
|
|
|
|
filterPlaceholder=this.placeholderKey
|
|
|
|
disabled=this.formSubmitted
|
|
|
|
}}
|
2022-07-05 13:41:31 -04:00
|
|
|
/>
|
2021-02-25 07:00:58 -05:00
|
|
|
</div>
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.canReplace}}
|
2021-02-25 07:00:58 -05:00
|
|
|
<div class="watched-word-input">
|
2021-06-02 01:36:49 -04:00
|
|
|
<label for="watched-replacement">{{i18n
|
|
|
|
"admin.watched_words.form.replace_label"
|
|
|
|
}}</label>
|
2022-07-05 13:41:31 -04:00
|
|
|
<TextField
|
|
|
|
@id="watched-replacement"
|
|
|
|
@value={{this.replacement}}
|
|
|
|
@disabled={{this.formSubmitted}}
|
|
|
|
@autocorrect="off"
|
|
|
|
@autocapitalize="off"
|
|
|
|
@placeholderKey="admin.watched_words.form.replace_placeholder"
|
2023-12-12 07:09:05 -05:00
|
|
|
class="watched-word-input-field"
|
2022-07-05 13:41:31 -04:00
|
|
|
/>
|
2021-02-25 07:00:58 -05:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.canTag}}
|
2021-03-03 03:53:38 -05:00
|
|
|
<div class="watched-word-input">
|
|
|
|
<label for="watched-tag">{{i18n
|
|
|
|
"admin.watched_words.form.tag_label"
|
|
|
|
}}</label>
|
2022-07-05 13:41:31 -04:00
|
|
|
<TagChooser
|
|
|
|
@id="watched-tag"
|
|
|
|
@tags={{this.selectedTags}}
|
2023-11-08 04:53:06 -05:00
|
|
|
@onChange={{this.changeSelectedTags}}
|
2022-07-05 13:41:31 -04:00
|
|
|
@everyTag={{true}}
|
|
|
|
@options={{hash allowAny=true disabled=this.formSubmitted}}
|
2023-12-12 07:09:05 -05:00
|
|
|
class="watched-word-input-field"
|
2022-06-30 06:30:50 -04:00
|
|
|
/>
|
2021-06-02 01:36:49 -04:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.canLink}}
|
2021-06-02 01:36:49 -04:00
|
|
|
<div class="watched-word-input">
|
2022-07-06 04:37:54 -04:00
|
|
|
<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"
|
2023-12-12 07:09:05 -05:00
|
|
|
class="watched-word-input-field"
|
2022-07-06 04:37:54 -04:00
|
|
|
/>
|
2021-03-03 03:53:38 -05:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-08-02 04:06:03 -04:00
|
|
|
<div class="watched-word-input">
|
|
|
|
<label for="watched-case-sensitivity">{{i18n
|
|
|
|
"admin.watched_words.form.case_sensitivity_label"
|
|
|
|
}}</label>
|
2024-02-15 11:27:51 -05:00
|
|
|
<label class="case-sensitivity-checkbox checkbox-label">
|
2022-08-02 04:06:03 -04:00
|
|
|
<Input
|
|
|
|
@type="checkbox"
|
|
|
|
@checked={{this.isCaseSensitive}}
|
|
|
|
disabled={{this.formSubmitted}}
|
|
|
|
/>
|
|
|
|
{{i18n "admin.watched_words.form.case_sensitivity_description"}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2024-07-25 15:25:56 -04:00
|
|
|
{{#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}}
|
2024-05-06 11:08:34 -04:00
|
|
|
|
2022-11-08 18:38:11 -05:00
|
|
|
<DButton
|
2023-08-31 05:49:35 -04:00
|
|
|
@action={{this.submitForm}}
|
2022-11-08 18:38:11 -05:00
|
|
|
@disabled={{this.submitDisabled}}
|
|
|
|
@label="admin.watched_words.form.add"
|
2023-08-31 05:49:35 -04:00
|
|
|
type="submit"
|
|
|
|
class="btn-primary"
|
2022-11-08 18:38:11 -05:00
|
|
|
/>
|
2017-06-28 16:56:44 -04:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.showMessage}}
|
|
|
|
<span class="success-message">{{this.message}}</span>
|
2017-06-28 16:56:44 -04:00
|
|
|
{{/if}}
|