Revision 49560
Added by Sofia Baltzi over 6 years ago
modules/dnet-openaire-users/trunk/src/main/webapp/register.jsp | ||
---|---|---|
1 |
<%-- |
|
2 |
Created by IntelliJ IDEA. |
|
3 |
User: sofia |
|
4 |
Date: 19/10/2017 |
|
5 |
Time: 4:30 μμ |
|
6 |
To change this template use File | Settings | File Templates. |
|
7 |
--%> |
|
8 |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
|
9 |
<!DOCTYPE html> |
|
10 |
<html lang="en-gb" dir="ltr" vocab="http://schema.org/"> |
|
11 |
<head> |
|
12 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
13 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
14 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
15 |
<base href="."> |
|
16 |
<title>OpenAIRE - Register</title> |
|
17 |
<script src="./js/jquery.js"></script> |
|
18 |
<script src="./js/uikit.js"></script> |
|
19 |
<script src="./js/validation.js"></script> |
|
20 |
<script src="./OpenAIRE_files/uikit-icons-max.js"></script> |
|
21 |
<link rel="stylesheet" style="text/css" href="./css/theme.css"> |
|
22 |
<link rel="stylesheet" style="text/css" href="./css/custom.css"> |
|
23 |
<link rel="stylesheet" style="text/css" href="./css/aai-custom.css"> |
|
24 |
</head> |
|
25 |
<body class="" style=""> |
|
26 |
<div class="uk-offcanvas-content uk-height-viewport"> |
|
27 |
<!-- MENU STARTS HERE --> |
|
28 |
<!-- MAIN MENU STARTS HERE --> |
|
29 |
<div class="tm-header tm-header-transparent" uk-header=""> |
|
30 |
<div class="uk-container uk-container-expand"> |
|
31 |
<nav class="uk-navbar" uk-navbar="{"align":"left"}"> |
|
32 |
<div class="uk-navbar-center"> |
|
33 |
<div class="uk-logo uk-navbar-item"> |
|
34 |
<img alt="OpenAIRE" class="uk-responsive-height" src="./images/Logo_Horizontal.png"> |
|
35 |
</div> |
|
36 |
</div> |
|
37 |
</nav> |
|
38 |
</div> |
|
39 |
</div> |
|
40 |
<!-- MENU ENDS HERE --> |
|
41 |
<!-- CONTENT STARTS HERE --> |
|
42 |
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical"> |
|
43 |
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid" uk-grid=""> |
|
44 |
</div> |
|
45 |
</div> |
|
46 |
<div class=" uk-section uk-margin-small-top tm-middle custom-main-content" id="tm-main"> |
|
47 |
<div class="uk-container uk-container-small uk-margin-medium-top uk-margin-small-bottom uk-text-center"> |
|
48 |
<h2 class="uk-h2 uk-margin-small-bottom">Create new OpenAIRE account</h2> |
|
49 |
<div class="uk-text-meta uk-margin-large-bottom">Use the same credentials for all our services</div> |
|
50 |
<div uk-grid="" class="uk-grid uk-grid-stack"> |
|
51 |
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first uk-first-column"> |
|
52 |
<div class="uk-grid "> |
|
53 |
<!-- CENTER SIDE --> |
|
54 |
<div class="uk-width-1-1@m uk-width-1-1@s uk-text-center"> |
|
55 |
<h3 class="uk-h3">Create an account</h3> |
|
56 |
<div class="middle-box text-center loginscreen animated fadeInDown "> |
|
57 |
<div class="uk-width-1-3@m uk-align-center"> |
|
58 |
<!-- REGISTER FORM --> |
|
59 |
<div id="registerForm"> |
|
60 |
<form target="GWTBootstrap3_AbstractForm_RepositoryManager_1" role="form" class="m-t" id="register_form"> |
|
61 |
<div class="alert alert-success" aria-hidden="true" style="display: none;"></div> |
|
62 |
<div class="alert alert-danger" aria-hidden="true" style="display: none;"></div> |
|
63 |
<div class="form-group"> |
|
64 |
<span class="msg_first_name_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter your first name.</span> |
|
65 |
<input id="first_name" name="first_name" type="text" placeholder="First name" class="form-control"></div> |
|
66 |
<div class="form-group"> |
|
67 |
<span class="msg_last_name_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter your last name.</span> |
|
68 |
<input id="last_name" name="last_name" type="text" placeholder="Last name" class="form-control"></div> |
|
69 |
<div class="form-group"> |
|
70 |
<span class="msg_username_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter your username.</span> |
|
71 |
<input id="username" name="username" type="text" placeholder="Username" class="form-control"></div> |
|
72 |
<div class="form-group"> |
|
73 |
<span class="msg_email_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter your email.</span> |
|
74 |
<span class="msg_email_validation_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter a valid email.</span> |
|
75 |
<span class="msg_email_conf_error uk-text-danger uk-text-small uk-float-left" style="display:none">These emails don't match.</span> |
|
76 |
<input id="email" name="email" type="text" placeholder="Email" class="form-control"></div> |
|
77 |
<div class="form-group"> |
|
78 |
<input id="email_conf" name="email_conf" type="text" placeholder="Confirm email" class="form-control"></div> |
|
79 |
<div class="form-group"> |
|
80 |
<span class="msg_password_error uk-text-danger uk-text-small uk-float-left" style="display:none">Please enter your password.</span> |
|
81 |
<span class="msg_pass_conf_error uk-text-danger uk-text-small uk-float-left" style="display:none">These passwords don't match.</span> |
|
82 |
<p><span class="msg_please_add uk-text-danger uk-text-small uk-float-left" style="display:none">Please add:  </span></p> |
|
83 |
<span class="msg_lowercase_letter uk-text-danger uk-text-small uk-float-left" style="display:none">A lowercase letter.  </span> |
|
84 |
<span class="msg_capital_letter uk-text-danger uk-text-small uk-float-left" style="display:none">A capital (uppercase) letter.   </span> |
|
85 |
<span class="msg_number uk-text-danger uk-text-small uk-float-left" style="display:none">A number.  </span> |
|
86 |
<span class="msg_lenght uk-text-danger uk-text-small uk-float-left" style="display:none">Minimum 6 characters.  </span> |
|
87 |
<input id="password" name="password" type="password" placeholder="Password" class="form-control"></div> |
|
88 |
<div class="form-group"> |
|
89 |
<input id="password_conf" name="password_conf" type="password" placeholder="Confirm password" class="form-control"></div> |
|
90 |
<div class="uk-margin uk-grid-small uk-child-width-auto uk-grid uk-text-left uk-grid-stack" uk-grid=""> |
|
91 |
<div class="uk-width-1-1 uk-text-meta uk-text-danger uk-first-column">All fields are required</div> |
|
92 |
<div class="uk-width-1-1 uk-grid-margin uk-first-column">RECAPTHA I AM NOT A ROBOT THING GOES HERE</div> |
|
93 |
<div class="uk-width-1-1 uk-grid-margin uk-first-column"> |
|
94 |
<button type="button" class="uk-button uk-button-primary" onclick="validateForm();">Register</button> |
|
95 |
</div> |
|
96 |
</div> |
|
97 |
</form> |
|
98 |
</div> |
|
99 |
<!-- END OF REGISTER FORM --> |
|
100 |
<script> |
|
101 |
|
|
102 |
var myInput = document.getElementById("password"); |
|
103 |
|
|
104 |
// When the user starts to type something inside the password field |
|
105 |
myInput.onkeyup = function() { |
|
106 |
|
|
107 |
// Validate lowercase letters |
|
108 |
var lowerCaseLetters = /[a-z]/g; |
|
109 |
if (myInput.value.match(lowerCaseLetters)) { |
|
110 |
$(".msg_lowercase_letter").fadeOut(); |
|
111 |
} else { |
|
112 |
$(".msg_lowercase_letter").fadeIn(); |
|
113 |
} |
|
114 |
|
|
115 |
// Validate capital letters |
|
116 |
var upperCaseLetters = /[A-Z]/g; |
|
117 |
if (myInput.value.match(upperCaseLetters)) { |
|
118 |
$(".msg_capital_letter").fadeOut(); |
|
119 |
} else { |
|
120 |
$(".msg_capital_letter").fadeIn(); |
|
121 |
} |
|
122 |
|
|
123 |
// Validate numbers |
|
124 |
var numbers = /[0-9]/g; |
|
125 |
if (myInput.value.match(numbers)) { |
|
126 |
$(".msg_number").fadeOut(); |
|
127 |
} else { |
|
128 |
$(".msg_number").fadeIn(); |
|
129 |
} |
|
130 |
|
|
131 |
// Validate length |
|
132 |
if (myInput.value.length >= 6) { |
|
133 |
$(".msg_lenght").fadeOut(); |
|
134 |
} else { |
|
135 |
$(".msg_lenght").fadeIn(); |
|
136 |
} |
|
137 |
|
|
138 |
if(myInput.value.match(lowerCaseLetters) && myInput.value.match(upperCaseLetters) |
|
139 |
&& myInput.value.match(numbers) && (myInput.value.length >= 6)){ |
|
140 |
if($(".msg_please_add").css('display')!='none'){ |
|
141 |
$(".msg_please_add").fadeOut(); |
|
142 |
} |
|
143 |
} else { |
|
144 |
if($(".msg_please_add").css('display')=='none') { |
|
145 |
$(".msg_please_add").fadeIn(); |
|
146 |
} |
|
147 |
} |
|
148 |
} |
|
149 |
|
|
150 |
$("#first_name").focusin(function () { |
|
151 |
$(this).removeClass('aai-form-danger'); |
|
152 |
$(".msg_first_name_error").fadeOut(); |
|
153 |
}); |
|
154 |
|
|
155 |
$("#last_name").focusin(function () { |
|
156 |
$(this).removeClass('aai-form-danger'); |
|
157 |
$(".msg_last_name_error").fadeOut(); |
|
158 |
}); |
|
159 |
|
|
160 |
$("#username").focusin(function () { |
|
161 |
$(this).removeClass('aai-form-danger'); |
|
162 |
$(".msg_username_error").fadeOut(); |
|
163 |
}); |
|
164 |
|
|
165 |
$("#email").focusin(function () { |
|
166 |
$(this).removeClass('aai-form-danger'); |
|
167 |
$(".msg_email_error").fadeOut(); |
|
168 |
}); |
|
169 |
|
|
170 |
$("#email_conf").focusin(function () { |
|
171 |
$(this).removeClass('aai-form-danger'); |
|
172 |
$(".msg_email_conf_error").fadeOut(); |
|
173 |
}); |
|
174 |
|
|
175 |
$("#password").focusin(function () { |
|
176 |
$(this).removeClass('aai-form-danger'); |
|
177 |
$(".msg_please_add").fadeOut(); |
|
178 |
$(".msg_password_error").fadeOut(); |
|
179 |
$(".msg_pass_conf_error").fadeOut(); |
|
180 |
$(".msg_lowercase_letter").fadeOut(); |
|
181 |
$(".msg_capital_letter").fadeOut(); |
|
182 |
$(".msg_number").fadeOut(); |
|
183 |
$(".msg_lenght").fadeOut(); |
|
184 |
}); |
|
185 |
|
|
186 |
$("#password_conf").focusin(function () { |
|
187 |
$(this).removeClass('aai-form-danger'); |
|
188 |
$(".msg_pass_conf_error").fadeOut(); |
|
189 |
}); |
|
190 |
|
|
191 |
</script> |
|
192 |
</div> |
|
193 |
</ul> |
|
194 |
</div> |
|
195 |
</div> |
|
196 |
<!-- END OF CENTER SIDE --> |
|
197 |
</div> |
|
198 |
</div> |
|
199 |
</div> |
|
200 |
</div> |
|
201 |
</div> |
|
202 |
<!-- CONTENT ENDS HERE --> |
|
203 |
<!-- FOOTER STARTS HERE--> |
|
204 |
<div class="custom-footer"> |
|
205 |
<div class="uk-section-primary uk-section uk-section-small uk-padding-remove-bottom"> |
|
206 |
<div class="uk-container"> |
|
207 |
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid=""> |
|
208 |
<div class="uk-width-expand@m uk-light uk-first-column"> |
|
209 |
FOOTER??? |
|
210 |
</div> |
|
211 |
</div> |
|
212 |
</div> |
|
213 |
</div> |
|
214 |
</div> |
|
215 |
</div> |
|
216 |
</body> |
|
217 |
</html> |
Also available in: Unified diff
Add register.jsp with javascript