Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame^] | 1 | <div role="tabpanel" class="tab-pane" id="tab-globalfilter-regex"> |
| 2 | <div class="panel panel-default"> |
| 3 | <div class="panel-heading"> |
| 4 | {{ lang.admin.rspamd_global_filters }} |
| 5 | </div> |
| 6 | <div class="panel-body"> |
| 7 | <p>{{ lang.admin.rspamd_global_filters_info }}</p> |
| 8 | <div id="confirm_show_rspamd_global_filters"{% if show_rspamd_global_filters %} class="hidden"{% endif %}> |
| 9 | <div class="form-group"> |
| 10 | <div class="col-sm-offset-2 col-sm-10"> |
| 11 | <label> |
| 12 | <input type="checkbox" id="show_rspamd_global_filters"> {{ lang.admin.rspamd_global_filters_agree }} |
| 13 | </label> |
| 14 | </div> |
| 15 | </div> |
| 16 | </div> |
| 17 | <div id="rspamd_global_filters"{% if show_rspamd_global_filters != true %} class="hidden"{% endif %}> |
| 18 | <hr> |
| 19 | <span class="anchor" id="regexmaps"></span> |
| 20 | <h4>{{ lang.admin.regex_maps }}</h4> |
| 21 | <p>{{ lang.admin.rspamd_global_filters_regex|raw }}</p> |
| 22 | <ul> |
| 23 | {% for rspamd_regex_desc, rspamd_regex_map in rspamd_regex_maps %} |
| 24 | <li><a href="#{{ rspamd_regex_map.map }}">{{ rspamd_regex_desc }}</a> (<small>{{ rspamd_regex_map.map }}</small>)</li> |
| 25 | {% endfor %} |
| 26 | </ul> |
| 27 | {% for rspamd_regex_desc, rspamd_regex_map in rspamd_regex_maps %} |
| 28 | <hr> |
| 29 | <span class="anchor" id="{{ rspamd_regex_map.map }}"></span> |
| 30 | <form class="form-horizontal" data-cached-form="false" data-id="{{ rspamd_regex_map.map }}" role="form" method="post"> |
| 31 | <div class="form-group"> |
| 32 | <label class="control-label col-sm-3" for="{{ rspamd_regex_map.map }}">{{ rspamd_regex_desc }}<br><small>{{ rspamd_regex_map.map }}</small></label> |
| 33 | <div class="col-sm-9"> |
| 34 | <textarea id="{{ rspamd_regex_map.map }}" spellcheck="false" autocorrect="off" autocapitalize="none" class="form-control textarea-code" rows="10" name="rspamd_map_data" required>{{ rspamd_regex_map.data }}</textarea> |
| 35 | </div> |
| 36 | </div> |
| 37 | <div class="form-group"> |
| 38 | <div class="col-sm-offset-3 col-sm-9"> |
| 39 | <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default validate_rspamd_regex" data-regex-map="{{ rspamd_regex_map.map }}" href="#">{{ lang.add.validate }}</button> |
| 40 | <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success submit_rspamd_regex" data-action="edit_selected" data-id="{{ rspamd_regex_map.map }}" data-item="{{ rspamd_regex_map.map }}" data-api-url='edit/rspamd-map' data-api-attr='{}' href="#" disabled>{{ lang.edit.save }}</button> |
| 41 | </div> |
| 42 | </div> |
| 43 | </form> |
| 44 | {% endfor %} |
| 45 | </div> |
| 46 | </div> |
| 47 | </div> |
| 48 | </div> |