Show More
@@ -1,144 +1,144 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Add user')} |
|
6 | 6 | %if c.rhodecode_name: |
|
7 | 7 | · ${h.branding(c.rhodecode_name)} |
|
8 | 8 | %endif |
|
9 | 9 | </%def> |
|
10 | 10 | <%def name="breadcrumbs_links()"> |
|
11 | 11 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
12 | 12 | » |
|
13 | 13 | ${h.link_to(_('Users'),h.url('users'))} |
|
14 | 14 | » |
|
15 | 15 | ${_('Add User')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="menu_bar_nav()"> |
|
19 | 19 | ${self.menu_items(active='admin')} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="main()"> |
|
23 | 23 | <div class="box"> |
|
24 | 24 | <!-- box / title --> |
|
25 | 25 | <div class="title"> |
|
26 | 26 | ${self.breadcrumbs()} |
|
27 | 27 | </div> |
|
28 | 28 | <!-- end box / title --> |
|
29 | 29 | ${h.secure_form(url('users'))} |
|
30 | 30 | <div class="form"> |
|
31 | 31 | <!-- fields --> |
|
32 | 32 | <div class="fields"> |
|
33 | 33 | <div class="field"> |
|
34 | 34 | <div class="label"> |
|
35 | 35 | <label for="username">${_('Username')}:</label> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="input"> |
|
38 | 38 | ${h.text('username', class_='medium')} |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | 42 | <div class="field"> |
|
43 | 43 | <div class="label"> |
|
44 | 44 | <label for="password">${_('Password')}:</label> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="input"> |
|
47 | 47 | ${h.password('password', class_='medium')} |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | |
|
51 | 51 | <div class="field"> |
|
52 | 52 | <div class="label"> |
|
53 | 53 | <label for="password_confirmation">${_('Password confirmation')}:</label> |
|
54 | 54 | </div> |
|
55 | 55 | <div class="input"> |
|
56 | 56 | ${h.password('password_confirmation',autocomplete="off", class_='medium')} |
|
57 | 57 | <div class="info-block"> |
|
58 | 58 | <a id="generate_password" href="#"> |
|
59 | 59 | <i class="icon-lock"></i> ${_('Generate password')} |
|
60 | 60 | </a> |
|
61 | 61 | <span id="generate_password_preview"></span> |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | </div> |
|
65 | 65 | |
|
66 | 66 | <div class="field"> |
|
67 | 67 | <div class="label"> |
|
68 | 68 | <label for="firstname">${_('First Name')}:</label> |
|
69 | 69 | </div> |
|
70 | 70 | <div class="input"> |
|
71 | 71 | ${h.text('firstname', class_='medium')} |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label"> |
|
77 | 77 | <label for="lastname">${_('Last Name')}:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="input"> |
|
80 | 80 | ${h.text('lastname', class_='medium')} |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | |
|
84 | 84 | <div class="field"> |
|
85 | 85 | <div class="label"> |
|
86 | 86 | <label for="email">${_('Email')}:</label> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="input"> |
|
89 | 89 | ${h.text('email', class_='medium')} |
|
90 | 90 | ${h.hidden('extern_name', c.default_extern_type)} |
|
91 | 91 | ${h.hidden('extern_type', c.default_extern_type)} |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | |
|
95 | 95 | <div class="field"> |
|
96 | 96 | <div class="label label-checkbox"> |
|
97 | 97 | <label for="active">${_('Active')}:</label> |
|
98 | 98 | </div> |
|
99 | 99 | <div class="checkboxes"> |
|
100 | 100 | ${h.checkbox('active',value=True,checked='checked')} |
|
101 | 101 | </div> |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <div class="field"> |
|
105 | 105 | <div class="label label-checkbox"> |
|
106 | 106 | <label for="password_change">${_('Password change')}:</label> |
|
107 | 107 | </div> |
|
108 | 108 | <div class="checkboxes"> |
|
109 | 109 | ${h.checkbox('password_change',value=True)} |
|
110 | 110 | <span class="help-block">${_('Force user to change his password on the next login')}</span> |
|
111 | 111 | </div> |
|
112 | 112 | </div> |
|
113 | 113 | |
|
114 | 114 | <div class="field"> |
|
115 | 115 | <div class="label label-checkbox"> |
|
116 | 116 | <label for="create_repo_group">${_('Add repository group')}:</label> |
|
117 | 117 | </div> |
|
118 | 118 | <div class="checkboxes"> |
|
119 | 119 | ${h.checkbox('create_repo_group',value=True)} |
|
120 | 120 | <span class="help-block">${_('Add repository group with the same name as username. \nUser will be automatically set as this group owner.')}</span> |
|
121 | 121 | </div> |
|
122 | 122 | </div> |
|
123 | 123 | |
|
124 | 124 | <div class="buttons"> |
|
125 | 125 | ${h.submit('save',_('Save'),class_="btn")} |
|
126 | 126 | </div> |
|
127 | 127 | </div> |
|
128 | 128 | </div> |
|
129 | 129 | ${h.end_form()} |
|
130 | 130 | </div> |
|
131 | </%def> | |
|
132 | 131 | <script> |
|
133 | 132 | $(document).ready(function(){ |
|
134 | 133 | $('#username').focus(); |
|
135 | 134 | |
|
136 | 135 | $('#generate_password').on('click', function(e){ |
|
137 | 136 | var tmpl = "(${_('generated password:')} {0})" |
|
138 | 137 | var new_passwd = generatePassword(12) |
|
139 | 138 | $('#generate_password_preview').html(tmpl.format(new_passwd)) |
|
140 | 139 | $('#password').val(new_passwd); |
|
141 | 140 | $('#password_confirmation').val(new_passwd); |
|
142 | 141 | }) |
|
143 | 142 | }) |
|
144 | 143 | </script> |
|
144 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now