diff --git a/oform/FieldMaster.js b/oform/FieldMaster.js index 94945d5..42ff772 100644 --- a/oform/FieldMaster.js +++ b/oform/FieldMaster.js @@ -55,6 +55,22 @@ { this.Field = logicField; }; + CFieldMaster.prototype.clone = function() + { + let fm = new CFieldMaster(true); + + for (let index = 0, count = this.Users.length; index < count; ++index) + { + fm.addUser(this.Users[index]); + } + + for (let index = 0, count = this.Signers.length; index < count; ++index) + { + fm.addSigner(this.Signers[index]); + } + + return fm; + }; CFieldMaster.prototype.setFieldId = function(fieldId) { if (fieldId === this.FieldId) diff --git a/oform/OForm.js b/oform/OForm.js index 0539dc5..622a95c 100644 --- a/oform/OForm.js +++ b/oform/OForm.js @@ -140,7 +140,6 @@ if (fields.length > 0) { - // TODO: При удалении все поля переназначить на заданную роль let delegateUserMaster, delegateFieldGroup; if (-1 === delegateIndex || delegateIndex === roleIndex) {