mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 05:33:44 +08:00
efd6394cd8
The server cannot always determine when a watched word regular expression is invalid and this commit implements the check on the client side.
49 lines
1.3 KiB
Handlebars
49 lines
1.3 KiB
Handlebars
{{#if regexpError}}
|
|
<div class="alert alert-error">{{regexpError}}</div>
|
|
{{/if}}
|
|
|
|
<div class="watched-word-controls">
|
|
{{d-button
|
|
class="btn-default download-link"
|
|
href=downloadLink
|
|
icon="download"
|
|
label="admin.watched_words.download"}}
|
|
|
|
{{watched-word-uploader uploading=uploading actionKey=actionNameKey done=(action "uploadComplete")}}
|
|
|
|
{{d-button
|
|
class="watched-word-test"
|
|
label="admin.watched_words.test.button_label"
|
|
icon="far-eye"
|
|
action=(action "test")}}
|
|
|
|
{{d-button
|
|
class="btn-danger clear-all"
|
|
label="admin.watched_words.clear_all"
|
|
icon="trash-alt"
|
|
action=(action "clearAll")}}
|
|
</div>
|
|
|
|
<p class="about">{{actionDescription}}</p>
|
|
|
|
{{watched-word-form
|
|
actionKey=actionNameKey
|
|
action=(action "recordAdded")
|
|
filteredContent=currentAction.words
|
|
}}
|
|
|
|
{{#if currentAction.words}}
|
|
<label class="show-words-checkbox">
|
|
{{input type="checkbox" checked=adminWatchedWords.showWords disabled=adminWatchedWords.disableShowWords}}
|
|
{{i18n "admin.watched_words.show_words" count=currentAction.words.length}}
|
|
</label>
|
|
{{/if}}
|
|
|
|
{{#if showWordsList}}
|
|
<div class="watched-words-list">
|
|
{{#each currentAction.words as |word| }}
|
|
<div class="watched-word-box">{{admin-watched-word actionKey=actionNameKey word=word action=(action "recordRemoved")}}</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|