Project

General

Profile

1 4457 elena.nico
<%@ taglib prefix="s" uri="/struts-tags"%>
2
<%@ page contentType="text/html; charset=UTF-8"%>
3
4 7783 natalia.ma
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5 7976 alexandros
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6 7783 natalia.ma
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 7976 alexandros
    <head>
8
        <title>DRIVER Registration</title>
9 8398 katerina.i
10
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
11 4972 elena.nico
12 13398 katerina.i
        <link href='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/<s:property value="#application['webInterfaceLayoutManager'].cssFileName" />' rel="stylesheet" type="text/css" />
13
        <link rel="shortcut icon" href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/favicon.ico" />
14 4457 elena.nico
15 13398 katerina.i
        <script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3-core.js"></script>
16
        <script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3.1-more.js"></script>
17
        <script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/smarthoverbox.js"></script>
18 7976 alexandros
        <script language="javascript">
19
            function isEmpty(strfield1, strfield2, strfield3) {
20 4457 elena.nico
21 7976 alexandros
                if (strfield1.value == "" || strfield1.value == null
22
                    || !isNaN(strfield1.value) || strfield1.value.charAt(0) == ' ') {
23
                    alert("\"e-mail\" is a mandatory field.")
24
                    strfield1.focus();
25
                    return false;
26
                }
27 4457 elena.nico
28 7976 alexandros
                if (strfield2.value == "") {
29
                    alert("\"password\" is a mandatory field.")
30
                    strfield2.focus();
31
                    return false;
32
                    if (strfield2.value == null) {
33
                        alert("\"password\" is a mandatory field.")
34
                        strfield2.focus();
35
                        return false;
36
                        if (!isNaN(strfield2.value)) {
37
                            alert("\"password\" is a mandatory field.")
38
                            strfield2.focus();
39
                            return false;
40
                            if (strfield2.value.charAt(0) == ' ') {
41
                                alert("\"password\" is a mandatory field.")
42
                                strfield2.focus();
43
                                return false;
44
                            }
45
                        }
46
                    }
47
                }
48 4457 elena.nico
49 7976 alexandros
                //title field
50
                if (strfield3.value == "") {
51
                    alert("\"verify password\" is a mandatory field.")
52
                    strfield3.focus();
53
                    return false;
54
                    if (strfield3.value == null) {
55
                        alert("\"verify password\" is a mandatory field.")
56
                        strfield3.focus();
57
                        return false;
58
                        if (!isNaN(strfield3.value)) {
59
                            alert("\"verify password\" is a mandatory field.")
60
                            strfield3.focus();
61
                            return false;
62
                            if (strfield3.value.charAt(0) == ' ') {
63
                                alert("\"verify password\" is a mandatory field.")
64
                                strfield3.focus();
65
                                return false;
66
                            }
67
                        }
68
                    }
69
                }
70 4457 elena.nico
71 7976 alexandros
                return true;
72
            }
73 4457 elena.nico
74 7976 alexandros
            function isValidEmail(strEmail) {
75
                validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
76
                //alert(strEmail);
77
                if (strEmail.value.search(validRegExp) == -1) {
78
                    alert('A valid e-mail address is required.');
79
                    strEmail.focus();
80
                    strEmail.select();
81
                    return false;
82
                }
83
                return true;
84
            }
85 4457 elena.nico
86 7976 alexandros
            function checkRegistration(form) {
87 4457 elena.nico
88 7976 alexandros
                if (isEmpty(form.regEmail, form.regPassword, form.regVPassword)) {
89
                    if (isValidEmail(form.regEmail)) {
90
                        if (isVerified(form.regPassword, form.regVPassword)) {
91
                            return true;
92
                        }
93
                    }
94
                }
95
                return false;
96
            }
97 4457 elena.nico
98 7976 alexandros
            function checkLogin(form) {
99
                var email = form.email;
100
                var password = form.password;
101 4457 elena.nico
102 7976 alexandros
                if (email.value == "" || email.value == null || !isNaN(email.value)
103
                    || email.value.charAt(0) == ' ') {
104
                    alert("Please enter an e-mail address");
105
                    email.focus();
106
                    return false;
107
                }
108 4457 elena.nico
109 7976 alexandros
                if (password.value == "") {
110
                    alert("Please enter a password");
111
                    password.focus();
112
                    return false;
113
                    if (password.value == null) {
114
                        alert("Please enter a password");
115
                        password.focus();
116
                        return false;
117
                        if (!isNaN(password.value)) {
118
                            alert("Please enter a password");
119
                            password.focus();
120
                            return false;
121
                            if (password.value.charAt(0) == ' ') {
122
                                alert("Please enter a password");
123
                                password.focus();
124
                                return false;
125
                            }
126
                        }
127
                    }
128
                }
129
            }
130 4457 elena.nico
131 7976 alexandros
            function isVerified(field1, field2) {
132 4457 elena.nico
133 7976 alexandros
                var passwd = field1.value;
134
                var confirmation = field2.value;
135 4457 elena.nico
136 7976 alexandros
                if (passwd != confirmation) {
137
                    alert("Your password is not verified");
138
                    field2.focus();
139
                    field2.select();
140
                    return false;
141
                }
142 4457 elena.nico
143 7976 alexandros
                return true;
144 4457 elena.nico
145 7976 alexandros
            }
146
        </script>
147
    </head>
148
    <body>
149
        <div id="center">
150
            <div id="wrapper">
151
                <div class="wrapper_shadowleft">
152
                    <div class="wrapper_shadowright">
153
                        <div id="container">
154
                            <jsp:include page="/pages/banner.jsp"></jsp:include>
155
                            <jsp:include page="/pages/menu.jsp">
156
                                <jsp:param name="requestor" value="index" />
157
                            </jsp:include>
158 4457 elena.nico
159 7976 alexandros
                            <div id="leftcolumn">
160
                                <b class="curved_top">
161
                                    <b class="curved_t1"></b>
162
                                    <b class="curved_t2"></b>
163
                                    <b class="curved_t3"></b>
164
                                    <b class="curved_t4"></b>
165
                                </b>
166
                                <div class="curved_container clearfix">
167
                                    <div class="featured_top leftcolumn_top">Sign in or Register</div>
168 4457 elena.nico
169 7976 alexandros
                                    <p>
170
                                        Register to get the following benefits:
171
                                    <ul>
172 8025 natalia.ma
                                        <li>organize your information space by creating your own collections of objects</li>
173
                                        <li>save your frequent queries and receive notifications about new documents entering the information space</li>
174
                                        <li>subscribe to existing communities or create new ones and invite people to join in</li>
175
176 7976 alexandros
                                        <li>receive alerts and recommendations for related documents-collections-communities</li>
177
                                    </ul>
178
                                    </p>
179
                                </div>
180
                                <b class="curved_bottom">
181
                                    <b class="curved_b4"></b>
182
                                    <b class="curved_b3"></b>
183
                                    <b class="curved_b2"></b>
184
                                    <b class="curved_b1"></b>
185
                                </b>
186
                            </div>
187 4457 elena.nico
188 7976 alexandros
                            <div id="maincolumn2">
189
                                <div id="myPage" >
190
                                    <b class="curved_top">
191
                                        <b class="curved_t1"></b>
192
                                        <b class="curved_t2"></b>
193
                                        <b class="curved_t3"></b>
194
                                        <b class="curved_t4"></b>
195
                                    </b>
196
                                    <div class="curved_container clearfix ">
197 8025 natalia.ma
                                        <div class="featured_top myPage_top">MyDriver</div>
198 7976 alexandros
199 8025 natalia.ma
                                        <div class="sectionHdr">Sign in
200 7976 alexandros
                                        </div>
201
                                        <table class="registertbl">
202
                                            <s:if test="%{#request.mode == 'login'}">
203
                                                <tr>
204
                                                    <td colspan="2" class="loginerror"><s:actionerror /></td>
205
                                                </tr>
206
207
                                            </s:if>
208
209
                                            <s:form theme="simple" action="Account.action"
210
                                                    onsubmit="return checkLogin(this);">
211
                                                <s:hidden name="url" />
212
                                                <s:hidden name="params" value="%{#request['javax.servlet.forward.query_string']}"/>
