diff --git a/Resources/public/js/FpJsFormValidator.js b/Resources/public/js/FpJsFormValidator.js index dfc3e88..bb46041 100644 --- a/Resources/public/js/FpJsFormValidator.js +++ b/Resources/public/js/FpJsFormValidator.js @@ -304,8 +304,7 @@ function FpJsCustomizeMethods() { FpJsFormValidator.each(this, function (item) { var prototype = FpJsFormValidator.preparePrototype( FpJsFormValidator.cloneObject(item.jsFormValidator.prototype), - name, - item.jsFormValidator.id + '_' + name + name ); item.jsFormValidator.children[name] = FpJsFormValidator.createElement(prototype); item.jsFormValidator.children[name].parent = item.jsFormValidator; @@ -954,15 +953,14 @@ var FpJsFormValidator = new function () { * * @param {Object} prototype * @param {String} name - * @param {String} id */ - this.preparePrototype = function (prototype, name, id) { + this.preparePrototype = function (prototype, name) { prototype.name = prototype.name.replace(/__name__/g, name); - prototype.id = prototype.id.replace(/__name__/g, id); + prototype.id = prototype.id.replace(/__name__/g, name); if (typeof prototype.children == 'object') { for (var childName in prototype.children) { - prototype[childName] = this.preparePrototype(prototype.children[childName], name, id); + prototype[childName] = this.preparePrototype(prototype.children[childName], name); } }