2018-02-12 05:47:26 +10:00
|
|
|
{{> partials/menu}}
|
2019-12-26 13:23:21 +10:00
|
|
|
<div class="col-sm-9">
|
2018-01-07 04:55:48 +10:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<h2>User edit</h2>
|
2019-12-16 14:22:27 +10:00
|
|
|
<form id="userEditForm" data-toggle="validator">
|
|
|
|
<input type="hidden" id="userId" value="{{user._id}}" />
|
|
|
|
<div class="form-group">
|
|
|
|
<label>{{ @root.__ "Users name" }}</label>
|
|
|
|
<input type="text" class="form-control" id="usersName" value="{{user.usersName}}" required>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>{{ @root.__ "User email" }}</label>
|
|
|
|
<input type="text" class="form-control" id="userEmail" value="{{user.userEmail}}" readonly>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>{{ @root.__ "User password" }} {{#ifCond session.user '==' user.userEmail}}*{{/ifCond}}</label>
|
|
|
|
<input autocomplete="off" type="password" class="form-control" id="userPassword" {{#ifCond session.user '==' user.userEmail}}required{{/ifCond}}>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>{{ @root.__ "Password confirm" }} {{#ifCond session.user '==' user.userEmail}}*{{/ifCond}}</label>
|
|
|
|
<input autocomplete="off" type="password" data-validation-match-match="userPassword" data-validation-match-message="Password values to not match" class="form-control" {{#ifCond session.user '==' user.userEmail}}required{{/ifCond}}>
|
|
|
|
</div>
|
|
|
|
{{#isAnAdmin @root.session.isAdmin}}
|
|
|
|
{{#ifCond @root.session.user '!=' user.userEmail}}
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input id="userAdmin" {{#checkedState @root.user.isAdmin}}{{/checkedState}} type="checkbox"> {{ @root.__ "User is admin?" }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{{/ifCond}}
|
|
|
|
{{/isAnAdmin}}
|
|
|
|
<div class="form-group">
|
|
|
|
<label>API Key</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="form-control" id="apiKey" value="{{user.apiKey}}" aria-label="..." readonly>
|
2019-12-26 13:23:21 +10:00
|
|
|
<div class="input-group-append">
|
|
|
|
<button id="btnGenerateAPIkey" class="btn btn-outline-success">{{ @root.__ "Generate" }}</button>
|
2019-12-16 14:22:27 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><br/>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="pull-right">
|
2019-12-26 13:23:21 +10:00
|
|
|
<button type="submit" class="btn btn-outline-success">{{ @root.__ "Update" }}</button>
|
2019-06-15 10:54:41 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-16 14:22:27 +10:00
|
|
|
</form>
|
2018-01-07 04:55:48 +10:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|