Browse Source

Fixed a problem where the path to the stylesheets is broken when the client-side webjar name is different from "pwm-client".

jalbr74 7 years ago
parent
commit
8c0c607348

+ 1 - 0
server/src/main/java/password/pwm/PwmConstants.java

@@ -75,6 +75,7 @@ public abstract class PwmConstants
     public static final String DEFAULT_CONFIG_FILE_FILENAME = readPwmConstantsBundle( "defaultConfigFilename" );
 
     public static final String PWM_APP_NAME = readPwmConstantsBundle( "pwm.appName" );
+    public static final String PWM_CLIENT_WEBJAR_NAME = readPwmConstantsBundle( "pwm.client.webjarName" );
     public static final String PWM_URL_HOME = readPwmConstantsBundle( "url.pwm-home" );
     public static final String PWM_URL_CLOUD = readPwmConstantsBundle( "url.pwm-cloud" );
 

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

@@ -31,6 +31,7 @@ httpHeaderAuthorizationBasic=Basic
 defaultBadPasswordAttempt=BADPASSWORDATTEMPT
 log.removedValue=*hidden*
 pwm.appName=PWM
+pwm.client.webjarName=pwm-client
 trial=false
 url.pwm-home=https://github.com/pwm-project/pwm
 url.pwm-cloud=https://pwm-cloud.appspot.com

+ 3 - 2
server/src/main/webapp/WEB-INF/jsp/fragment/header.jsp

@@ -65,7 +65,8 @@
         </script>
     </pwm:script>
     <pwm:if test="<%=PwmIfTest.requestFlag%>" requestFlag="<%=PwmRequestFlag.INCLUDE_IAS_ANGULAR%>">
-        <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/webjars/pwm-client/vendor/ias-icons.css' addContext="true"/>"/>
-        <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/webjars/pwm-client/vendor/ux-ias.css' addContext="true"/>"/>
+        <% request.setAttribute("clientWebjarName", PwmConstants.PWM_CLIENT_WEBJAR_NAME); %>
+        <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/webjars/${clientWebjarName}/vendor/ias-icons.css' addContext="true"/>"/>
+        <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/webjars/${clientWebjarName}/vendor/ux-ias.css' addContext="true"/>"/>
     </pwm:if>
 </head>