Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-13249

AM 6 doesn't recognize custom templates and partials

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0, 6.0.0.1, 6.0.0.3
    • Fix Version/s: 6.0.0.3, 6.5.0, 6.0.1
    • Component/s: XUI
    • Environment:
    • Sprint:
      2018.8 "Narwhal" Turing
    • Support Ticket IDs:

      Description

      Reproduction steps

      1. Git clone the AM external repository:$ git clone ssh://git@stash.forgerock.org:7999/openam/am-external.git
      2. Check out the relevant branch. For example, 6.0.0$ cd am-external
        $ git checkout releases/6.0.0
        $ cd openam-ui

      Modify the XUI code as follows while using this excerpt from the 5.5 doc as a guide https://backstage.forgerock.com/docs/am/5.5/ui-customization-guide/#d1661e408 
      3A cd to the directory that the Fonts, images, partials, and other resources are provided in {{src/main/resources/}}for me in a 6.0 env and using the path as am-external this is 
      /home/forgerock/GitHome/am-external/openam-ui/openam-ui-ria/src/main/resources/themes/dark/partials/login
      3B. Add the following to the file _Password.html

      <hr />

       

      After modification the _Password.html should look look like this

      <!--

        Copyright 2015-2017 ForgeRock AS. All Rights Reserved

       

        Use of this code requires a commercial software license with ForgeRock AS.

        or with one of its affiliates. All use shall be exclusively subject

        to such license between the licensee and ForgeRock AS.

      -->

      <hr />

      <label for="" class="aria-label sr-only separator">

          <span></span>

      </label>

      <input type="password"

            id=""

            name="callback_"

            class="form-control input-lg"

            placeholder=""

            value=""

            data-validator="required"

            required

            data-validator-event="keyup"

            autofocus>

       

      What this will do is create a horizontal line that renders above password fields on login pages, as displayed here

      https://backstage.forgerock.com/docs/am/5.5/ui-customization-guide/images/xui-dark-theme-partial.png

       

      Save the file

      Next I edited the mappings in /home/forgerock/GitHome/am-external/openam-ui/openam-ui-ria/src/main/js/config/ThemeConfiguration.js to make the dark theme the default theme for all user logins

      mappings: [

        { theme: "fr-dark-theme" }

       

      Next ensure that the current directory is openam-ui
      for example /home/forgerock/GitHome/am-external/openam-ui/

       

      Set your Maven options:
      export MAVEN_OPTS=-Xmx512m
      Build the customizations using the following command
      mvn clean install

       

      After the build completed  I changed directory to the build directory, for ex /home/forgerock/GitHome/am-external/openam-ui/openam-ui-ria/build

      copied the entire contents of files and directories in the build directory to $CATALINA_HOME/webapps/openam/XUI

      which for me is /home/forgerock/apache-tomcat-8.5.16/webapps/openam/XUI/

      cp -r /home/forgerock/GitHome/am-external/openam-ui/openam-ui-ria/build/*  /home/forgerock/apache-tomcat-8.5.16/webapps/openam/XUI/

       

      With the server stopped remove the openam.war file in /home/forgerock/apache-tomcat-8.5.16/webapps/openam.war

      cd to the directory /home/forgerock/apache-tomcat-8.5.16/webapps/openam/

      jar cvf ../openam.war *

      cd /home/forgerock/apache-tomcat-8.5.16/webapps/

      rm -rf openam

      cd to the tomcat work directory, for ex /home/forgerock/apache-tomcat-8.5.16/work/Catalina/localhost

      rm -rf openam

      start up tomcat with the following command

      sh /home/forgerock/apache-tomcat-8.5.16/bin/catalina.sh
      clear browser cache/cookies 

      access openam login page

      for example

      http://openam6.example.com:8080/openam/XUI/#login/

       

      Observed that the horizontal line that renders above password fields on login pages is not present, as shown in this screenshot

      Confirmed that the edits made in the src in _Password.html are present in the openam deployment on tomcat

       

       cat /home/forgerock/apache-tomcat-8.5.16/webapps/openam/XUI/themes/dark/partials/login/_Password.html

       

      <!--

        Copyright 2015-2017 ForgeRock AS. All Rights Reserved

       

        Use of this code requires a commercial software license with ForgeRock AS.

        or with one of its affiliates. All use shall be exclusively subject

        to such license between the licensee and ForgeRock AS.

      -->

      <hr />

      <label for="" class="aria-label sr-only separator">

          <span></span>

      </label>

      <input type="password"

            id=""

            name="callback_"

            class="form-control input-lg"

            placeholder=""

            value=""

            data-validator="required"

            required

            data-validator-event="keyup"

            autofocus>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                phil.ostler Phil Ostler [X] (Inactive)
                Reporter:
                steve.nolan Steve Nolan
                QA Assignee:
                Filip Kubáň [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: