Project

General

Profile

1
<%@ taglib prefix="s" uri="/struts-tags"%>
2
<%@ page contentType="text/html; charset=UTF-8"%>
3

    
4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
    <head>
8
        <title>DRIVER Registration</title>
9
        
10
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
11

    
12
        <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

    
15
        <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
        <script language="javascript">
19
            function isEmpty(strfield1, strfield2, strfield3) {
20

    
21
                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

    
28
                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

    
49
                //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

    
71
                return true;
72
            }
73

    
74
            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

    
86
            function checkRegistration(form) {
87

    
88
                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

    
98
            function checkLogin(form) {
99
                var email = form.email;
100
                var password = form.password;
101

    
102
                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

    
109
                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

    
131
            function isVerified(field1, field2) {
132

    
133
                var passwd = field1.value;
134
                var confirmation = field2.value;
135

    
136
                if (passwd != confirmation) {
137
                    alert("Your password is not verified");
138
                    field2.focus();
139
                    field2.select();
140
                    return false;
141
                }
142

    
143
                return true;
144

    
145
            }
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

    
159
                            <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

    
169
                                    <p>
170
                                        Register to get the following benefits:
171
                                    <ul>
172
                                        <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
                                        <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

    
188
                            <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
                                        <div class="featured_top myPage_top">MyDriver</div>
198

    
199
                                        <div class="sectionHdr">Sign in
200
                                        </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
                                                    <td class="registerField">
228
                                                    <s:submit action="Login" cssClass="button" /></td>
229
                                                </tr>
230
                                            </s:form>
231
                                            <tr align="center">
232
                                                <td colspan="2" class="registerField">&nbsp;</td>
233
                                            </tr>
234
                                        </table>
235
                                        <div class="sectionHdr">Don't have an account yet? Sign up now!</div>
236
                                        <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
                                                    <td class="registerField">
276
                                                    <s:submit action="Register" cssClass="button"/>
277
                                                    </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
                                </div>
293
                            </div>
294

    
295
                            <div id="footer">
296
                                <s:action name="FooterPage" executeResult="true"/>
297
                            </div>
298
                        </div>
299
                    </div>
300
                </div>
301
            </div>
302
        </div>
303

    
304
    </body>
305
</html>
(20-20/25)