2021-02-25 07:00:58 -05:00
|
|
|
<div class="watched-word-input">
|
|
|
|
<label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label>
|
2022-07-05 13:41:31 -04:00
|
|
|
<TextField
|
|
|
|
@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}}
|
|
|
|
/>
|
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}}
|
|
|
|
@class="watched-word-input-field"
|
|
|
|
@autocorrect="off"
|
|
|
|
@autocapitalize="off"
|
|
|
|
@placeholderKey="admin.watched_words.form.replace_placeholder"
|
|
|
|
/>
|
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"
|
|
|
|
@class="watched-word-input-field"
|
|
|
|
@tags={{this.selectedTags}}
|
|
|
|
@onChange={{action "changeSelectedTags"}}
|
|
|
|
@everyTag={{true}}
|
|
|
|
@options={{hash allowAny=true disabled=this.formSubmitted}}
|
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}}
|
|
|
|
@class="watched-word-input-field"
|
|
|
|
@autocorrect="off"
|
|
|
|
@autocapitalize="off"
|
|
|
|
@placeholderKey="admin.watched_words.form.link_placeholder"
|
|
|
|
/>
|
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>
|
|
|
|
<label class="case-sensitivity-checkbox">
|
|
|
|
<Input
|
|
|
|
@type="checkbox"
|
|
|
|
@checked={{this.isCaseSensitive}}
|
|
|
|
disabled={{this.formSubmitted}}
|
|
|
|
/>
|
|
|
|
{{i18n "admin.watched_words.form.case_sensitivity_description"}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2022-11-08 18:38:11 -05:00
|
|
|
<DButton
|
|
|
|
@type="submit"
|
|
|
|
@class="btn btn-primary"
|
2023-02-23 10:32:53 -05:00
|
|
|
@action={{action "submitForm"}}
|
2022-11-08 18:38:11 -05:00
|
|
|
@disabled={{this.submitDisabled}}
|
|
|
|
@label="admin.watched_words.form.add"
|
|
|
|
/>
|
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}}
|