0

I am using alfresco community 5.0.d

I want to remove google username field from the user profile.

So far, I found the file that handles this form, userprofile.get.html.ftl and userprofile.get.js. Now as I comment out the div tag for google username field in userprofile.get.html.ftl then the whole form is getting hidden without any error on console.

Form is coming blank as shown in screenshot below.

enter image description here

Any idea how to remove?

Thanks.

nikhil84
  • 3,235
  • 4
  • 22
  • 43

2 Answers2

1

I added hidden class to the div to hide them instead of removing it,as it is not displaying any of the form fields as you mentioned.

<#if profile.googleUsername?? && profile.googleUsername?length!=0>
               <div class="row hidden">
                  <span class="fieldlabelright">${msg("label.googleusername")}:</span>
                  <span class="fieldvalue">${profile.googleUsername?html}</span>
               </div>
               </#if>

And for the Edit fields,

<div class="row hidden">
               <span class="label"><label for="${el}-input-googleusername">${msg("label.googleusername")}:</label></span>
               <span><input type="text" maxlength="256" size="30" id="${el}-input-googleusername" value="" <@immutablefield field="googleusername" /> /></span>
            </div>

User Profile Page

User Profile Edit Page

And it is working fine.

0

I found the reason for form not being displayed was that I was just removing the div tags but not the dom.get method for those fields.

Files to be modified:

  • profile.js
  • userprofile.get.html.ftl

Solution:

  • Remove the dom.get for the fields that you want to remove from profile.js.
  • Remove the div tags of those fields from the userprofile.get.html.ftl.
  • Restart the tomcat

Voilaaaa !!!

Fixed and Done.

nikhil84
  • 3,235
  • 4
  • 22
  • 43