CKEDITOR.dialog.add("radio",function(a){return{title:a.lang.forms.checkboxAndRadio.radioTitle,minWidth:350,minHeight:140,onShow:function(){delete this.radioButton;var b=this.getParentEditor().getSelection().getSelectedElement();b&&"input"==b.getName()&&"radio"==b.getAttribute("type")&&(this.radioButton=b,this.setupContent(b))},onOk:function(){var e,f=this.radioButton,d=!f;d&&(e=this.getParentEditor(),f=e.document.createElement("input"),f.setAttribute("type","radio"));d&&e.insertElement(f);this.commitContent({element:f})},contents:[{id:"info",label:a.lang.forms.checkboxAndRadio.radioTitle,title:a.lang.forms.checkboxAndRadio.radioTitle,elements:[{id:"name",type:"text",label:a.lang.common.name,"default":"",accessKey:"N",setup:function(b){this.setValue(b.data("cke-saved-name")||b.getAttribute("name")||"")},commit:function(b){b=b.element;this.getValue()?b.data("cke-saved-name",this.getValue()):(b.data("cke-saved-name",!1),b.removeAttribute("name"))}},{id:"value",type:"text",label:a.lang.forms.checkboxAndRadio.value,"default":"",accessKey:"V",setup:function(b){this.setValue(b.getAttribute("value")||"")},commit:function(b){b=b.element;this.getValue()?b.setAttribute("value",this.getValue()):b.removeAttribute("value")}},{id:"checked",type:"checkbox",label:a.lang.forms.checkboxAndRadio.selected,"default":"",accessKey:"S",value:"checked",setup:function(b){this.setValue(b.getAttribute("checked"))},commit:function(b){var h=b.element;if(CKEDITOR.env.ie){var g=h.getAttribute("checked"),f=!!this.getValue();g!=f&&(g=CKEDITOR.dom.element.createFromHtml('<input type="radio"'+(f?' checked="checked"':"")+"></input>",a.document),h.copyAttributes(g,{type:1,checked:1}),g.replace(h),a.getSelection().selectElement(g),b.element=g)}else{this.getValue()?h.setAttribute("checked","checked"):h.removeAttribute("checked")}}},{id:"required",type:"checkbox",label:a.lang.forms.checkboxAndRadio.required,"default":"",accessKey:"Q",value:"required",setup:function(b){this.setValue(b.getAttribute("required"))},commit:function(b){b=b.element;this.getValue()?b.setAttribute("required","required"):b.removeAttribute("required")}}]}]}});