Project

General

Profile

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

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

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

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

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

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

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

    
68
	<li>Search for SANParks Data
69
	<form name="searchform" method="post" action="../../../metacat"
70
		target="_top"><jsp:include
71
		page="SimpleSearchMetacatPostFields.html" /> <jsp:element name="input">
72
                                <jsp:attribute name="name">sessionid</jsp:attribute>
73
                                <jsp:attribute name="type">hidden</jsp:attribute>
74
                                <jsp:attribute name="value"><jsp:getProperty
75
				name="clientViewBean" property="sessionid" /></jsp:attribute>
76
                            </jsp:element> <br />
77
	<p class="regtext"><input name="anyfield" value="" type="text"
78
		size="14" /> <input name="action" value="query" type="submit" /> all
79
	fields, including author, title, abstract, keywords, and other
80
	documentation. Use a '%' symbol as a wildcard (e.g., '%biodiversity%').
81
	</p>
82
	</form>
83
	<br />
84
	</li>
85

    
86
	<li>Browse SANParks data sets
87

    
88
	<form name="browseform" method="post" action="../../../metacat"
89
		target="_top"><jsp:include
90
		page="SimpleSearchMetacatPostFields.html" /> <input name="anyfield"
91
		type="hidden" value="%" /> <jsp:element name="input">
92
                                <jsp:attribute name="name">sessionid</jsp:attribute>
93
                                <jsp:attribute name="type">hidden</jsp:attribute>
94
                                <jsp:attribute name="value"><jsp:getProperty
95
				name="clientViewBean" property="sessionid" /></jsp:attribute>
96
                            </jsp:element> <br />
97
	<p class="regtext"><input name="action" value="query" type="submit" />
98
	Browse all existing data sets by title. This operation can be slow.</p>
99
	</form>
100
	<br />
101
	</li>
102

    
103
	<jsp:scriptlet>
104
                        if (!clientViewHelper.isLoggedIn()) {
105
                    </jsp:scriptlet>
106
	<li>Login
107
	<form name="loginForm" method="post" action="SaeonLogin.jspx"
108
		onsubmit="return allowSubmit(this)"><input name="qformat"
109
		type="hidden" value="sanparks" />
110
	<table>
111
		<tr>
112
			<td><span class="required">User name</span></td>
113
			<td><input name="username" type="text" value=""
114
				style="width: 140" /></td>
115
			<td rowspan="3" class="regtext" align="right" valign="top"
116
				style="width: 160">
117
			<div><!-- TODO: Config param follows --> <a
118
				href="http://localhost:8084/cgiScripts/cgi-bin/ldapweb.cgi"
119
				target="_parent">create a new account</a></div>
120
			</td>
121
		</tr>
122
		<tr>
123
			<td><span class="required">Organization</span></td>
124
			<td><select name="organization" style="width: 140">
125
				<option value="SANParks" selected="">SANParks</option>
126
				<option value="SAEON">SAEON</option>
127
				<option value="NCEAS">NCEAS</option>
128
				<option value="unaffiliated">unaffiliated</option>
129
			</select></td>
130
		</tr>
131
		<tr>
132
			<td><span class="required">Password</span></td>
133
			<td><input name="password" value="" type="password"
134
				style="width: 140" maxlength="50" /></td>
135
		</tr>
136
		<tr>
137
			<td colspan="2" align="center"><input name="action"
138
				value="Login" type="submit" class="button_login" /></td>
139
		</tr>
140
	</table>
141
	</form>
142
	<jsp:scriptlet>
143
                            } else {
144
                        </jsp:scriptlet>
145
	<form name="logoutForm" method="post" action="SaeonLogin.jspx">
146
	<input name="qformat" value="sanparks" type="hidden" />
147
	<table>
148
		<tr>
149
			<td>
150
			<p class="regtext">Account: <jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression></p>
151
			</td>
152
			<td rowspan="2" class="regtext" align="right" valign="top"
153
				style="width: 160">
154
			<div><!-- TODO: Config param follows --> <a
155
				href="http://localhost:8084/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass"
156
				target="_parent">reset your password</a></div>
157
			<div><!-- TODO: Config param follows --> <a
158
				href="http://localhost:8084/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
159
				target="_parent">change your password</a></div>
160
			</td>
161
		</tr>
162
		<tr>
163
			<td align="center"><input name="action" type="submit"
164
				value="Logout" class="button_login" /></td>
165
		</tr>
166
	</table>
167
	</form>
168
	<jsp:scriptlet>
169
                            }
170
                        </jsp:scriptlet> <!-- File Upload Form --> <br />
171
	<jsp:scriptlet>
172
                            if (clientViewHelper.isLoggedIn()) {
173
                        </jsp:scriptlet>
174
	<form action="SaeonUpload.jspx">
175
	<li>Data Package Upload <input name="action" type="submit"
176
		value="Go" class="button_login" /></li>
177
	</form>
178
	<jsp:scriptlet>
179
                            } else {
180
                        </jsp:scriptlet>
181
	</li>
182
	<li>Data Package Upload <br />
183
	<p class="regtext">You must be logged into your user account before
184
	uploading a data set.</p>
185
	</li>
186
	<jsp:scriptlet>
187
                        }
188
                    </jsp:scriptlet>
189
	</div>
190
	</body>
191
	</html>
192
</jsp:root>
(2-2/15)