[oform] Implement method to remove role

Also implement method to count the number of fields in field group
This commit is contained in:
KirillovIlya
2022-11-30 15:56:26 +03:00
parent b2c1f43e3b
commit f6c07aa139
5 changed files with 132 additions and 16 deletions

View File

@ -272,7 +272,7 @@
/**
* @returns {AscOForm.CUserMaster}
*/
CDocument.prototype.getDefaultUser = function()
CDocument.prototype.getDefaultUserMaster = function()
{
return this.DefaultUser;
};
@ -394,6 +394,18 @@
return max;
};
CDocument.prototype.getAllFieldsByUserMaster = function(userMaster)
{
let fields = [];
for (let index = 0, count = this.FieldMasters.length; index < count; ++index)
{
let fieldMaster = this.FieldMasters[index];
if (fieldMaster.checkUser(userMaster))
fields.push(fieldMaster);
}
return fields;
};
CDocument.prototype.onChangeFieldGroups = function()
{
if (!this.OForm)