如何在管理控制台(新用户)露天社区中添加公司名称字段?
How to add company name field in admin console (new user) alfresco community?
我正在使用 Alfresco Community 5。0.d 它不显示公司信息字段。
如果我搜索用户,它会显示所有详细信息,但不允许我在创建用户时添加公司信息。
到目前为止,我在 /Applications/alfresco-5.0.d/tomcat/webapps/share/components/console 找到了 user.js 文件,但我无法为新用户添加该字段。
form.addValidation(parent.id + "-create-companyname", Alfresco.forms.validation.mandatory, null, "keyup"); // ADDED this but not showing in form.
form.addValidation(parent.id + "-create-firstname", Alfresco.forms.validation.mandatory, null, "keyup");
form.addValidation(parent.id + "-create-email", Alfresco.forms.validation.mandatory, null, "keyup");
form.addValidation(parent.id + "-create-email", Alfresco.forms.validation.email, null, "change", parent._msg("Alfresco.forms.validation.email.message"));
form.addValidation(parent.id + "-create-username", Alfresco.forms.validation.mandatory, null, "keyup");
form.addValidation(parent.id + "-create-username", Alfresco.forms.validation.nodeName, null, "keyup", parent._msg("Alfresco.forms.validation.nodeName.message"));
此外,我还在 users.js 中创建的 personObj 中添加了键值,如下所示。
var personObj =
{
userName: username,
password: password,
firstName: fnGetter("-create-firstname"),
lastName: fnGetter("-create-lastname"),
email: fnGetter("-create-email"),
organization: fnGetter("-create-companyname"),
disableAccount: Dom.get(me.id + "-create-disableaccount").checked,
quota: quota,
groups: groups
};
PersonObj 是:
personObj
disableAccount : false
email : "test@test.com"
firstName : "test"
groups : Array[0]
lastName : "test"
organisation : "test" //added this key-value
password : "admin"
quota : -1
userName : "test_test"
但是公司名称没有来。此外,我尝试使用 .csv file link 添加多个用户,但它不显示公司名称(指南中给出的列名称是公司),但显示手机号码、传真等
这是 Alfresco 社区 5 的错误吗?0.d?
新用户表单截图供参考。
我需要在新用户的上述表格中添加公司名称字段,以便可以为这些新用户预先填充。
如何添加公司名称字段以便将其添加到新用户的个人资料中?
谢谢
您好,您可以使用添加用户公司详细信息。
Javascript。例子
var x =people.getPerson("admin");
logger.log(x.properties["companyemail"]);
//获取当前公司邮箱
x.properties["companyemail"]="test@google.com";
//设置新公司邮箱
logger.log(x.properties["companyemail"]);
//获取新的公司电子邮件
companytelephone
companyaddress2
companyaddress1
companyfax
companyemail
companypostcode
这些是用户公司的一些属性
添加一个已经是 属性 用户模型的字段。
如果要添加公司字段,请按照以下步骤操作:
- 在 users.get.properties 文件中 - 添加下面一行。
label.companyname=Company
- 在 users.js 文件中 - 添加字段 company 属性 以进行非空检查并获取其值,然后在有效输入后清除该值。
form.addValidation(parent.id + "-create-companyname",Alfresco.forms.validation.mandatory, null, "keyup"); // Add validation
organisation: fnGetter("-create-companyname"), // Get company value
fnClearEl("-create-companyname"); // Clear company field
- 在 users.get.html.ftl 文件中 - 为公司添加了 div
<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>
我正在使用 Alfresco Community 5。0.d 它不显示公司信息字段。
如果我搜索用户,它会显示所有详细信息,但不允许我在创建用户时添加公司信息。
到目前为止,我在 /Applications/alfresco-5.0.d/tomcat/webapps/share/components/console 找到了 user.js 文件,但我无法为新用户添加该字段。
form.addValidation(parent.id + "-create-companyname", Alfresco.forms.validation.mandatory, null, "keyup"); // ADDED this but not showing in form.
form.addValidation(parent.id + "-create-firstname", Alfresco.forms.validation.mandatory, null, "keyup");
form.addValidation(parent.id + "-create-email", Alfresco.forms.validation.mandatory, null, "keyup");
form.addValidation(parent.id + "-create-email", Alfresco.forms.validation.email, null, "change", parent._msg("Alfresco.forms.validation.email.message"));
form.addValidation(parent.id + "-create-username", Alfresco.forms.validation.mandatory, null, "keyup");
form.addValidation(parent.id + "-create-username", Alfresco.forms.validation.nodeName, null, "keyup", parent._msg("Alfresco.forms.validation.nodeName.message"));
此外,我还在 users.js 中创建的 personObj 中添加了键值,如下所示。
var personObj =
{
userName: username,
password: password,
firstName: fnGetter("-create-firstname"),
lastName: fnGetter("-create-lastname"),
email: fnGetter("-create-email"),
organization: fnGetter("-create-companyname"),
disableAccount: Dom.get(me.id + "-create-disableaccount").checked,
quota: quota,
groups: groups
};
PersonObj 是:
personObj
disableAccount : false
email : "test@test.com"
firstName : "test"
groups : Array[0]
lastName : "test"
organisation : "test" //added this key-value
password : "admin"
quota : -1
userName : "test_test"
但是公司名称没有来。此外,我尝试使用 .csv file link 添加多个用户,但它不显示公司名称(指南中给出的列名称是公司),但显示手机号码、传真等
这是 Alfresco 社区 5 的错误吗?0.d?
新用户表单截图供参考。
我需要在新用户的上述表格中添加公司名称字段,以便可以为这些新用户预先填充。
如何添加公司名称字段以便将其添加到新用户的个人资料中?
谢谢
您好,您可以使用添加用户公司详细信息。 Javascript。例子
var x =people.getPerson("admin");
logger.log(x.properties["companyemail"]);
//获取当前公司邮箱
x.properties["companyemail"]="test@google.com";
//设置新公司邮箱
logger.log(x.properties["companyemail"]);
//获取新的公司电子邮件
companytelephone
companyaddress2
companyaddress1
companyfax
companyemail
companypostcode
这些是用户公司的一些属性
添加一个已经是 属性 用户模型的字段。
如果要添加公司字段,请按照以下步骤操作:
- 在 users.get.properties 文件中 - 添加下面一行。
label.companyname=Company
- 在 users.js 文件中 - 添加字段 company 属性 以进行非空检查并获取其值,然后在有效输入后清除该值。
form.addValidation(parent.id + "-create-companyname",Alfresco.forms.validation.mandatory, null, "keyup"); // Add validation
organisation: fnGetter("-create-companyname"), // Get company value
fnClearEl("-create-companyname"); // Clear company field
- 在 users.get.html.ftl 文件中 - 为公司添加了 div
<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>