YUI.add("aui-form-builder-field-checkbox",function(e,t){var n=e.Lang,r=e.Array,i=e.Escape,s="boolean",o="checkbox",u="checked",a="choice",f="",l="field",c="form-builder-checkbox-field",h="form-builder-field",p="id",d="label",v="labelNode",t="name",m="no",g="node",y="predefinedValue",b=" ",w="template",E="templateNode",S="yes",x=e.getClassName,T=x(l),N=x(l,o),C=x(l,a),k=x(h),L=x(h,g),A='<input id="{id}" class="'+[L,T,N,C].join(b)+'" name="{name}" type="checkbox" value="{value}" {checked} />',O=e.Component.create({NAME:c,ATTRS:{dataType:{value:s},predefinedValue:{setter:e.DataType.Boolean.parse,value:!1},template:{valueFn:function(){return A}}},CSS_PREFIX:k,EXTENDS:e.FormBuilderField,prototype:{renderUI:function(){var t=this,n=t.get(E),r=t.get(v);e.FormBuilderCheckBoxField.superclass.renderUI.apply(t,arguments),r.insert(n,r,"before")},getPropertyModel:function(){var t=this,n=t.getStrings(),i=e.FormBuilderCheckBoxField.superclass.getPropertyModel.apply(t,arguments);return r.each(i,function(r,i,s){r.attributeName===y&&(s[i]={attributeName:y,editor:new e.RadioCellEditor({options:{"true":n[S],"false":n[m]}}),formatter:e.bind(t._booleanFormatter,t),name:n[y]})}),i},getHTML:function(){var e=this,r=e.get(u);return n.sub(e.get(w),{checked:r?'checked="checked"':f,id:i.html(e.get(p)),label:i.html(e.get(d)),name:i.html(e.get(t)),value:i.html(e.get(y))})},_uiSetPredefinedValue:function(e){var t=this,n=t.get(E);e?n.setAttribute(u,e):n.removeAttribute(u)}}});e.FormBuilderCheckBoxField=O,e.FormBuilder.types.checkbox=e.FormBuilderCheckBoxField},"2.0.0",{requires:["aui-form-builder-field-base"]});
