blob: 8806b068fe444f89ce968ae3497dc7ed2dd0ba13 [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.admin }}</h4>
6<br>
7<form class="form-horizontal" data-id="editadmin" role="form" method="post" autocomplete="off">
8 <input type="hidden" value="0" name="active">
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="username_new">{{ lang.edit.username }}</label>
11 <div class="col-sm-10">
12 <input class="form-control" type="text" name="username_new" onkeyup="this.value = this.value.toLowerCase();" required value="{{ admin }}" />
13 &rdsh; <kbd>a-z - _ .</kbd>
14 </div>
15 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010016 <div class="row mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010017 <label class="control-label col-sm-2" for="password">{{ lang.edit.password }} (<a href="#" class="generate_password">{{ lang.edit.generate }}</a>)</label>
18 <div class="col-sm-10">
19 <input type="password" data-pwgen-field="true" data-hibp="true" class="form-control" name="password" placeholder="" autocomplete="new-password">
20 </div>
21 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010022 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010023 <label class="control-label col-sm-2" for="password2">{{ lang.edit.password_repeat }}</label>
24 <div class="col-sm-10">
25 <input type="password" data-pwgen-field="true" class="form-control" name="password2" autocomplete="new-password">
26 </div>
27 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010028 <div class="row mb-2">
29 <div class="offset-sm-2 col-sm-10">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010030 <div class="checkbox">
31 <label><input type="checkbox" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label>
32 </div>
33 </div>
34 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010035 <div class="row mb-2">
36 <div class="offset-sm-2 col-sm-10">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010037 <div class="checkbox">
38 <label><input type="checkbox" value="1" name="disable_tfa"> {{ lang.tfa.disable_tfa }}</label>
39 </div>
40 </div>
41 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010042 <div class="row">
43 <div class="offset-sm-2 col-sm-10">
44 <button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-api-reload-location="/admin" data-id="editadmin" data-item="{{ admin }}" data-api-url='edit/admin' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010045 </div>
46 </div>
47</form>
48{% else %}
49 {{ parent() }}
50{% endif %}
51{% endblock %}