11-17-2016 03:08 AM
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...
11-17-2016 03:53 AM
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.
11-17-2016 03:53 AM
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.
11-17-2016 04:59 AM
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>
11-17-2016 05:01 AM
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.
11-17-2016 06:58 AM
Thank you for the reply, but I am not able to proceed accordingly...
11-17-2016 07:04 AM
<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>
11-17-2016 07:19 AM
Tried the same thing....Still not working
11-17-2016 07:21 AM
I have saved the file here:
src/main/amp/config/alfresco/site-webscripts/org/alfresco/components/console/usergroups/users.get.html.ftl
11-17-2016 07:29 AM
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
11-17-2016 08:01 AM
Even this is not working....
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.