CKEDITOR.dialog.add("form",function(d){var c={action:1,id:1,method:1,enctype:1,target:1};return{title:d.lang.form.title,minWidth:350,minHeight:200,onShow:function(){var a=this;delete a.form;var f=a.getParentEditor().getSelection().getStartElement(),b=f&&f.getAscendant("form",true);if(b){a.form=b;a.setupContent(b)}},onOk:function(){var f,b=this.form,a=!b;if(a){f=this.getParentEditor();b=f.document.createElement("form");!CKEDITOR.env.ie&&b.append(f.document.createElement("br"))}if(a){f.insertElement(b)}this.commitContent(b)},onLoad:function(){function b(f){this.setValue(f.getAttribute(this.id)||"")}function a(h){var g=this;if(g.getValue()){h.setAttribute(g.id,g.getValue())}else{h.removeAttribute(g.id)}}this.foreach(function(f){if(c[f.id]){f.setup=b;f.commit=a}})},contents:[{id:"info",label:d.lang.form.title,title:d.lang.form.title,elements:[{id:"txtName",type:"text",label:d.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){if(this.getValue()){a.data("cke-saved-name",this.getValue())}else{a.data("cke-saved-name",false);a.removeAttribute("name")}}},{id:"action",type:"text",label:d.lang.form.action,"default":"",accessKey:"T"},{type:"hbox",widths:["45%","55%"],children:[{id:"id",type:"text",label:d.lang.common.id,"default":"",accessKey:"I"},{id:"enctype",type:"select",label:d.lang.form.encoding,style:"width:100%",accessKey:"E","default":"",items:[[""],["text/plain"],["multipart/form-data"],["application/x-www-form-urlencoded"]]}]},{type:"hbox",widths:["45%","55%"],children:[{id:"target",type:"select",label:d.lang.common.target,style:"width:100%",accessKey:"M","default":"",items:[[d.lang.common.notSet,""],[d.lang.common.targetNew,"_blank"],[d.lang.common.targetTop,"_top"],[d.lang.common.targetSelf,"_self"],[d.lang.common.targetParent,"_parent"]]},{id:"method",type:"select",label:d.lang.form.method,accessKey:"M","default":"GET",items:[["GET","get"],["POST","post"]]}]}]}]}});