Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | {% 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 Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 12 | <div class="row mb-2"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 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> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 18 | <div class="row mb-4"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 19 | <label class="control-label col-sm-2" for="goto">{{ lang.edit.target_address|raw }}</label> |
| 20 | <div class="col-sm-10"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 21 | <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 Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 22 | <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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 24 | </div> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 25 | <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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 27 | </div> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 28 | <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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 30 | </div> |
| 31 | {% if not skip_sogo %} |
| 32 | <hr> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 33 | <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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 35 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 36 | <p class="text-muted">{{ lang.edit.sogo_visible_info }}</p> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 37 | {% endif %} |
| 38 | </div> |
| 39 | </div> |
| 40 | <hr> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 41 | <div class="row mb-2"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 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> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 47 | <div class="row mb-4"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 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> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 54 | <div class="row mb-2"> |
| 55 | <div class="offset-sm-2 col-sm-10"> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 56 | <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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 58 | </div> |
| 59 | </div> |
| 60 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 61 | <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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 64 | </div> |
| 65 | </div> |
| 66 | </form> |
| 67 | {% else %} |
| 68 | {{ parent() }} |
| 69 | {% endif %} |
| 70 | {% endblock %} |