blob: fcd9d049c90195b49886a69fb91320ca26eb9dde [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.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 Benkard1ba53812022-12-27 17:32:58 +01009 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010010 <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 Benkard1ba53812022-12-27 17:32:58 +010015 <div class="row mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010016 <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 Benkard1ba53812022-12-27 17:32:58 +010021 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010022 <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 Benkard1ba53812022-12-27 17:32:58 +010027 <div class="row mb-2">
28 <div class="offset-sm-2 col-sm-10">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010029 <div class="checkbox">
30 <label><input type="checkbox" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label>
31 </div>
32 </div>
33 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010034 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010035 <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 Benkard1ba53812022-12-27 17:32:58 +010047 <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 Benkard12a57352021-12-28 18:02:04 +010050 </div>
51 </div>
52</form>
53{% else %}
54 {{ parent() }}
55{% endif %}
56{% endblock %}