summaryrefslogtreecommitdiffstats
path: root/WebHob_1.5/newuser.html
blob: 1698d4ac1e332edb0d9797086932feeb412659b5 (plain)
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html>
    <head>
        <title>Toaster</title>
        <link rel="stylesheet" href="assets/css/bootstrap.min.css" type='text/css'>
        <link rel="stylesheet" href="assets/css/bootstrap-responsive.min.css" type='text/css'>
        <link rel="stylesheet" href="assets/css/font-awesome.min.css" type='text/css'>
        <link rel="stylesheet" href="assets/css/prettify.css" type='text/css'>
        <link rel="stylesheet" href="assets/css/jquery-ui-1.10.3.custom.min.css" type='text/css'>
        <link rel="stylesheet" href="assets/css/default.css" type='text/css'>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>

    <body>
		<div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
            	<div class="container-fluid">
					<a class="brand logo" href="index.html"><img src="assets/img/logo.png" class="" /></a>
					<a class="brand" href="index.html">Toaster</a>
					<ul class="nav">
						<li>
							<a href="index.html">
								<i class="icon-tasks"></i>
								All builds
							</a>
						</li>
						<li>
							<a href="all-projects.html">
								<i class="icon-folder-open"></i>
								All projects
							</a>
						</li>
						<li>
							<a href="all-users.html">
								<i class="icon-user"></i>
								All users
							</a>
						</li>
						<li>
							<a href="#">
								<i class="icon-book"></i>
								Manual
							</a>
						</li>
						<li>
							<a href="#">
								<i class="icon-cog"></i>
								Administration
							</a>
						</li>
					</ul>
					<div class="btn-group pull-right">
						<button class="btn dropdown-toggle" data-toggle="dropdown" href="#">
							<i class="icon-user"></i>
							You
							<i class="icon-caret-down"></i>
						</button>
						<ul class="dropdown-menu">
							<li><a href="profile.html">Edit your profile</a></li>
							<li><a href="profile.html?change-password">Change password</a></li>
							<li style="margin-top:10px;"><a href="#" class="btn">Log out</a></li>
						</ul>
					</div>
					<span class="pull-right divider-vertical"></span>
				</div>
            </div>
        </div>

		<div class="container-fluid top-padded">
    		<div class="row-fluid">
				<div class="page-header">
					<h1>Create a new user</h1>
				</div>
				<form>
					<fieldset>
						<label>Email address <span class="muted">(required)</span></label>
						<input type="email" class="input-xlarge " required id="name">
						<label class="project-form">
							What can this user do?
						</label>
						<label class="checkbox project-form">
							<input type="checkbox"> Can create projects
							<i class="icon-question-sign get-help" title="Tick the box to allow users to create new Toaster projects and invite people to them"></i>
						</label>
						<label class="checkbox project-form">
							<input type="checkbox"> Is a Toaster administrator
							<i class="icon-question-sign get-help" title="Adminstrators have access to all projects, can assign permissions to other Toaster users and change the Toaster configuration"></i>
						</label>
						<label style="margin-top:20px;">
							Invite this user to one or more Toaster projects
							<i class="icon-question-sign get-help" title="Users invited to a project will be able to see build information, download build artifacts, run builds and edit the project configuration"></i>
						</label>
						<input id="filter-projects" type="text" placeholder="Search projects" class="span4">
						<div id="all-projects" class="scrolling">
							<label class="checkbox">
								<input type="checkbox"> Project one
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project two
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project three
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project four
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project five
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project six
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project seven
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project eight
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project nine
							</label>
							<label class="checkbox">
								<input type="checkbox"> Project ten
							</label>
						</div>
					</fieldset>

					<div class="form-actions air">
						<a href="project-no-targets.html" class="btn btn-primary btn-large" disabled>Create user</a>
						<span class="help-inline" style="vertical-align:middle;">To create a user, you need to enter an email address</span>
					</div>
				</form>
			</div>
		</div>


  <script src="assets/js/jquery-1.9.1.min.js" type='text/javascript'></script>
	<script src="assets/js/jquery.tablesorter.min.js" type='text/javascript'></script>
	<script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
	<script src="assets/js/bootstrap.min.js" type='text/javascript'></script>
	<script src="assets/js/prettify.js" type='text/javascript'></script>
	<script src="assets/js/jit.js" type='text/javascript'></script>
	<script src="assets/js/main.js" type='text/javascript'></script>

	<script>
		$(document).ready(function() {

			// enable submit button when all required fields are populated
			$('input:first').keyup(function() {
				if ($('input:first').val().length > 0 ){
					$('.btn-primary').removeAttr('disabled');
					$(".help-inline").css('visibility','hidden');
				}
				else {
					$('.btn-primary').attr('disabled', 'disabled');
					$(".help-inline").css('visibility','visible');
				}
			});

			// show relevant help text for the selected release
			var selected_release = $('select').val();
			$('#local, #master, #dizzy, #d').hide();
			$('#' + selected_release).show();

			$('select').change(function(){
				var new_release = $('select').val();
				$('#local, #master, #dizzy, #d').hide();
				$('#' + new_release).fadeIn();
			});

			/*
			// toggle additional input fields
			$("#user2").hide();
			$("#user-email").change(function() {
				$("#user2").fadeIn();
			});
			$("#user-email").keyup(function() {
				if ( !$("#user-email").val() ) {
					$("#user2").fadeOut();
				}
			});
			*/

			function addUser() {
				$("#invite-users").append("<div><input type='email' class='input-xlarge' required></div>");
			};

			$(document).on("keyup", "input[type=email]:last", function() {
				if ( $(this).val() ) {
					addUser();
				}
			});

			/*
			// show user permissions after email address is provided
			$("[id^=permissions], #invite-more").hide();
			$("#user-email").change(function() {
				$("[id^=permissions], #invite-more").hide();
				if ( $(this).val() == "belen.barros.pena@linux.intel.com" ) {
					$("#permissions-belen, #invite-more").fadeIn();
				}
				else if ( $(this).val() == "alexandru.damian@linux.intel.com" ) {
					$("#permissions-alex, #invite-more").fadeIn();
				}
				else {
					$("#permissions-other, #invite-more").fadeIn();
				}
			});
			$("#user-email").keyup(function() {
				if ( !$("#user-email").val() ) {
					$("[id^=permissions], #invite-more, #user2").fadeOut();
				}
			});

			$("#permissions-alex .toaster-admin").change(function() {
				$("#permissions-alex .project-creator").removeAttr("disabled");
			});

			// invite another user
			$("#invite-more").click(function() {
				$("#user2").fadeIn();
				$("#invite-more").fadeOut();
			});
			*/

			// Pass the project name onto the project page
			$('#name').blur(function(){
				name = $('#name').val();
				target = 'project-no-targets.html#project=' + name;
				$('.btn-primary').attr('href',target);
			});

		});

	</script>

    </body>
</html>