none
One more customized logon message question

    Question

  • I would like to know how we can customize the logon message for when a user does not type in their email address.  Currently the message says "Enter your user ID in the format "domain\user" or "user@domain".  We would like it to display "Please enter your E-mail address".  Is there a way to change this?
    Monday, July 18, 2016 8:36 PM

Answers

  • This message is generated by the JavaScript function 'LoginErrors'. We can override this by overriding this function in the onload.js file:

    1. Create a custom theme:
      New-AdfsWebTheme -Name custom -SourceName default
    2. Download the custom theme:
      Export-AdfsWebTheme -name default -directoryPath C:\theme
    3. Add the following code to the custom theme, modifying as appropriate:
      function LoginErrors() {
      this.userNameFormatError = 'Please enter your E-mail address.';
      this.passwordEmpty = 'Enter your password.';
      }
    4. Upload the customised onload.js file:
      Set-AdfsWebTheme -TargetName custom -AdditionalFileResource @{Uri=’/adfs/portal/script/onload.js’;path="c:\theme\script\onload.js"}
    5. Apply the custom theme:
      Set-AdfsWebConfig -ActiveThemeName custom

    Hope this helps!


    -- Chris Brown

    • Marked as answer by Scott072002 Wednesday, July 20, 2016 3:03 PM
    Wednesday, July 20, 2016 11:21 AM

All replies

  • This message is generated by the JavaScript function 'LoginErrors'. We can override this by overriding this function in the onload.js file:

    1. Create a custom theme:
      New-AdfsWebTheme -Name custom -SourceName default
    2. Download the custom theme:
      Export-AdfsWebTheme -name default -directoryPath C:\theme
    3. Add the following code to the custom theme, modifying as appropriate:
      function LoginErrors() {
      this.userNameFormatError = 'Please enter your E-mail address.';
      this.passwordEmpty = 'Enter your password.';
      }
    4. Upload the customised onload.js file:
      Set-AdfsWebTheme -TargetName custom -AdditionalFileResource @{Uri=’/adfs/portal/script/onload.js’;path="c:\theme\script\onload.js"}
    5. Apply the custom theme:
      Set-AdfsWebConfig -ActiveThemeName custom

    Hope this helps!


    -- Chris Brown

    • Marked as answer by Scott072002 Wednesday, July 20, 2016 3:03 PM
    Wednesday, July 20, 2016 11:21 AM
  • Hi Chris,

    Bingo!!!  that worked perfectly!!  Thanks for the help!!

    Wednesday, July 20, 2016 3:03 PM