Project

General

Profile

« Previous | Next » 

Revision 8529

Added by Jing Tao almost 11 years ago

Add the code to constructor default user management url.

View differences:

lib/admin/auth-configuration.jsp
1 1
<%@ page language="java"%>
2
<%@ page import="java.util.Set,java.util.Map,java.util.Vector,edu.ucsb.nceas.utilities.*" %>
2
<%@ page import="java.util.Set,java.util.Map,java.util.Vector,edu.ucsb.nceas.utilities.*, edu.ucsb.nceas.metacat.properties.PropertyService" %>
3 3
<%
4 4
	/**
5 5
 *  '$RCSfile$'
......
143 143
						} else {
144 144
		%>
145 145
						<div class="form-row">
146
							<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>"><%= metaDataProperty.getLabel() %></label></div>					
147
							<input class="textinput" id="<%= metaDataProperty.getKey() %>" name="<%= metaDataProperty.getKey() %>" 
148
			    			        value="<%= request.getAttribute(metaDataProperty.getKey()) %>"	             		    	    	           		    	             			
149
			           		    	type="<%= fieldType %>	"/>	
146
							<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>"><%= metaDataProperty.getLabel() %></label></div>	
147
		<%				
148
							if(metaDataProperty.getKey().equals("auth.userManagementUrl")) {
149
							     //System.out.println("getURL   ==== "+request.getRequestURL().toString());
150
							     //System.out.println("getURI   ==== "+request.getRequestURI());
151
							     //System.out.println("getServletpath   ==== "+request.getServletPath());
152
							     
153
							     //System.out.println("getScheme   ==== "+request.getScheme());
154
							     //System.out.println("getServer name   ==== "+request.getServerName());
155
							     //System.out.println("getServer port   ==== "+request.getServerPort());
156
							     //System.out.println("getServer context ==== "+request.getContextPath());
157
                                 String userManagementUrl = (String)request.getAttribute(metaDataProperty.getKey());
158
                                 if(userManagementUrl == null || userManagementUrl.equals("")) {
159
                                    userManagementUrl = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+PropertyService.getProperty("auth.defaultUserManagementPage");
160
                                 } 
161
        %>
162
                                 <input class="textinput" id="<%= metaDataProperty.getKey() %>" name="<%= metaDataProperty.getKey() %>"                                                                                         
163
                                    value="<%= userManagementUrl%>"
164
                                    type="<%= fieldType %>"/> 
165
        <%
166
                             } else {
167
        %>
168
                                 <input class="textinput" id="<%= metaDataProperty.getKey() %>" name="<%= metaDataProperty.getKey() %>" 
169
                                    value="<%= request.getAttribute(metaDataProperty.getKey()) %>"                                                                                      
170
                                    type="<%= fieldType %>  "/> 
171
        <%
172
                             }
173
        %>				
174
							
150 175
							<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i>
151 176
									</div>    		    
152 177
		<%

Also available in: Unified diff