From 1e29624ca7d1a478d025dacf4487bf3a9336f58d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 12 Jun 2014 21:57:41 +0100 Subject: [PATCH] crm.ajax.js - Alow a button to prevent ajax submit --- js/crm.ajax.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 2f2496f9bd..8d785e82c0 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -422,6 +422,10 @@ return false; }); } + // Alow a button to prevent ajax submit + $('input[data-no-ajax-submit=true]').click(function() { + $(this).closest('form').ajaxFormUnbind(); + }); // For convenience, focus the first field $('input[type=text], textarea, select', this).filter(':visible').first().not('.dateplugin').focus(); }); @@ -429,7 +433,6 @@ }; /** * Handler for jQuery click event e.g. $('a').click(CRM.popup) - * @returns {boolean} */ CRM.popup = function(e) { var $el = $(this).first(), -- 2.25.1