213
214
                                                <tr align="left">
215
                                                    <td class="registerFieldNm">Email address</td>
216
                                                    <td class="registerField"><s:textfield name="email"
217
                                                                 cssClass="smallfont" /></td>
218
                                                </tr>
219
                                                <tr align="left">
220
                                                    <td class="registerFieldNm">Password</td>
221
                                                    <td class="registerField"><s:password name="password"
222
                                                                cssClass="smallfont" />&nbsp;&nbsp;(<a
223
                                                            href="EditUserPassword.action">Forgot your password?</a>)</td>
224
                                                </tr>
225
                                                <tr align="left">
226
                                                    <td class="registerField"></td>
227 8025 natalia.ma
                                                    <td class="registerField">
228
                                                    <s:submit action="Login" cssClass="button" /></td>
229 7976 alexandros
                                                </tr>
230
                                            </s:form>
231
                                            <tr align="center">
232
                                                <td colspan="2" class="registerField">&nbsp;</td>
233
                                            </tr>
234
                                        </table>
235 8025 natalia.ma
                                        <div class="sectionHdr">Don't have an account yet? Sign up now!</div>
236 7976 alexandros
                                        <table class="registertbl">
237
                                            <tr>
238
                                                <s:if test="%{#request.mode == 'register'}">
239
                                                <tr>
240
                                                    <td colspan="2" class="loginerror"><s:actionerror /></td>
241
                                                </tr>
242
                                            </s:if>
243
244
                                            <s:form theme="simple" action="Account.action"
245
                                                    onsubmit="return checkRegistration(this);">
246
                                                <s:if test="%{#request.activationMessage != null}">
247
                                                    <tr>
248
                                                        <td colspan="2" class="loginerror"><s:property
249
                                                            value="#request.activationMessage" /></td>
250
                                                    </tr>
251
252
                                                </s:if>
253
254
                                                <tr align="left">
255
                                                    <td class="registerFieldNm">Email address <span class="registercomments">*</span></td>
256
                                                    <td class="registerField"><s:textfield name="regEmail"
257
                                                                 cssClass="smallfont" /></td>
258
                                                </tr>
259
                                                <tr align="left">
260
                                                    <td class="registerFieldNm">Password <span class="registercomments">*</span></td>
261
                                                    <td class="registerField"><s:password name="regPassword"
262
                                                                cssClass="smallfont" /></td>
263
                                                </tr>
264
                                                <tr align="left">
265
                                                    <td class="registerFieldNm">Retype password <span class="registercomments">*</span></td>
266
                                                    <td class="registerField"><s:password name="regVPassword"
267
                                                                cssClass="smallfont" />
268
                                                        <div class="registercomments">
269
                                                            * all fields are mandatory and must be completed.
270
                                                        </div>
271
                                                    </td>
272
                                                </tr>
273
                                                <tr align="left">
274
                                                    <td class="registerFieldNm"></td>
275 8025 natalia.ma
                                                    <td class="registerField">
276
                                                    <s:submit action="Register" cssClass="button"/>
277 7976 alexandros
                                                    </td>
278
                                                </tr>
279
                                            </s:form>
280
                                            <tr align="center">
281
                                                <td colspan="2" class="registerField">&nbsp;</td>
282
                                            </tr>
283
                                        </table>
284
285
                                    </div>
286
                                    <b class="curved_bottom">
287
                                        <b class="curved_b4"></b>
288
                                        <b class="curved_b3"></b>
289
                                        <b class="curved_b2"></b>
290
                                        <b class="curved_b1"></b>
291
                                    </b>
292 7700 natalia.ma
                                </div>
293 7976 alexandros
                            </div>
294 4667 elena.nico
295 7976 alexandros
                            <div id="footer">
296 12995 katerina.i
                                <s:action name="FooterPage" executeResult="true"/>
297 7976 alexandros
                            </div>
298
                        </div>
299
                    </div>
300
                </div>
301 7700 natalia.ma
            </div>
302 7976 alexandros
        </div>
303 4667 elena.nico
304 7976 alexandros
    </body>
305 4457 elena.nico
</html>