Project

General

Profile

metacat / lib / style / skins / sanparks / SaeonLogin.jspx @ 3435

1
<?xml version="1.0" encoding="UTF-8"?>
2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
3

    
4
	<!-- to change the content type or response encoding change the following line -->
5
	<jsp:directive.page contentType="text/html;charset=UTF-8" />
6
	<jsp:directive.page
7
		import="edu.ucsb.nceas.metacat.clientview.ClientView" />
8
	<jsp:directive.page
9
		import="edu.ucsb.nceas.metacat.clientview.ClientViewHelper" />
10
	<jsp:directive.page
11
		import="edu.ucsb.nceas.metacat.clientview.ClientHtmlHelper" />
12

    
13
	<jsp:declaration>
14
        private ClientViewHelper clientViewHelper = null;
15
    </jsp:declaration>
16

    
17
<html xmlns="http://www.w3.org/1999/xhtml">
18
<head>
19

    
20
	<script type="text/javascript">
21
                
22
                function allowSubmit(formObj) {
23
                    var     result = true;
24
                    var     action = "";
25

    
26
                    action = trim(formObj.elements["action"].value);
27
                    if (action == "Login") {
28
                        if (isEmpty(formObj.elements["username"])) {
29
                            result = false;
30
                            alert("User name is required");
31
                        } else if (isEmpty(formObj.elements["organization"])) {
32
                            result = false;
33
                            alert("Organization is required");
34
                        } else if (isEmpty(formObj.elements["password"])) {
35
                            result = false;
36
                            alert("Password is required");
37
                        }
38
                    }
39
                    
40
                    return(result);
41
                }
42
                
43
                function isEmpty(aTextField) {
44
                    var value = trim(aTextField.value);
45
                    var result = ((value.length == 0) || (value == null));
46
                    return(result);
47
                }
48

    
49
		function trim(stringToTrim) {
50
			return(stringToTrim.replace(/^\s+|\s+$/g,""));
51
		}
52
    </script>
53

    
54
	<title>SANParks - South African National Park Data Repository</title>
55
	<link href="sanparks.css" rel="stylesheet" type="text/css" />
56

    
57
</head>
58
	
59
<body>
60
<!-- <body style="background: #FFFFFF;">-->
61
	<div class="templatecontentareaclass">
62
		<jsp:useBean id="clientViewBean" scope="session" class="edu.ucsb.nceas.metacat.clientview.ClientView" /> 
63
		<jsp:setProperty name="clientViewBean" property="*" /> 
64
		<jsp:scriptlet>
65
			clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
66
			clientViewHelper.clientRequest(request, response);
67
        </jsp:scriptlet>
68

    
69
	<table>
70
	<tr>
71
		<td colspan="3">
72
			<p class="regtext">
73
			Welcome to the SANParks Data Repository. 
74
			This is the primary source for comprehensive information about scientific 
75
			and research data sets collected throughout the South African National Park System.
76
			</p>
77
		</td>
78
	</tr>
79
	<tr valign="top">
80
	<td>
81
	
82
	<h2>Search for SANParks Data</h2>
83
	
84
	<p class="emphasis">Searching: 
85
		<jsp:scriptlet>
86
			String organizationScope = request.getParameter("organizationScope");
87
			if (organizationScope == null) {
88
				organizationScope = "%";
89
			}
90
			if (!organizationScope.equals("%")) {
91
		</jsp:scriptlet>
92
			<jsp:expression>request.getParameter("organizationScope")</jsp:expression>
93
		<jsp:scriptlet>
94
			}
95
			else {
96
		</jsp:scriptlet>
97
			All Organizations	
98
		<jsp:scriptlet>
99
			}
100
		</jsp:scriptlet>
101
	</p>
102
	
103
	<form name="searchform" method="post" action="../../../metacat" target="_top">
104
		<jsp:include page="SimpleSearchMetacatPostFields.html" /> 
105
		<jsp:element name="input">
106
			<jsp:attribute name="name">sessionid</jsp:attribute>
107
			<jsp:attribute name="type">hidden</jsp:attribute>
108
			<jsp:attribute name="value">
109
				<jsp:getProperty name="clientViewBean" property="sessionid" />
110
			</jsp:attribute>
111
		</jsp:element> 
112
		<p class="regtext">
113
		The repository search system is used to locate data sets of interest by 
114
		searching through existing registered data sets. 
115
		Presently the search covers all fields, including author, title, abstract, 
116
		keywords, and other documentation for each data set. 
117
		<br />
118
		Use a '%' symbol as a wildcard in searches (e.g., '%herbivore%' 
119
		would locate any phrase with the word herbivore embedded within it).
120
		</p>
121
			<input name="anyfield" value="" type="text" size="14" />
122
			<input name="action" value="query" type="hidden" />  
123
			<input value="Search" type="submit" /> 
124
		
125
	</form>
126
	<p class="regtext">
127
	-Or-
128
	</p>
129
	<form name="browseform" method="post" action="../../../metacat"
130
		target="_top">
131
		<jsp:include page="SimpleSearchMetacatPostFields.html" /> 
132
		<input name="anyfield" type="hidden" value="%" /> 
133
		<jsp:element name="input">
134
			<jsp:attribute name="name">sessionid</jsp:attribute>
