1
|
<%@ page language="java"%>
|
2
|
<%@ page import="java.util.Set,java.util.Map,java.util.Vector,edu.ucsb.nceas.utilities.*" %>
|
3
|
<%
|
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: walker $'
|
11
|
* '$Date: 2013-09-18 15:37:06 -0700 (Wed, 18 Sep 2013) $'
|
12
|
* '$Revision: 8240 $'
|
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
|
PropertiesMetaData metadata = (PropertiesMetaData)request.getAttribute("metadata");
|
32
|
Vector<String> ldapOrganizations =
|
33
|
(Vector<String>)request.getAttribute("orgList");
|
34
|
%>
|
35
|
|
36
|
<html>
|
37
|
<head>
|
38
|
|
39
|
<title>Organization Configuration</title>
|
40
|
<%@ include file="./head-section.jsp"%>
|
41
|
</head>
|
42
|
<body>
|
43
|
<div class="document">
|
44
|
|
45
|
<h2>Organization Configuration</h2>
|
46
|
Enter organization specific properties here.
|
47
|
<br class="ldap-header">
|
48
|
|
49
|
<%@ include file="./page-message-section.jsp"%>
|
50
|
|
51
|
|
52
|
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin"
|
53
|
onsubmit="return submitForm(this);">
|
54
|
<%
|
55
|
if (metadata != null) {
|
56
|
// each group describes a section of properties
|
57
|
Map<Integer, MetaDataGroup> groupMap = metadata.getGroups();
|
58
|
Set<Integer> groupIdSet = groupMap.keySet();
|
59
|
for (Integer groupId : groupIdSet) {
|
60
|
// for this group, display the header (group name)
|
61
|
MetaDataGroup metaDataGroup = (MetaDataGroup)groupMap.get(groupId);
|
62
|
%>
|
63
|
<h3><%= metaDataGroup.getName() %></h3>
|
64
|
<%
|
65
|
if (metaDataGroup.getComment() != null) {
|
66
|
%>
|
67
|
<div class="heading-comment"><%= metaDataGroup.getComment() %></div>
|
68
|
<%
|
69
|
}
|
70
|
%>
|
71
|
<br>
|
72
|
<%
|
73
|
for (String orgName : ldapOrganizations) {
|
74
|
%>
|
75
|
<table class="config-section">
|
76
|
<tr>
|
77
|
<td class="config-checkbox">
|
78
|
<input class="org" type="checkbox" name="<%= orgName %>.cb" onClick="toggleHiddenTable(this, 'hiding-section-<%= orgName %>')"/>
|
79
|
</td>
|
80
|
<td class="config-checkbox-label">
|
81
|
<label for="<%= orgName %>.cb"><%=orgName%></label>
|
82
|
</td>
|
83
|
</tr>
|
84
|
</table>
|
85
|
<table class="config-section-hiding" id="hiding-section-<%= orgName %>">
|
86
|
<%
|
87
|
// get all the properties in this group
|
88
|
Map<Integer, MetaDataProperty> propertyMap =
|
89
|
metadata.getPropertiesInGroup(metaDataGroup.getIndex());
|
90
|
Set<Integer> orgIndexes = propertyMap.keySet();
|
91
|
for (Integer orgIndex : orgIndexes) {
|
92
|
MetaDataProperty orgProperty = propertyMap.get(orgIndex);
|
93
|
String orgKeyName = orgProperty.getKey() + "." + orgName;
|
94
|
%>
|
95
|
<tr>
|
96
|
<td class="config-property-label" >
|
97
|
<label for="<%= orgKeyName %>" title="<%= orgProperty.getDescription() %>"><%= orgProperty.getLabel() %></label>
|
98
|
</td>
|
99
|
<td class="config-property-input" >
|
100
|
<input name="<%= orgKeyName %>"
|
101
|
value="<%= request.getAttribute(orgKeyName) %>"
|
102
|
<%
|
103
|
if (orgProperty.getFieldType().equals("password")) {
|
104
|
%>
|
105
|
type="password"
|
106
|
<%
|
107
|
}
|
108
|
%>
|
109
|
alt="List of administrators for this installation in LDAP DN syntax (colon separated)"/>
|
110
|
</td>
|
111
|
<td class="config-question-mark">
|
112
|
<i class="icon-question-sign"
|
113
|
alt="<%= orgProperty.getDescription() %>"
|
114
|
onClick="helpWindow('<%= request.getContextPath() %>', '<%= orgProperty.getHelpFile() %>')"></i>
|
115
|
</td>
|
116
|
</tr>
|
117
|
<%
|
118
|
if (orgProperty.getDescription() != null) {
|
119
|
%>
|
120
|
<tr>
|
121
|
<td></td>
|
122
|
<td class="config-property-description" colspan="2" >
|
123
|
<%= orgProperty.getDescription() %>
|
124
|
</td>
|
125
|
<%
|
126
|
}
|
127
|
}
|
128
|
%>
|
129
|
</table>
|
130
|
<%
|
131
|
}
|
132
|
}
|
133
|
}
|
134
|
%>
|
135
|
|
136
|
<input type="hidden" name="configureType" value="organization"/>
|
137
|
<input type="hidden" name="processForm" value="true"/>
|
138
|
<input class="button" type="submit" value="Save"/>
|
139
|
<input class="button" type="button" value="Cancel" onClick="forward('./admin')">
|
140
|
|
141
|
</form>
|
142
|
</div>
|
143
|
</body>
|
144
|
</html>
|