blob: 7ed5d7c0d70610fce7a8779602d36c16142e4bc6 [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 %}
12 <div class="form-group">
13 <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>
18 <div class="form-group">
19 <label class="control-label col-sm-2" for="goto">{{ lang.edit.target_address|raw }}</label>
20 <div class="col-sm-10">
21 <textarea id="textarea_alias_goto" class="form-control" autocapitalize="none" autocorrect="off" rows="10" id="goto" name="goto" required>{{ goto|replace({',': ', '}) }}</textarea>
22 <div class="checkbox">
23 <label><input class="goto_checkbox" type="checkbox" value="1" name="goto_null"{% if result.goto == 'null@localhost' %} checked{% endif %}> {{ lang.add.goto_null }}</label>
24 </div>
25 <div class="checkbox">
26 <label><input class="goto_checkbox" type="checkbox" value="1" name="goto_spam"{% if result.goto == 'spam@localhost' %} checked{% endif %}> {{ lang.add.goto_spam|raw }}</label>
27 </div>
28 <div class="checkbox">
29 <label><input class="goto_checkbox" type="checkbox" value="1" name="goto_ham"{% if result.goto == 'ham@localhost' %} checked{% endif %}> {{ lang.add.goto_ham|raw }}</label>
30 </div>
31 {% if not skip_sogo %}
32 <hr>
33 <div class="checkbox">
34 <label><input type="checkbox" value="1" name="sogo_visible"{% if result.sogo_visible == '1' %} checked{% endif %}> {{ lang.edit.sogo_visible }}</label>
35 </div>
36 <p class="help-block">{{ lang.edit.sogo_visible_info }}</p>
37 {% endif %}
38 </div>
39 </div>
40 <hr>
41 <div class="form-group">
42 <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>
47 <div class="form-group">
48 <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>
54 <div class="form-group">
55 <div class="col-sm-offset-2 col-sm-10">
56 <div class="checkbox">
57 <label><input type="checkbox" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label>
58 </div>
59 </div>
60 </div>
61 <div class="form-group">
62 <div class="col-sm-offset-2 col-sm-10">
63 <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-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>
64 </div>
65 </div>
66</form>
67{% else %}
68 {{ parent() }}
69{% endif %}
70{% endblock %}