forked from mrvautin/openKB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_edit.hbs
44 lines (44 loc) · 2.15 KB
/
user_edit.hbs
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
<div class="col-md-12">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<ol class="breadcrumb">
<li><a href="{{app_context}}/">{{__ "Home"}}</a></li>
<li><a href="{{app_context}}/Users">{{__ "Users"}}</a></li>
<li class="active">{{__ "User edit"}}</li>
</ol>
<h1>{{__ "User edit"}}</h1>
<form method="post" id="edit_form" action="{{app_context}}/user_update" data-toggle="validator">
<input type="hidden" name="user_id" value="{{user._id}}" />
<div class="form-group">
<label>{{__ "Users name"}}</label>
<input type="text" class="form-control" name="users_name" value="{{user.users_name}}" required>
</div>
<div class="form-group">
<label>{{__ "User email"}}</label>
<input type="text" class="form-control" name="user_email" value="{{user.user_email}}" readonly>
</div>
<div class="form-group">
<label>{{__ "User password"}} {{#ifCond session.user '==' user.user_email}}*{{/ifCond}}</label>
<input type="password" class="form-control" name="user_password" {{#ifCond session.user '==' user.user_email}}required{{/ifCond}}>
</div>
<div class="form-group">
<label>{{__ "Password confirm"}} {{#ifCond session.user '==' user.user_email}}*{{/ifCond}}</label>
<input type="password" data-validation-match-match="user_password" data-validation-match-message="{{__ "Password values do not match"}}" class="form-control" name="frm_user_password_confirm" {{#ifCond session.user '==' user.user_email}}required{{/ifCond}}>
</div>
{{#is_an_admin session.is_admin}}
{{#ifCond session.user '!=' user.user_email}}
<div class="checkbox">
<label>
<input name="user_admin" {{#checked_state user.is_admin}}{{/checked_state}} type="checkbox"> {{__ "User is admin?"}}
</label>
</div>
{{/ifCond}}
{{/is_an_admin}}
<div class="form-group">
<div class="pull-right">
<button type="submit" class="btn btn-primary">{{__ "Update"}}</button>
</div>
</div>
</div>
</div>
</div>