blob: 48d19617bd52bffe544a9ff773183976f7d88b13 [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001{% extends 'edit.twig' %}
2
3{% block inner_content %}
4{% if result %}
5<h4>{{ lang.edit.alias }}</h4>
6<br>
7<form class="form-horizontal" data-id="editalias" role="form" method="post">
8 <input type="hidden" value="0" name="active">
9 {% if not skip_sogo %}
10 <input type="hidden" value="0" name="sogo_visible">
11 {% endif %}
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010012 <div class="row mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010013 <label class="control-label col-sm-2" for="address">{{ lang.edit.alias }}</label>
14 <div class="col-sm-10">
15 <input class="form-control" type="text" name="address" value="{{ result.address }}" />
16 </div>
17 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010018 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010019 <label class="control-label col-sm-2" for="goto">{{ lang.edit.target_address|raw }}</label>
20 <div class="col-sm-10">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010021 <textarea id="textarea_alias_goto" class="form-control mb-4" autocapitalize="none" autocorrect="off" rows="10" id="goto" name="goto" required>{{ goto|replace({',': ', '}) }}</textarea>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010022 <div class="form-check">
23 <label><input class="form-check-input goto_checkbox" type="checkbox" value="1" name="goto_null"{% if result.goto == 'null@localhost' %} checked{% endif %}> {{ lang.add.goto_null }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010024 </div>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010025 <div class="form-check">
26 <label><input class="form-check-input goto_checkbox" type="checkbox" value="1" name="goto_spam"{% if result.goto == 'spam@localhost' %} checked{% endif %}> {{ lang.add.goto_spam|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010027 </div>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010028 <div class="form-check">
29 <label><input class="form-check-input goto_checkbox" type="checkbox" value="1" name="goto_ham"{% if result.goto == 'ham@localhost' %} checked{% endif %}> {{ lang.add.goto_ham|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010030 </div>
31 {% if not skip_sogo %}
32 <hr>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010033 <div class="form-check">
34 <label><input type="checkbox" class="form-check-input" value="1" name="sogo_visible"{% if result.sogo_visible == '1' %} checked{% endif %}> {{ lang.edit.sogo_visible }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010035 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010036 <p class="text-muted">{{ lang.edit.sogo_visible_info }}</p>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010037 {% endif %}
38 </div>
39 </div>
40 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010041 <div class="row mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010042 <label class="control-label col-sm-2" for="private_">{{ lang.edit.private_comment }}</label>
43 <div class="col-sm-10">
44 <input maxlength="160" class="form-control" type="text" name="private_comment" value="{{ result.private_comment }}" />
45 </div>
46 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010047 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010048 <label class="control-label col-sm-2" for="public_comment">{{ lang.edit.public_comment }}</label>
49 <div class="col-sm-10">
50 <input maxlength="160" class="form-control" type="text" name="public_comment" value="{{ result.public_comment }}" />
51 </div>
52 </div>
53 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010054 <div class="row mb-2">
55 <div class="offset-sm-2 col-sm-10">
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010056 <div class="form-check">
57 <label><input type="checkbox" class="form-check-input" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010058 </div>
59 </div>
60 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010061 <div class="row">
62 <div class="offset-sm-2 col-sm-10">
63 <button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="editalias" data-item="{{ alias }}" data-api-url='edit/alias' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010064 </div>
65 </div>
66</form>
67{% else %}
68 {{ parent() }}
69{% endif %}
70{% endblock %}