1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-25 02:29:32 +02:00
mailcow-dockerized/data/web/templates/admin/tab-config-rsettings.twig
2022-04-13 14:07:07 +02:00

73 lines
4.0 KiB
Twig

<div role="tabpanel" class="tab-pane fade" id="tab-config-rsettings" role="tabpanel" aria-labelledby="tab-config-rsettings">
<div class="card">
<div class="card-header">{{ lang.admin.rspamd_settings_map }}</div>
<div class="card-body">
<legend data-bs-target="#active_settings_map" style="cursor:pointer" unselectable="on" data-bs-toggle="collapse">
<i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.active_rspamd_settings_map }}
</legend>
<hr />
<div id="active_settings_map" class="collapse" >
<textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code" rows="20" name="settings_map" readonly>{{ rsettings_map }}</textarea>
</div>
<br>
<form class="form" data-id="rsettings" role="form" method="post">
<div class="row">
<div class="col-sm-3">
<div class="list-group">
{% if not rsettings %}
{% endif %}
{% for rsetting in rsettings %}
<a href="#{{ rsetting.details.id }}" class="list-group-item list-group-item-{% if rsetting.details.active %}success{% endif %}" data-dont-remember="1" data-bs-toggle="tab">{{ rsetting.details.desc }} (ID #{{ rsetting.id }})</a>
{% else %}
<span class="list-group-item"><em>{{ lang.admin.rsetting_none }}</em></span>
{% endfor %}
<a href="#" class="list-group-item list-group-item-default"
data-id="add_domain_admin"
data-bs-toggle="modal"
data-dont-remember="1"
data-bs-target="#addRsettingModal"
data-bs-toggle="tab">{{ lang.admin.rsetting_add_rule }}</a>
</div>
</div>
<div class="col-sm-9">
<div class="tab-content">
{% if not rsettings %}
<div id="none" class="tab-pane active">
<p class="text-muted">{{ lang.admin.rsetting_none }}</p>
</div>
{% else %}
<div id="none" class="tab-pane active">
<p class="text-muted">{{ lang.admin.rsetting_no_selection }}</p>
</div>
{% for rsetting in rsettings %}
<div id="{{ rsetting.details.id }}" class="tab-pane">
<form class="form" data-id="rsettings" role="form" method="post">
<input type="hidden" name="active" value="0">
<div>
<label for="rsettings_desc">{{ lang.admin.rsetting_desc }}:</label>
<input type="text" class="form-control" id="rsettings_desc" name="desc" value="{{ rsetting.details.desc }}">
</div>
<div>
<label for="rsettings_content">{{ lang.admin.rsetting_content }}:</label>
<textarea class="form-control" id="rsettings_content" name="content" rows="10">{{ rsetting.details.content }}</textarea>
</div>
<div>
<label>
<input type="checkbox" name="active" value="1" {% if rsetting.details.active %}checked{% endif %}> {{ lang.admin.active }}
</label>
</div>
<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>
<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>
</form>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</form>
</div>
</div>
</div>