Jason Rivard пре 9 година
родитељ
комит
418ad271df

+ 1 - 0
src/main/java/password/pwm/AppProperty.java

@@ -61,6 +61,7 @@ public enum AppProperty {
     CONFIG_EDITOR_QUERY_FILTER_TEST_LIMIT           ("configEditor.queryFilter.testLimit"),
     CONFIG_EDITOR_IDLE_TIMEOUT                      ("configEditor.idleTimeoutSeconds"),
     CONFIG_GUIDE_IDLE_TIMEOUT                       ("configGuide.idleTimeoutSeconds"),
+    CONFIG_GUIDE_THEME                              ("configGuide.theme"),
     CONFIG_MANAGER_ZIPDEBUG_MAXLOGLINES             ("configManager.zipDebug.maxLogLines"),
     CONFIG_MANAGER_ZIPDEBUG_MAXLOGSECONDS           ("configManager.zipDebug.maxLogSeconds"),
     FORM_EMAIL_REGEX                                ("form.email.regexTest"),

+ 4 - 1
src/main/java/password/pwm/http/servlet/configguide/ConfigGuideServlet.java

@@ -127,7 +127,9 @@ public class ConfigGuideServlet extends AbstractPwmServlet {
 
         if (pwmApplication.getSessionStateService().getBean(pwmRequest, ConfigGuideBean.class).getStep() == GuideStep.START) {
             pwmApplication.getSessionStateService().clearBean(pwmRequest, ConfigGuideBean.class);
-            pwmSession.getSessionStateBean().setTheme(null);
+            if (pwmSession.getSessionStateBean().getTheme() == null) {
+                pwmSession.getSessionStateBean().setTheme(pwmRequest.getConfig().readAppProperty(AppProperty.CONFIG_GUIDE_THEME));
+            }
         }
 
         final ConfigGuideBean configGuideBean = pwmApplication.getSessionStateService().getBean(pwmRequest, ConfigGuideBean.class);
@@ -479,6 +481,7 @@ public class ConfigGuideServlet extends AbstractPwmServlet {
             final ContextManager contextManager = ContextManager.getContextManager(pwmRequest);
             try {
                 writeConfig(contextManager, configGuideBean);
+                pwmRequest.getPwmSession().getSessionStateBean().setTheme(null);
             } catch (PwmException e) {
                 final RestResultBean restResultBean = RestResultBean.fromError(e.getErrorInformation(), pwmRequest);
                 pwmRequest.outputJsonResult(restResultBean);

+ 1 - 0
src/main/resources/password/pwm/AppProperty.properties

@@ -53,6 +53,7 @@ config.newuser.passwordPolicyCacheMS=3600000
 configEditor.queryFilter.testLimit=5000
 configEditor.idleTimeoutSeconds=900
 configGuide.idleTimeoutSeconds=3600
+configGuide.theme=pwm
 configManager.zipDebug.maxLogLines=100000
 configManager.zipDebug.maxLogSeconds=30
 form.email.regexTest=^[_+a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*$

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-app.jsp

@@ -23,7 +23,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-cr_storage.jsp

@@ -22,7 +22,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-database.jsp

@@ -24,7 +24,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <% Locale userLocale = JspUtility.locale(request); %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>
 <!DOCTYPE html>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-end.jsp

@@ -24,7 +24,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <%@ taglib uri="pwm" prefix="pwm" %>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-ldap_admins.jsp

@@ -23,7 +23,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-ldap_cert.jsp

@@ -29,7 +29,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-ldap_context.jsp

@@ -23,7 +23,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-ldap_proxy.jsp

@@ -22,7 +22,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 2
src/main/webapp/WEB-INF/jsp/configguide-ldap_schema.jsp

@@ -23,11 +23,9 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <%
-    final PwmRequest pwmRequest = PwmRequest.forRequest(request, response);
     ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);
     boolean existingSchemaGood = false;
     String schemaActivityLog = "";

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-ldap_server.jsp

@@ -22,7 +22,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-ldap_testuser.jsp

@@ -23,7 +23,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <% ConfigGuideBean configGuideBean = JspUtility.getSessionBean(pageContext, ConfigGuideBean.class);%>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-password.jsp

@@ -22,7 +22,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <%@ taglib uri="pwm" prefix="pwm" %>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-start.jsp

@@ -24,7 +24,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.NO_IDLE_TIMEOUT); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/configguide-template.jsp

@@ -22,7 +22,6 @@
   --%>
 
 <% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_LOCALE); %>
-<% JspUtility.setFlag(pageContext, PwmRequestFlag.HIDE_THEME); %>
 <!DOCTYPE html>
 <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
 <%@ taglib uri="pwm" prefix="pwm" %>

+ 0 - 1
src/main/webapp/WEB-INF/jsp/fragment/header-body.jsp

@@ -82,5 +82,4 @@
             <% } %>
         </div>
     </div>
-</div>
 </div>

+ 0 - 15
src/main/webapp/public/resources/configStyle.css

@@ -163,21 +163,6 @@ body {
     padding-bottom: 10px;
 }
 
-.btn {
-    font-family: Trebuchet MS, sans-serif;
-    padding: 2px 9px;
-    border-radius: 4px;
-    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3e374c), color-stop(1, #08070f) );
-    background:linear-gradient(to bottom, #3e374c 5%, #08070f 100% );
-}.btn:hover {
-     background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #08070f), color-stop(1, #3e374c) );
-     background:linear-gradient(to bottom, #08070f 5%, #3e374c 100% );
- }.btn:disabled {
-      color: #656565;
-      background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4f485d), color-stop(1, #191820) );
-      background:linear-gradient(to bottom, #4f485d 5%, #191820 100% );
-  }
-
 .menubutton.selected {
     box-shadow: none;
     font-weight: bold;