135
			<jsp:attribute name="type">hidden</jsp:attribute>
136
			<jsp:attribute name="value">
137
				<jsp:getProperty name="clientViewBean" property="sessionid" />
138
			</jsp:attribute>
139
		</jsp:element>
140
		<p class="regtext">
141
		Browse all existing data sets by title. This operation can be slow.
142
		</p>
143
		<input name="action" value="query" type="hidden" />
144
		<input value="Browse All" type="submit" />
145
	</form>
146

    
147
	</td>
148
	<td>
149
	
150
	<!-- Login section -->
151
	<jsp:scriptlet>
152
		if (!clientViewHelper.isLoggedIn()) {
153
	</jsp:scriptlet>
154
	
155
	<h3>
156
		Login
157
		<!-- TODO: Config param follows --> 
158
		<a href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi" target="_parent">
159
			<span class="regtext"> (request an account...)</span>
160
		</a>
161
	</h3>
162
	<form name="loginForm" method="post" action="./"
163
		onsubmit="return allowSubmit(this)">
164
		<input name="qformat" type="hidden" value="sanparks" />
165
	<table>
166
		<tr valign="top">
167
			<td>
168
				<span class="required">User name</span>	
169
			</td>
170
			<td>
171
				<input name="username" type="text" value=""
172
				style="width: 140" />
173
			</td>
174
		</tr>
175
		<tr>
176
			<td><span class="required">Organization</span></td>
177
			<td><select name="organization" style="width: 140">
178
				<option value="SANParks" selected="">SANParks</option>
179
				<option value="SAEON">SAEON</option>
180
				<option value="NCEAS">NCEAS</option>
181
				<option value="unaffiliated">unaffiliated</option>
182
			</select></td>
183
		</tr>
184
		<tr>
185
			<td><span class="required">Password</span></td>
186
			<td><input name="password" value="" type="password"
187
				style="width: 140" maxlength="50" /></td>
188
		</tr>
189
		<tr>
190
			<td colspan="2" align="center">
191
				<input name="action"
192
				value="Login" type="submit" class="button_login" />
193
			</td>
194
		</tr>
195
	</table>
196
	</form>
197
	
198
	<jsp:scriptlet>
199
		} else {
200
	</jsp:scriptlet>
201
	<h3>
202
		Welcome,
203
		<jsp:expression>clientViewBean.getUsername()</jsp:expression>  
204
	</h3>
205
	<form name="logoutForm" method="post" action="./">
206
	<input name="qformat" value="sanparks" type="hidden" />
207
	<table>
208
		<tr valign="top">
209
			<td>
210
				<p class="regtext">
211
					You are currently logged in.
212
				</p>
213
			</td>
214
			<td align="right">
215
				<input name="action" type="submit" value="Logout" class="button_login" />
216
			</td>
217
		</tr>
218
		<tr valign="top">
219
			<td colspan="2">
220
				<p class="regtext">
221
					(<jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression>)
222
				</p>
223
			</td>
224
		</tr>	
225
		<tr>	
226
			<td colspan="2"
227
				class="regtext" 
228
				align="center" 
229
				valign="top">
230
				
231
				<!-- TODO: Config param follows --> 
232
				<a
233
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass"
234
					target="_parent">reset your password</a>
235
				|
236
				<!-- TODO: Config param follows --> 
237
				<a
238
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
239
					target="_parent">change your password</a>
240
			</td>
241
		</tr>
242
	</table>
243
	</form>
244
	<jsp:scriptlet>
245
		}
246
	</jsp:scriptlet> 
247
	
248
	<!-- File Upload Form --> 
249
	<br />
250
	<h3>Data Package Upload</h3>
251
	
252
	<jsp:scriptlet>
253
		if (clientViewHelper.isLoggedIn()) {
254
	</jsp:scriptlet>
255
	<table width="100%">
256
		<tr valign="top">
257
			<td align="right">
258
				<form action="./upload.jsp" method="post">
259
					<input name="action" type="submit" value="Go >" class="button_login" />
260
				</form>
261
			</td>
262
		</tr>
263
	</table>			
264
	<jsp:scriptlet>
265
		} else {
266
	</jsp:scriptlet>
267
	
268
	<p class="regtext">
269
		You must be logged into your user account before uploading a data set.
270
	</p>
271
	<jsp:scriptlet>
272
		}
273
	</jsp:scriptlet>
274
	
275
	</td>
276
	
277
	<!-- so the map frame doesn't overlap content -->
278
	<td width="50px"></td>
279
	
280
	</tr>
281
	
282
	<tr>
283
	<td colspan="2" align="center">
284
	
285
	
286
	<!-- Map here --> 
287
	<br />
288
	<h3>Southern Africa</h3>
289
	
290
		<!-- 
291
		<iframe
292
			id="mapFrame"
293
			name="mapFrame"
294
			class="mapFrame"
295
			frameborder="0"
296
			scrolling="no"
297
			src="spatial/pma.html">
298
		</iframe>
299
		-->
300
	</td>
301
	
302
	<!-- so the map frame doesn't overlap content -->
303
	<td width="50px"></td>
304
	
305
	</tr>
306
	
307
	</table>
308
	
309
	</div>
310
</body>
311
</html>
312
</jsp:root>