blob: 83a3760c54ef485a2a7981a286bfae4c063fcfcf [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 Benkard12a57352021-12-28 18:02:04 +010022 <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>
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 Benkard12a57352021-12-28 18:02:04 +010056 <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>
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 %}