!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()),newPollContent:Forminator.Utils.template(e(t).find("#forminator-new-poll-content-tpl").html()),events:{"click #forminator-build-your-form":"handleMouseClick",keyup:"handleKeyClick"},initialize:function(e){this.options=e},render:function(){this.$el.html(this.newFormTpl()),this.$el.find(".sui-box-body").html(this.newPollContent())},handleMouseClick:function(e){this.create_poll(e)},handleKeyClick:function(e){e.preventDefault(),13===e.which&&this.create_poll(e)},create_poll:function(t){t.preventDefault();var o=e(t.target).closest(".sui-box").find("#forminator-form-name");if(""===o.val().trim())e(t.target).closest(".sui-box").find(".sui-error-message").show();else{var n=Forminator.Data.modules.polls.new_form_url;e(t.target).closest(".sui-box").find(".sui-error-message").hide(),n=n+"&name="+o.val(),window.location.href=n}}})})}(jQuery);