-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuser.html
More file actions
86 lines (83 loc) · 5.16 KB
/
user.html
File metadata and controls
86 lines (83 loc) · 5.16 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
<template name="loginPanel">
<div id="login-panel">
<form>
<table>
<tr><th colspan="2" align="center">Please log in first!</th></tr>
{{#if error}}
<tr><td colspan="2" align="center" class="alert alert-error">{{error}}</td></tr>
{{/if}}
<tr><th align="right">User Name:</th><td><input type="text" name="username" /></td></tr>
<tr><th align="right">Password:</th><td><input type="password" name="password" /></td></tr>
<tr><td></td><td align="center">{{# if loggingIn}}{{> loadingLineImage}}{{else}}<button class="btn btn-primary btn-block" type="submit">Login</button>{{/if}}</td></tr>
</table>
</form>
</div>
</template>
<template name="userEdit">
<div id="user-profile-panel">
{{#with userData}}
<form>
<table>
<tr><th colspan="2" align="center">{{#if newUser}}new user{{else}}{{template.Name}}{{/if}}'s Profile</th></tr>
{{#if error}}
<tr><td colspan="2" align="center" class="alert alert-error">{{error}}</td></tr>
{{/if}}
{{#if success}}
<tr><td colspan="2" align="center" class="alert alert-success">{{success}}</td></tr>
{{/if}}
<tr><th align="right">User Name:</th><td>{{#if newUser}}<input type="text" name="user-name" value="" />{{else}}{{this.name}}{{/if}}</td></tr>
<tr><th align="right">Full Name:</th><td><input type="text" name="full-name" value="{{template.Name}}" /></td></tr>
<tr><th align="right">e-Mail:</th><td><input type="email" name="email" value="{{template.Mail}}" /></td></tr>
<tr><th align="right">Organisation:</th><td><input type="text" name="organisation" value="{{template.Organisation}}" /></td></tr>
<tr><th align="right">Address:</th><td><textarea name="address" rows="3">{{template.Address}}</textarea></td></tr>
<tr><th align="right">Description:</th><td><textarea name="description" rows="3">{{template.Description}}</textarea></td></tr>
<tr><th align="right">URL:</th><td><input type="url" name="url" value="{{template.www}}" /></td></tr>
{{#if isAdmin}}
<tr><th align="right">Groups:</th><td class="label-group">
{{#each allGroups}}
<label><input type="checkbox" name="groups" value="{{name}}" checked={{active}} />{{name}}</label>
{{/each}}
</td></tr>
<tr><th align="right">Roles:</th><td class="label-group">
{{#each allRoles}}
<label><input type="checkbox" name="roles" value="{{name}}" checked={{active}} />{{name}}</label>
{{/each}}
</td></tr>
<tr><th align="right">Change Password:</th><td><label><input type="checkbox" name="change-pw-allowed" checked={{chpwAllowedChecked}} /> User has right to change the password</label></td></tr>
{{else}}
<tr><th align="right">Groups:</th><td>{{#each groups}}<span class="btn btn-primary btn-mini">{{this}}</span>{{/each}}</td></tr>
<tr><th align="right">Roles:</th><td>{{#each roles}}<span class="btn btn-primary btn-mini">{{this}}</span>{{/each}}</td></tr>
{{/if}}
{{#if changePasswordAllowed}}
{{#if needOldPassword}}
<tr><th align="right">Old Password:</th><td><input type="password" name="old-password" value="" autocomplete="off" /></td></tr>
{{/if}}
<tr><th align="right">New Password:</th><td><input type="password" name="new-password" value="" autocomplete="off" /></td></tr>
<tr><th align="right">New Password:<div class="comment">repeated</div></th><td><input type="password" name="new-password2" value="" autocomplete="off" /></td></tr>
{{/if}}
<tr><td></td><td><button class="btn btn-primary btn-block save" type="submit">Save Profile</button></td></tr>
{{#if isAdmin}}
{{#if newUser}}{{else}}
<tr><td></td><td><button class="btn btn-warning btn-block delete" type="button">Delete User</button></td></tr>
{{/if}}
{{/if}}
</table>
</form>
{{/with}}
</div>
</template>
<template name="userPanel">
{{#if currentUser}}
<div class="btn-group">
<a href="#" class="btn btn-small dropdown-toggle" data-toggle="dropdown">{{currentUser.username}} <b class="caret"></b></a>
<ul class="dropdown-menu pull-right">
<li><a class="sign-out">Sign Out</a></li>
<li><a class="edit-profile">Edit Profile</a></li>
<li><a class="clear-user-cache">Clear My Cache</a></li>
{{#if isAdmin}}
<li><a class="clear-global-cache">Clear All Users' Cache</a></li>
{{/if}}
</ul>
</div>
{{/if}}
</template>