Project

General

Profile

1
<%@ page    language="java" import="java.util.Vector,edu.ucsb.nceas.metacat.util.OrganizationUtil"%>
2
<%
3
/*
4
 *  '$RCSfile$'
5
 *      Authors: Matt Jones
6
 *    Copyright: 2000 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: daigle $'
11
 *     '$Date: 2008-07-24 13:52:30 -0700 (Thu, 24 Jul 2008) $'
12
 * '$Revision: 4158 $'
13
 * 
14
 * This is an HTML document for displaying metadata catalog tools
15
 *
16
 * This program is free software; you can redistribute it and/or modify
17
 * it under the terms of the GNU General Public License as published by
18
 * the Free Software Foundation; either version 2 of the License, or
19
 * (at your option) any later version.
20
 *
21
 * This program is distributed in the hope that it will be useful,
22
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 * GNU General Public License for more details.
25
 *
26
 * You should have received a copy of the GNU General Public License
27
 * along with this program; if not, write to the Free Software
28
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
 */
30
%>
31
<%@ include file="../../common/common-settings.jsp"%>
32
<%@ include file="../../common/configure-check.jsp"%>
33

    
34
<% 
35
	Vector<String> organizationList = OrganizationUtil.getOrganizations();
36
%>
37

    
38
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
39
<html>
40
<head>
41
<title>ESA Data Repository</title>
42
<link rel="stylesheet" href="<%=CONTEXT_URL%>/style/default.css" type="text/css">
43
  <link rel="stylesheet" type="text/css" 
44
        href="<%=STYLE_SKINS_URL%>/esa/esa.css"></link>
45
  <script language="JavaScript" type="text/JavaScript"
46
          src="<%=STYLE_SKINS_URL%>/esa/esa.js"></script>
47
  <script language="JavaScript" type="text/JavaScript"
48
          src="<%=STYLE_COMMON_URL%>/branding.js"></script>
49

    
50
  <script language="JavaScript" type="text/javascript">
51
  function submitform(formObj) {
52

    
53
  if (trim(formObj.elements["loginAction"].value)!="Login") return true;
54
  //trim username & passwd:
55
  var username = trim(formObj.elements["uid"].value);
56
  var organization  = trim(formObj.elements["organization"].value);
57
  var password      = trim(formObj.elements["password"].value);
58

    
59
  if (username=="") {
60
    alert("You must type a username. \n"+popupMsg);
61
        formObj.elements["uid"].focus();
62
    return false;
63
  }
64

    
65
  if (organization=="") {
66
    alert("You must select an organization. \n"+popupMsg);
67
        formObj.elements["organization"].focus();
68
    return false;
69
  }
70

    
71
  if (password=="") {
72
    alert("You must type a password. \n"+popupMsg);
73
        formObj.elements["password"].focus();
74
    return false;
75
  }
76

    
77
  formObj.username.value="uid="+formObj.elements["uid"].value+",o="+formObj.elements["organization"].value+",dc=ecoinformatics,dc=org";
78
  return true;
79
}
80

    
81
function trim(stringToTrim) {
82
  return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
83
}
84

    
85
 </script>
86

    
87
</head>
88
<body>
89
      <script language="JavaScript">
90
          insertTemplateOpening("<%=CONTEXT_URL%>");
91
          insertSearchBox("<%=CONTEXT_URL%>");
92
      </script>
93
  <b>Login Page for Moderators</b>
94
  <br />
95
  <menu>
96
<form name="loginform" method="post" action="<%=SERVLET_URL%>"
97
  target="_top" onsubmit="return submitform(this);" id="loginform">
98
    <input type="hidden" name="action" value="login"> <input type=
99
    "hidden" name="username" value=""> <input type="hidden" name=
100
    "qformat" value="esa"> <input type="hidden" name=
101
    "enableediting" value="false">
102

    
103
    <table>
104
      <tr valign="middle">
105
        <td align="left" valign="middle" class="text_plain">
106
        username:</td>
107

    
108
        <td width="173" align="left" class="text_plain" style=
109
        "padding-top: 2px; padding-bottom: 2px;"><input name="uid"
110
        type="text" style="width: 140px;" value=""></td>
111
      </tr>
112

    
113
      <tr valign="middle">
114
        <td height="28" align="left" valign="middle" class=
115
        "text_plain">organization:</td>
116

    
117
        <td align="left" class="text_plain" style=
118
        "padding-top: 2px; padding-bottom: 2px;"><select name=
119
        "organization" style="width:140px;">
120
          <option value=""    selected>&#8212; choose one &#8212;</option>
121
<%
122
		for (String orgName : organizationList) {
123
%>      
124
          <option value="<%= orgName %>"><%= orgName %></option>
125
<%
126
		}
127
%>  
128
        </select></td>
129
      </tr>
130

    
131
      <tr valign="middle">
132
        <td width="85" align="left" valign="middle" class=
133
        "text_plain">password:</td>
134

    
135
        <td colspan="2" align="left" class="text_plain" style=
136
        "padding-top: 2px; padding-bottom: 2px;">
137
          <table width="100%" border="0" cellpadding="0"
138
          cellspacing="0">
139
            <tr>
140
              <td width="150" align="left"><input name="password"
141
              type="password" maxlength="50" style="width:140px;"
142
              value=""></td>
143

    
144
              <td align="center" class="buttonBG_login">
145
              <input type="submit" name="loginAction" value="Login"
146
              class="button_login"></td>
147

    
148
              <td align="left">&nbsp;</td>
149
            </tr>
150
          </table>
151
        </td>
152
      </tr>
153
    </table>
154
  </form>
155

    
156
  </menu>
157
  </li>
158
  <p>&nbsp;</p>
159
<script language="JavaScript">          
160
    insertTemplateClosing("<%=CONTEXT_URL%>");
161
</script>
162
</body>
163
</html>
(17-17/18)