(function(){u8.Crm.Widgets.FieldForm=function(e,t){this.Widget(e,$.extend({},u8.Crm.Widgets.FieldForm.defaults,t));this._initialValues={};this.disabled=this.disabled||false;var i=this;var s=$.extend({onCreate:function(){i._isCreated=true;i.raise("Create",{});for(var e in i._initialValues){i.valuePaths[e].set(i._form.context,i._initialValues[e])}i._setDisabled()}},this.form);this._form=new u8.Base.Widgets.Form(e,s)};u8.Crm.Widgets.FieldForm.makeClass({name:"FieldForm",deriveFrom:u8.Base.Widgets.Widget,events:["Create"]});$.extend(u8.Crm.Widgets.FieldForm.prototype,{get:function(e){if(this._form._isCreated){return this.valuePaths[e].get(this._form.context)}else{return this._initialValues[e]}},set:function(e,t){if(this._form._isCreated){this.valuePaths[e].set(this._form.context,t)}else{this._initialValues[e]=t}},update:function(e){if(e.reason=="attr"){if(e.properties.disabled){this._setDisabled()}}},_setDisabled:function(){for(var e in this._form.widgets){var t=this._form.widgets[e].options;if(t){t.disabled=this.disabled}var i=this._form.getWidget(e);if(i){i.attr({disabled:this.disabled})}}}})})();