Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | <div role="tabpanel" class="tab-pane" id="tab-config-rsettings"> |
| 2 | <div class="panel panel-default"> |
| 3 | <div class="panel-heading">{{ lang.admin.rspamd_settings_map }}</div> |
| 4 | <div class="panel-body"> |
| 5 | <legend data-target="#active_settings_map" style="cursor:pointer" unselectable="on" data-toggle="collapse"> |
| 6 | <i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.active_rspamd_settings_map }} |
| 7 | </legend> |
| 8 | <div id="active_settings_map" class="collapse" > |
| 9 | <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code" rows="20" name="settings_map" readonly>{{ rsettings_map }}</textarea> |
| 10 | </div> |
| 11 | <br> |
| 12 | <form class="form" data-id="rsettings" role="form" method="post"> |
| 13 | <div class="row"> |
| 14 | <div class="col-sm-3"> |
| 15 | <div class="list-group"> |
| 16 | {% if not rsettings %} |
| 17 | |
| 18 | {% endif %} |
| 19 | {% for rsetting in rsettings %} |
| 20 | <a href="#{{ rsetting.details.id }}" class="list-group-item list-group-item-{% if rsetting.details.active %}success{% endif %}" data-dont-remember="1" data-toggle="tab">{{ rsetting.details.desc }} (ID #{{ rsetting.id }})</a> |
| 21 | {% else %} |
| 22 | <span class="list-group-item"><em>{{ lang.admin.rsetting_none }}</em></span> |
| 23 | {% endfor %} |
| 24 | <a href="#" class="list-group-item list-group-item-default" |
| 25 | data-id="add_domain_admin" |
| 26 | data-toggle="modal" |
| 27 | data-dont-remember="1" |
| 28 | data-target="#addRsettingModal" |
| 29 | data-toggle="tab">{{ lang.admin.rsetting_add_rule }}</a> |
| 30 | </div> |
| 31 | </div> |
| 32 | <div class="col-sm-9"> |
| 33 | <div class="tab-content"> |
| 34 | {% if not rsettings %} |
| 35 | <div id="none" class="tab-pane active"> |
| 36 | <p class="help-block">{{ lang.admin.rsetting_none }}</p> |
| 37 | </div> |
| 38 | {% else %} |
| 39 | <div id="none" class="tab-pane active"> |
| 40 | <p class="help-block">{{ lang.admin.rsetting_no_selection }}</p> |
| 41 | </div> |
| 42 | {% for rsetting in rsettings %} |
| 43 | <div id="{{ rsetting.details.id }}" class="tab-pane"> |
| 44 | <form class="form" data-id="rsettings" role="form" method="post"> |
| 45 | <input type="hidden" name="active" value="0"> |
| 46 | <div class="form-group"> |
| 47 | <label for="rsettings_desc">{{ lang.admin.rsetting_desc }}:</label> |
| 48 | <input type="text" class="form-control" id="rsettings_desc" name="desc" value="{{ rsetting.details.desc }}"> |
| 49 | </div> |
| 50 | <div class="form-group"> |
| 51 | <label for="rsettings_content">{{ lang.admin.rsetting_content }}:</label> |
| 52 | <textarea class="form-control" id="rsettings_content" name="content" rows="10">{{ rsetting.details.content }}</textarea> |
| 53 | </div> |
| 54 | <div class="form-group"> |
| 55 | <label> |
| 56 | <input type="checkbox" name="active" value="1" {% if rsetting.details.active %}checked{% endif %}> {{ lang.admin.active }} |
| 57 | </label> |
| 58 | </div> |
| 59 | <button class="btn btn-sm btn-success" data-action="edit_selected" data-item="{{ rsetting.details.id }}" data-id="rsettings" data-api-url='edit/rsetting' data-api-attr='{}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button> |
| 60 | <button class="btn btn-sm btn-danger" data-action="delete_selected" data-item="{{ rsetting.details.id }}" data-id="rsettings" data-api-url="delete/rsetting" data-api-attr='{}' href="#">{{ lang.admin.remove }}</button> |
| 61 | </form> |
| 62 | </div> |
| 63 | {% endfor %} |
| 64 | {% endif %} |
| 65 | </div> |
| 66 | </div> |
| 67 | </div> |
| 68 | </form> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |