Project

General

Profile

1 4100 daigle
<%@ page language="java" %>
2
<%@ page import="java.util.Vector,edu.ucsb.nceas.metacat.util.LDAPUtil,edu.ucsb.nceas.metacat.service.PropertyService" %>
3 4080 daigle
<%
4
/**
5
 *  '$RCSfile$'
6
 *    Copyright: 2008 Regents of the University of California and the
7
 *               National Center for Ecological Analysis and Synthesis
8
 *  For Details: http://www.nceas.ucsb.edu/
9
 *
10
 *   '$Author$'
11
 *     '$Date$'
12
 * '$Revision$'
13
 *
14
 * This program is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation; either version 2 of the License, or
17
 * (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU General Public License
25
 * along with this program; if not, write to the Free Software
26
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
 */
28
%>
29
30
<%
31
	Vector<String> organizationList = LDAPUtil.getOrganizations();
32
%>
33
34
<html>
35
<head>
36
37
<title>Database Install/Upgrade Utility</title>
38
<link rel="stylesheet" type="text/css"
39
        href="<%= request.getContextPath() %>/admin/admin.css"></link>
40
41
<script type="text/javascript">
42
43
function validate_form() {
44
    j = document.configuration_form.length
45
    for (i = 0; i < j; i++) {
46
        if (document.configuration_form.elements[i].value == "") {
47
            alert("All form fields must be populated");
48
            return false;
49
        }
50
    }
51
    return true;
52
}
53
54
</script>
55
56
</head>
57
<body>
58
<img src="<%= request.getContextPath() %>/metacat-logo.png"
59
	width="100px" align="right" />
60
<h2>Administrator Login</h2>
61
62
Account login page.
63
<br class="ldap-header">
64
65
<%@ include file="./page-message-section.jsp"%>
66 4100 daigle
<hr class="config-line">
67 4080 daigle
<br>
68
69
<form name="loginform" method="post" action="<%= request.getContextPath() %>/admin"
70
	target="_top" onsubmit="return submitform(this);" id="loginform">
71
72
<table class="admin-login">
73
	<tr>
74
		<td>username:</td>
75
		<td><input class="login-input" name="username" type="text" value=""></td>
76
	</tr>
77
78
	<tr>
79
		<td>organization:</td>
80
		<td><select class="login-input"
81
			name="organization">
82
			<option value="" selected>&#8212; choose one &#8212;</option>
83
<%
84
			for (String orgName : organizationList) {
85
%>
86
			<option value="<%= orgName %>"
87
<%
88
			if (PropertyService.getProperty("ldap.base." + orgName) == null || PropertyService.getProperty("ldap.base." + orgName).equals("")) {
89
%>
90
			disabled="disabled"
91
<%
92
			}
93
%>
94
			><%= orgName %></option>
95
<%
96
			}
97
%>
98
		</select></td>
99
	</tr>
100
	<tr>
101
		<td>password:</td>
102
		<td><input class="login-input" name="password" type="password" maxlength="50" value=""></td>
103
	</tr>
104
</table>
105
106
<br>
107 4100 daigle
<hr class="config-line">
108 4080 daigle
109
<table class="admin-login">
110
	<tr>
111
		<td class="button"><input type="submit"
112
				name="loginAction" value="Login" class="button_login"></td>
113
	</tr>
114
</table>
115
116
<input type="hidden" name="configureType" value="login"/>
117
<input type="hidden" name="processForm" value="true"/>
118
119
</form>
120
121
</body>
122
</html>