cancel
Showing results for 
Search instead for 
Did you mean: 

Hide password and confirm password buttons from Alfresco UI New User Page and hardcode one default password for all the new users.

anky_p
Confirmed Champ
Confirmed Champ

Hi,

My task is to hide password and verify password fields from Alfresco UI New User Page and hardcode one default password for all the new users. I have already made the custom code such that the new user is receiving the mail with username and random password...

How to hide the password and verify password fields? Any suggestion will be helpful...

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

This is not something Alfresco ever considered people might want to customize, so this is something rather hard to customize. The simplest / easiest option in this case might just be to override the users.get.html.ftl template via the web-extension folder and change the HTML markup of the create user form, i.e. apply the CSS class "hidden" to the field rows of the fields you want to suppress and set the value on the password inputs to your default password.

View answer in original post

11 REPLIES 11

afaust
Legendary Innovator
Legendary Innovator

This is not something Alfresco ever considered people might want to customize, so this is something rather hard to customize. The simplest / easiest option in this case might just be to override the users.get.html.ftl template via the web-extension folder and change the HTML markup of the create user form, i.e. apply the CSS class "hidden" to the field rows of the fields you want to suppress and set the value on the password inputs to your default password.

anky_p
Confirmed Champ
Confirmed Champ

Is this correct?? This is to hide the password. Where shall I set the value say 'xyz' as default password?

<div class="field-row">
<span class="crud-label">${msg("bel.password")}: *</span>
</div>
<div class="field-row">
<input class="crud-input" id="${el}-create-password" type="hidden" maxlength="100" />
</div>
<div class="field-row">
<span class="crud-label">${msg("label.rifypassword")}: *</span>
</div>
<div class="field-row">
<input class="crud-input" id="${el}-create-verifypassword" type="hidden" maxlength="100" />
</div>

afaust
Legendary Innovator
Legendary Innovator

No - the inputs are missing the default value you talked about and I said the "hidden" class should be added to the field rows, not the input elements.

anky_p
Confirmed Champ
Confirmed Champ

Thank you for the reply, but I am not able to proceed accordingly...

afaust
Legendary Innovator
Legendary Innovator

<div class="field-row hidden">
<span class="crud-label">${msg("bel.password")}: *</span>
</div>
<div class="field-row hidden">
<input class="crud-input" id="${el}-create-password" type="password" maxlength="100" value="myDummyPassword" />
</div>
<div class="field-row hidden">
<span class="crud-label">${msg("label.rifypassword")}: *</span>
</div>
<div class="field-row hidden">
<input class="crud-input" id="${el}-create-verifypassword" type="password" maxlength="100" value="myDummyPassword" />
</div>

anky_p
Confirmed Champ
Confirmed Champ

Tried the same thing....Still not working

anky_p
Confirmed Champ
Confirmed Champ

I have saved the file here:

src/main/amp/config/alfresco/site-webscripts/org/alfresco/components/console/usergroups/users.get.html.ftl

kalpesh_c2
Star Collaborator
Star Collaborator

Hi Ankita,

Axel is right but additionally you have to remove or comment the following lines in user.js file which is located at "\tomcat\webapps\share\components\console\users.js" as follows

fnClearEl("-create-password");
fnClearEl("-create-verifypassword");

Thanks,

Kalpesh

ContCentric

Even this is not working....

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.