cancel
Showing results for 
Search instead for 
Did you mean: 

Modify the login page - Delete/hide the password field

SOLVED
spanudiez_
Occasional Contributor

Modify the login page - Delete/hide the password field

Hello,

 

I'm trying to modify the login page on a SA6500.

 

Currently I have Username, Password1 and Password2, I would like to hide or delete the Password1 label and field however I do not find anything in the loginpage.thtml. I would also like to change the label of Password2.

 

Any help will be appreciated

 

Ty,

Diez

1 ACCEPTED SOLUTION

Accepted Solutions
dcvers_
Regular Contributor

Re: Modify the login page - Delete/hide the password field

The code that adds the prompts and input box to the page starts with <% FOREACH prompt = prompts %>. To hide the prompts you would need to look at modifying this. You can identify the iteration for a particular prompt using a statement like <% IF prompt.promptText == "TBD" %> 

You could try just skipping the code that adds the label and input box for the prompts you want to hide but I have a feeling this may upset the box so you may be best just setting them to hidden.

View solution in original post

6 REPLIES 6
dcvers_
Regular Contributor

Re: Modify the login page - Delete/hide the password field

The labels are stored in the prompts array. To modify them add code like the following to loginpage.thtml

<% FOREACH prompt = prompts %>
   <%IF prompt.promptText == "username" %>
      <% SET prompt.promptText = "Username 1" %>
   <%ELSIF prompt.promptText == "password" %>
      <% SET prompt.promptText = "Password 1" %>
   <%ELSIF prompt.promptText == "Additional username" %>
      <% SET prompt.promptText = "Username 2" %>
   <%ELSIF prompt.promptText == "Additional password" %>
      <% SET prompt.promptText = "Password 2" %>
   <% ELSE %>
   <% END %>
<% END %>

Jickfoo_
Super Contributor

Re: Modify the login page - Delete/hide the password field

Hi Spanudiez,

 

You are making a custom thtml page ? Do you need to ?

 

In the authentication realm you are using, make sure 'Additional Authentication Server' is unchecked. I think that being checked might be what's causing the second prompt ?

 

Good Luck,

 

Kudos me if you feel this helps,

 

Thanks,

Justin

 

 

muttbarker_
Valued Contributor

Re: Modify the login page - Delete/hide the password field

You can do quite a lot of custom changes to the default pages under:

 

Authentication / Signing-In / Sign-In Pages 

 

You can change the display language for most of the fields. 

 

As stated prior you can also suppress the display of the secondary username / password. However I don't understand why or how you would want to suppress username1. This is the default login username and must be entered versus the secondary authentication which is optional.

spanudiez_
Occasional Contributor

Re: Modify the login page - Delete/hide the password field

Thank you, 

 

 

I managed to change the text but I can't seem to switch the first password to hidden. 

 

This is what I tried: 

 

 

<% FOREACH prompt = prompts %>
       <%IF prompt.promptText == "username" %>
        <% SET prompt.promptText = "Username" %>
        <%ELSIF prompt.promptText == "password" %>
        <% SET prompt.promptText = "TBD" %>
    
        <%ELSIF prompt.promptText == "Additional password" %>
        <% SET prompt.promptText = "Password" %>
    <% END %>
        <%NEXT IF !prompt.required %>
            <%IF prompt.promptText == "TBD" %>
            <input type="hidden">
            <%ElSIF prompt.promptText %>
           <input type="<% prompt.type %>" name="<% prompt.name %>">
    <% END %>

 

The TBD is still not hidden.

 

 

Because we have some weird requirements I have to use additional auth servers, however I only need to send the username to the first one after I get authentificated to the second one with the same user and a password. I can do this easily however the password "requirements" of the first one always adds the extra pass box on the login page. I cannot do the other way around because of the company policies.

 

Any ideas what's wrong with my code?

 

Thanks,

 

Diez

 

EDIT: In reply to

muttbarker_
Valued Contributor

Re: Modify the login page - Delete/hide the password field

Got it - yes, custom code is it indeed.

dcvers_
Regular Contributor

Re: Modify the login page - Delete/hide the password field

The code that adds the prompts and input box to the page starts with <% FOREACH prompt = prompts %>. To hide the prompts you would need to look at modifying this. You can identify the iteration for a particular prompt using a statement like <% IF prompt.promptText == "TBD" %> 

You could try just skipping the code that adds the label and input box for the prompts you want to hide but I have a feeling this may upset the box so you may be best just setting them to hidden.