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