blob: 3ee7fc9d4ec9033f7a2bdb94afedcb1dcb613d23 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<form class="js-form" method="{{form.method | default('POST')}}" action="{{site.uri.public}}/{{form.action}}">
{% include "forms/csrf.html.twig" %}
<div class="js-form-alerts">
</div>
<div class="row">
{% block user_form %}
{% if 'user_name' not in form.fields.hidden %}
<div class="col-sm-6">
<div class="form-group">
<label>{{translate('USERNAME')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-edit fa-fw"></i></span>
<input type="text" class="form-control" name="user_name" autocomplete="off" value="{{user.user_name}}" placeholder="{{translate('USERNAME')}}" {% if 'user_name' in form.fields.disabled %}disabled{% endif %}>
</div>
</div>
</div>
{% endif %}
{% if 'group' not in form.fields.hidden %}
<div class="col-sm-6">
<div class="form-group">
<label for="input-group">{{translate('GROUP')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-users fa-fw"></i></span>
{% if 'group' in form.fields.disabled %}
<input type="text" class="form-control" name="theme" value="{{user.group.name}}" disabled>
{% else %}
<select id="input-group" class="form-control js-select2" name="group_id">
{% for group in groups %}
<option value="{{group.id}}" {% if (group.id == user.group_id) %}selected{% endif %}>{{group.name}}</option>
{% endfor %}
</select>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if 'name' not in form.fields.hidden %}
<div class="col-sm-6">
<div class="form-group">
<label>{{translate('FIRST_NAME')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-edit fa-fw"></i></span>
<input type="text" class="form-control" name="first_name" autocomplete="off" value="{{user.first_name}}" placeholder="{{translate('FIRST_NAME')}}" {% if 'name' in form.fields.disabled %}disabled{% endif %}>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>{{translate('LAST_NAME')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-edit fa-fw"></i></span>
<input type="text" class="form-control" name="last_name" autocomplete="off" value="{{user.last_name}}" placeholder="{{translate('LAST_NAME')}}" {% if 'name' in form.fields.disabled %}disabled{% endif %}>
</div>
</div>
</div>
{% endif %}
{% if 'email' not in form.fields.hidden %}
<div class="col-sm-6">
<div class="form-group">
<label>{{translate('EMAIL')}}</label>
<div class="input-group js-copy-container">
<span class="input-group-addon"><i class="fa fa-envelope fa-fw"></i></span>
<input type="text" class="form-control js-copy-target" name="email" autocomplete="off" value="{{user.email}}" placeholder="{{translate('EMAIL')}}" {% if 'email' in form.fields.disabled %}disabled{% endif %}>
{% if 'email' in form.fields.disabled %}
<span class="input-group-btn">
<button class="btn btn-default uf-copy-trigger js-copy-trigger" type="button"><i class="fa fa-clipboard"></i></button>
</span>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if 'theme' not in form.fields.hidden %}
<div class="col-sm-6">
<div class="form-group">
<label for="input-theme">{{translate('THEME')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-puzzle-piece fa-fw"></i></span>
{% if 'theme' in form.fields.disabled %}
<input type="text" class="form-control" name="theme" value="{{themes[user.theme]}}" disabled>
{% else %}
<select id="input-theme" class="form-control js-select2" name="theme">
{% for option, label in theme %}
<option value="{{option}}" {% if (option == user.theme) %}selected{% endif %}>{{label}}</option>
{% endfor %}
</select>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if 'locale' not in form.fields.hidden %}
<div class="col-sm-6">
<div class="form-group">
<label for="input-locale">{{translate('LOCALE')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-language fa-fw"></i></span>
{% if 'locale' in form.fields.disabled %}
<input type="text" class="form-control" name="theme" value="{{locales[user.locale]}}" disabled>
{% else %}
<select id="input-locale" class="form-control js-select2" name="locale">
{% for option, label in locales %}
<option value="{{option}}" {% if (option == user.locale) %}selected{% endif %}>{{label}}</option>
{% endfor %}
</select>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
</div><br>
<div class="row">
<div class="col-xs-8 col-sm-4">
<button type="submit" class="btn btn-block btn-lg btn-success">{{form.submit_text}}</button>
</div>
<div class="col-xs-4 col-sm-3 pull-right">
<button type="button" class="btn btn-block btn-lg btn-link" data-dismiss="modal">{{translate('CANCEL')}}</button>
</div>
</div>
</form>
<!-- Include validation rules -->
<script>
{% include "pages/partials/page.js.twig" %}
</script>
|