diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js index da3e0f348..e7333db5f 100644 --- a/web/pgadmin/static/js/backform.pgadmin.js +++ b/web/pgadmin/static/js/backform.pgadmin.js @@ -161,41 +161,40 @@ * values properly. */ Backform.Control.prototype.render = function() { - render: function() { - var field = _.defaults(this.field.toJSON(), this.defaults), - attributes = this.model.toJSON(), - attrArr = field.name.split('.'), - name = attrArr.shift(), - path = attrArr.join('.'), - rawValue = this.keyPathAccessor(attributes[name], path), - data = _.extend(field, { - rawValue: rawValue, - value: this.formatter.fromRaw(rawValue, this.model), - attributes: attributes, - formatter: this.formatter - }), - evalF = function(f, d, m) { - return (_.isFunction(f) ? !!f.apply(d, [m]) : !!f); - }; + var field = _.defaults(this.field.toJSON(), this.defaults), + attributes = this.model.toJSON(), + attrArr = field.name.split('.'), + name = attrArr.shift(), + path = attrArr.join('.'), + rawValue = this.keyPathAccessor(attributes[name], path), + data = _.extend(field, { + rawValue: rawValue, + value: this.formatter.fromRaw(rawValue, this.model), + attributes: attributes, + formatter: this.formatter + }), + evalF = function(f, d, m) { + return (_.isFunction(f) ? !!f.apply(d, [m]) : !!f); + }; - // Evaluate the disabled, visible, and required option - _.extend(data, { - disabled: evalF(data.disabled, data, this.model), - visible: evalF(data.visible, data, this.model), - required: evalF(data.required, data, this.model) - }); + // Evaluate the disabled, visible, and required option + _.extend(data, { + disabled: evalF(data.disabled, data, this.model), + visible: evalF(data.visible, data, this.model), + required: evalF(data.required, data, this.model) + }); - // Clean up first - this.$el.removeClass(Backform.hiddenClassname); + // Clean up first + this.$el.removeClass(Backform.hiddenClassname); - if (!data.visible) - this.$el.addClass(Backform.hiddenClassname); + if (!data.visible) + this.$el.addClass(Backform.hiddenClassname); - this.$el.html(this.template(data)).addClass(field.name); - this.updateInvalid(); + this.$el.html(this.template(data)).addClass(field.name); + this.updateInvalid(); - return this; - }; + return this; + }; /* * Overriding the render function of the select control to allow us to use