function wbDisableControls() { $('input, select, button').attr('disabled', 'disabled'); $('a').each(function() { $(this).data('old_href', $(this).attr('href')); }); $('a').attr('href', null); } function wbEnableControls() { $('input, select, button').attr('disabled', null); $('a').each(function() { $(this).attr('href', $(this).data('old_href')); }); } export { wbEnableControls, wbDisableControls };