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.app_passwd }}</h4> |
| 6 | <form class="form-horizontal" data-pwgen-length="32" data-id="editapp" role="form" method="post"> |
| 7 | <input type="hidden" value="0" name="active"> |
| 8 | <input type="hidden" value="0" name="protocols"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 9 | <div class="row mb-4"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 10 | <label class="control-label col-sm-2" for="app_name">{{ lang.edit.app_name }}</label> |
| 11 | <div class="col-sm-10"> |
| 12 | <input type="text" class="form-control" name="app_name" id="app_name" value="{{ result.name }}" required maxlength="255"> |
| 13 | </div> |
| 14 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 15 | <div class="row mb-2"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 16 | <label class="control-label col-sm-2" for="password">{{ lang.edit.password }} (<a href="#" class="generate_password">{{ lang.edit.generate }}</a>)</label> |
| 17 | <div class="col-sm-10"> |
| 18 | <input type="password" data-pwgen-field="true" data-hibp="true" class="form-control" name="password" placeholder="" autocomplete="new-password"> |
| 19 | </div> |
| 20 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 21 | <div class="row mb-4"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 22 | <label class="control-label col-sm-2" for="password2">{{ lang.edit.password_repeat }}</label> |
| 23 | <div class="col-sm-10"> |
| 24 | <input type="password" data-pwgen-field="true" class="form-control" name="password2" autocomplete="new-password"> |
| 25 | </div> |
| 26 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 27 | <div class="row mb-2"> |
| 28 | <div class="offset-sm-2 col-sm-10"> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 29 | <div class="form-check"> |
| 30 | <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] | 31 | </div> |
| 32 | </div> |
| 33 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 34 | <div class="row mb-4"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 35 | <label class="control-label col-sm-2" for="protocols">{{ lang.edit.app_passwd_protocols }}</label> |
| 36 | <div class="col-sm-10"> |
| 37 | <select class="full-width-select" data-live-search="true" id="protocols" name="protocols" multiple> |
| 38 | <option value="imap_access" {% if result.imap_access == 1 %} selected{% endif %}>IMAP</option> |
| 39 | <option value="smtp_access" {% if result.smtp_access == 1 %} selected{% endif %}>SMTP</option> |
| 40 | <option value="eas_access" {% if result.eas_access == 1 %} selected{% endif %}>EAS/ActiveSync</option> |
| 41 | <option value="dav_access" {% if result.dav_access == 1 %} selected{% endif %}>CardDAV/CalDAV</option> |
| 42 | <option value="pop3_access" {% if result.pop3_access == 1 %} selected{% endif %}>POP3</option> |
| 43 | <option value="sieve_access" {% if result.sieve_access == 1 %} selected{% endif %}>Sieve</option> |
| 44 | </select> |
| 45 | </div> |
| 46 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 47 | <div class="row mb-2"> |
| 48 | <div class="offset-sm-2 col-sm-10"> |
| 49 | <button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="editapp" data-item="{{ result.id }}" data-api-url='edit/app-passwd' data-api-attr='{}' href="#">{{ lang.edit.save }}</button> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 50 | </div> |
| 51 | </div> |
| 52 | </form> |
| 53 | {% else %} |
| 54 | {{ parent() }} |
| 55 | {% endif %} |
| 56 | {% endblock %} |