blob: 046a34f524ae1977169e66a1a9c5cc06e22d30a8 [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">
9 <div class="form-group">
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>
15 <div class="form-group">
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>
21 <div class="form-group">
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>
27 <div class="form-group">
28 <div class="col-sm-offset-2 col-sm-10">
29 <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>
34 <div class="form-group">
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>
47 <div class="form-group">
48 <div class="col-sm-offset-2 col-sm-10">
49 <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="editapp" data-item="{{ result.id }}" data-api-url='edit/app-passwd' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
50 </div>
51 </div>
52</form>
53{% else %}
54 {{ parent() }}
55{% endif %}
56{% endblock %}