This repository was archived by the owner on Oct 8, 2024. It is now read-only.
forked from jzgoda/managed-users
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmanagedUsersTemplates.html
More file actions
136 lines (134 loc) · 5.6 KB
/
managedUsersTemplates.html
File metadata and controls
136 lines (134 loc) · 5.6 KB
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
126
127
128
129
130
131
132
133
134
135
136
<template name="managedUsers">
{{#if managedUserError}}
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<strong>Error</strong> {{managedUserError}}
</div>
{{/if}}
<div class="row">
<div class="table-responsive col-md-8">
<table class="table table-hover" id="managedUsers-table">
<thead>
<tr>
<th>Username</th>
<th>Full Name</th>
<th>Email Address</th>
<th><span class="glyphicon glyphicon-wrench"></span></th>
</tr>
</thead>
<tbody>
{{#each systemUsers}}
<tr>
<td>
<span class="username">{{username}}</span>
</td>
<td>
<span class="fullName">{{profile.name}}</span>
</td>
<td>
<span class="emailAddress">
{{emailAddress this}}
</span>
</td>
<td>
<span class="glyphicon glyphicon-edit editUser" data-toggle="modal" data-target="#{{_id}}_edit"></span>
<span class="glyphicon glyphicon-remove remove-user"></span>
{{> managedUserEditModal}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="row">
<form id="newUser" class="well form-horizontal col-md-8" role="form">
<legend>New User</legend>
{{#isolate}}
{{#if newManagedUserError}}
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Error</strong> {{newManagedUserError}}
</div>
{{/if}}
{{/isolate}}
{{> managedUserForm}}
<div class="form-group">
<div class="col-md-4 col-md-offset-2">
<button id="submit" type="button" class="btn btn-primary">Save changes</button>
<button id="cancel" type="button" class="btn">Cancel</button>
</div>
</div>
</form>
</div>
</template>
<template name="managedUserEditModal">
<div id="{{_id}}_edit" class="modal fade editModal" role="dialog" aria-hidden="true" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Edit User</h4>
</div>
<div class="modal-body">
<form class="well form-horizontal">
{{#isolate}}
{{#if editManagedUserError}}
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Error</strong> {{editManagedUserError}}
</div>
{{/if}}
{{/isolate}}
{{> managedUserForm}}
</form>
<div class="row">
<span class="col-md-1 col-md-offset-7">
<button class="btn btn-link passwordReset">Send Password Reset Email</button>
</span>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary editSave">Save changes</button>
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
</template>
<template name="managedUserForm">
<fieldset>
<div class="form-group">
<label class="col-md-2 control-label" for="username">Username</label>
<div class="col-md-6">
<input class="username form-control" type="text" placeholder="Username"/>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="name">Full Name</label>
<div class="col-md-6">
<input class="name form-control" type="text" placeholder="Full Name"/>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="email">Email</label>
<div class="col-md-6">
<input class="email form-control" type="email" placeholder="Email"/>
</div>
</div>
{{#if permissions}}
<div class="form-group">
<label class="control-label col-md-2">Permissions</label>
<div class="permissions col-md-6">
{{#each permissions}}
<div class="checkbox">
<label>
<input class="{{name}} permission" type="checkbox">{{description}}
</label>
</div>
{{/each}}
</div>
</div>
{{/if}}
</fieldset>
</template>