One button (with tooltip) is visible to the left of each password field. One click on this button generate one visible password of 8 characters (upper/lower-case letters, underscore, numbers)
112 lines
4.5 KiB
Plaintext
112 lines
4.5 KiB
Plaintext
.grid-sm
|
|
.panel.panel-default
|
|
p.page-title
|
|
i.xo-icon-user(style="color: #e25440;")
|
|
| Users
|
|
.grid-sm
|
|
.panel.panel-default
|
|
.panel-body
|
|
form(ng-submit="ctrl.saveUsers()", autocomplete="off")
|
|
table.table.table-hover
|
|
tr
|
|
th.col-md-4 Email
|
|
th.col-md-4 Permissions
|
|
th.col-md-3 Password
|
|
th.col-md-1.text-center
|
|
i.fa.fa-trash-o.fa-lg(tooltip="Remove user")
|
|
tr(ng-repeat="user in ctrl.users | orderBy:natural('id') track by user.id")
|
|
td
|
|
input.form-control(
|
|
type="text"
|
|
ng-model="user.email"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
td
|
|
select.form-control(
|
|
ng-options="p.value as p.label for p in ctrl.permissions"
|
|
ng-model="user.permission"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
td
|
|
div.input-group
|
|
span.input-group-btn
|
|
button.btn.btn-default(
|
|
type = "button"
|
|
tooltip = "Generate random password"
|
|
ng-click = "ctrl.generatePassword(user); showPassword = true"
|
|
)
|
|
i.fa.fa-key
|
|
input.form-control(
|
|
type = "{{ showPassword ? 'text' : 'password' }}"
|
|
ng-model = "user.password"
|
|
placeholder = "Fill to change the password"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
span.input-group-btn
|
|
button.btn.btn-default(
|
|
type = "button"
|
|
tooltip = "Reveal password"
|
|
ng-show = "user.password.length > 0"
|
|
ng-mousedown = "showPassword = true"
|
|
ng-mouseup = "showPassword = false"
|
|
ng-mouseleave = "showPassword = false"
|
|
)
|
|
i.fa.fa-eye(ng-if = "showPassword")
|
|
i.fa.fa-eye-slash(ng-if = "!showPassword")
|
|
td.text-center
|
|
input(
|
|
type="checkbox"
|
|
ng-model="ctrl.selectedUsers[user.id]"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
tr(ng-repeat="user in ctrl.newUsers")
|
|
td
|
|
input.form-control(
|
|
type = "text"
|
|
ng-model = "user.email"
|
|
placeholder = "email"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
td
|
|
select.form-control(
|
|
ng-options = "p.value as p.label for p in ctrl.permissions"
|
|
ng-model = "user.permission"
|
|
ng-required = "user.email"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
td
|
|
div.input-group
|
|
span.input-group-btn
|
|
button.btn.btn-default(
|
|
type = "button"
|
|
tooltip = "Generate random password"
|
|
ng-click = "ctrl.generatePassword(user); showPassword = true"
|
|
)
|
|
i.fa.fa-key
|
|
input.form-control(
|
|
type = "{{ showPassword ? 'text' : 'password' }}"
|
|
ng-model = "user.password"
|
|
ng-required = "user.email"
|
|
placeholder = "password"
|
|
ui-event = '{focus: "ctrl.editingUser(true)", blur: "ctrl.editingUser(false)"}'
|
|
)
|
|
span.input-group-btn
|
|
button.btn.btn-default(
|
|
type = "button"
|
|
tooltip = "Reveal password"
|
|
ng-show = "user.password.length > 0"
|
|
ng-mousedown = "showPassword = true"
|
|
ng-mouseup = "showPassword = false"
|
|
ng-mouseleave = "showPassword = false"
|
|
)
|
|
i.fa.fa-eye(ng-if = "showPassword")
|
|
i.fa.fa-eye-slash(ng-if = "!showPassword")
|
|
td  
|
|
p.text-center
|
|
button.btn.btn-primary(type="submit")
|
|
i.fa.fa-save
|
|
| Save
|
|
|
|
|
button.btn.btn-success(type="button", ng-click="ctrl.addUser()")
|
|
i.fa.fa-plus
|