02-20-2017 05:59 AM
I'm using Alfresco Community 5.0.d and I tried the adding multiple user with all details using Uploading multiple users | Alfresco Documentation. This worked like a charm and showed all details.
But when I tried to add single new user from admin console, I do not get company fields.
So far I came across the users.js file at /Applications/alfresco-5.0.d/tomcat/webapps/share/components/console but not able to add the company name field.
How could I add this field/fields to user I'm creating from admin console?
Also I want when admin update the user info then company field to be shown there as well.
Thanks.
02-28-2017 10:57 AM
Added a field in new user form.
In users.get.properties file
Add label.companyname=Company
In users.js file
Added fields -create-company label and input like below at different location
For input box : form.addValidation(parent.id + "-create-companyname",
Alfresco.forms.validation.mandatory, null, "keyup");
For setting the value to personObj : organisation: fnGetter("-create-companyname"),
For clearing the input field : fnClearEl("-create-companyname");
In users.get.html.ftl
Added div for -create-company
<div class="field-row">
<span class="crud-label">${msg("label.companyname")}: *</span>
</div>
<div class="field-row">
<input class="crud-input" id="${el}-create-companyname" type="text" maxlength="100" />
</div>
This way you can add the field to new form.
Similarly, you can show the company field in edit form of user (in which by default company field is not editable)
02-28-2017 10:57 AM
Added a field in new user form.
In users.get.properties file
Add label.companyname=Company
In users.js file
Added fields -create-company label and input like below at different location
For input box : form.addValidation(parent.id + "-create-companyname",
Alfresco.forms.validation.mandatory, null, "keyup");
For setting the value to personObj : organisation: fnGetter("-create-companyname"),
For clearing the input field : fnClearEl("-create-companyname");
In users.get.html.ftl
Added div for -create-company
<div class="field-row">
<span class="crud-label">${msg("label.companyname")}: *</span>
</div>
<div class="field-row">
<input class="crud-input" id="${el}-create-companyname" type="text" maxlength="100" />
</div>
This way you can add the field to new form.
Similarly, you can show the company field in edit form of user (in which by default company field is not editable)
Explore our Alfresco products with the links below. Use labels to filter content by product module.