From 8f070059652a2540377e43160ff1dc1e951f0647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Wed, 25 Feb 2015 13:26:29 +0000 Subject: [PATCH] Fixed issue 819 The problem was that it was only checking for button to use html instead of val, what you need is to only use val if it it's an input and use html for everything else. --- applications/welcome/static/js/web2py.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index cd4fcc59..cd654b82 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -490,7 +490,7 @@ * and prevent clicking on it */ disableElement: function(el) { el.addClass('disabled'); - var method = el.is('button') ? 'html' : 'val'; + var method = el.is('input') ? 'val' : 'html'; //method = el.attr('name') ? 'html' : 'val'; var disable_with_message = (typeof w2p_ajax_disable_with_message != 'undefined') ? w2p_ajax_disable_with_message : "Working..."; /*store enabled state if not already disabled */ @@ -515,7 +515,7 @@ /* restore element to its original state which was disabled by 'disableElement' above*/ enableElement: function(el) { - var method = el.is('button') ? 'html' : 'val'; + var method = el.is('input') ? 'val' : 'html'; if(el.data('w2p_enable_with') !== undefined) { /* set to old enabled state */ el[method](el.data('w2p_enable_with')); @@ -730,4 +730,4 @@ web2py_event_handlers = jQuery.web2py.event_handlers; web2py_trap_link = jQuery.web2py.trap_link; web2py_calc_entropy = jQuery.web2py.calc_entropy; */ -/* compatibility code - end*/ \ No newline at end of file +/* compatibility code - end*/