jQuery(document).ready((function(e){fluentform_editor_vars.forms.unshift({value:"",text:"--Select Form--"}),e("#fluent_form_insert_button").on("click",(function(t){t.preventDefault();var o=tinyMCE.activeEditor,r="fluentform-forms-popup-error"+(new Date).getTime();o.windowManager.open({width:400,height:100,title:"Add Form",body:[{type:"listbox",name:"form_id",label:"Select a Form:",values:fluentform_editor_vars.forms}],onselect:function(t){e("#"+r).remove()},onsubmit:function(t){if(t.data.form_id)o.insertContent("[fluentform id="+t.data.form_id+"]");else{t.preventDefault();var n=t.target.$el.find("#"+r);n=n.length||e("<div/>",{class:"error",id:r,style:"text-align:center;color:#dc3232",html:"No form is selected!"}).appendTo(t.target.$el)}}})}))}));