mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-08 18:13:37 +00:00
47 lines
2.2 KiB
Twig
47 lines
2.2 KiB
Twig
{% extends 'edit.twig' %}
|
|
|
|
{% block inner_content %}
|
|
{% if result %}
|
|
{% set ro = not result.can_edit %}
|
|
<h4>{{ lang.retention.rule }}: {{ result.name }}</h4>
|
|
<form data-id="edit_retention_rule" class="form-horizontal" role="form" method="post" autocapitalize="none" autocorrect="off">
|
|
<input type="hidden" value="0" name="active">
|
|
<div class="row mb-2">
|
|
<label class="control-label col-sm-2" for="retention_rule_domain">{{ lang.retention.domain }}</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="retention_rule_domain" value="{{ result.domain }}" disabled>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-2">
|
|
<label class="control-label col-sm-2" for="retention_rule_name">{{ lang.retention.name }}</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="name" id="retention_rule_name" value="{{ result.name }}" maxlength="100" required{% if ro %} disabled{% endif %}>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-2">
|
|
<label class="control-label col-sm-2" for="retention_rule_description">{{ lang.retention.description }}</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="description" id="retention_rule_description" value="{{ result.description }}" maxlength="255"{% if ro %} disabled{% endif %}>
|
|
</div>
|
|
</div>
|
|
{% include 'edit/retention-rule-fields.twig' with {'rule': result, 'id': 'retention_rule', 'groups': retention_groups, 'mailboxes': mailboxes, 'ro': ro, 'label_class': ''} %}
|
|
<div class="row mb-4">
|
|
<div class="offset-sm-2 col-sm-10">
|
|
<div class="form-check">
|
|
<label><input type="checkbox" class="form-check-input" value="1" name="active"{% if result.active == 1 %} checked{% endif %}{% if ro %} disabled{% endif %}> {{ lang.mailbox.active }}</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if not ro %}
|
|
<div class="row">
|
|
<div class="offset-sm-2 col-sm-10">
|
|
<button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="edit_retention_rule" data-item="{{ result.id }}" data-api-url='edit/retention-rule' data-api-attr='{}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</form>
|
|
{% else %}
|
|
{{ parent() }}
|
|
{% endif %}
|
|
{% endblock %}
|