!function(e){formintorjs.define(["text!tpl/dashboard.html"],function(t){return Backbone.View.extend({className:"wpmudev-popup-templates",newFormTpl:Forminator.Utils.template(e(t).find("#forminator-new-form-tpl").html()),templatesTpl:Forminator.Utils.template(e(t).find("#forminator-new-form-template-list-tpl").html()),events:{"click .wpmudev-template--type":"create_form"},render:function(){this.$el.html(this.newFormTpl()),this.$el.append(this.templatesTpl({templates:Forminator.Data.modules.custom_form.templates}))},create_form:function(t){t.preventDefault();var a=e(t.target).closest(".wpmudev-template--type"),m=e(t.target).closest(".wpmudev-box-section").find(".wpmudev-create-form-field"),o=a.data("template");if(""===m.val())this.$el.find("#forminator-validate-name").show();else{var l=Forminator.Data.modules.custom_form.new_form_url;this.$el.find("#forminator-validate-name").hide(),l=l+"&name="+m.val()+"&template="+o,window.location.href=l}}})})}(jQuery);