Sha256: c2c9337d75db1f3d44cbb596259e195e33b0bc5a8643258ace39300b1ed0240c
Contents?: true
Size: 895 Bytes
Versions: 62
Compression:
Stored size: 895 Bytes
Contents
// TODO: v4 deprecate in favor of jQuery UJS /** * @namespace WORKAREA.singleSubmitForms */ WORKAREA.registerModule('singleSubmitForms', (function () { 'use strict'; var preventSubmission = function (event) { event.preventDefault(); }, preventFurtherSubmissionsIfValid = function (event) { var $form = $(event.currentTarget); if ($form.valid()) { $form .off('submit.singleSubmitForms') .on('submit', preventSubmission); } }, /** * @method * @name init * @memberof WORKAREA.singleSubmitForms */ init = function ($scope) { $('[data-single-submit-form]', $scope) .on('submit.singleSubmitForms', preventFurtherSubmissionsIfValid); }; return { init: init }; }()));
Version data entries
62 entries across 62 versions & 1 rubygems