From: skodak Date: Fri, 12 Jan 2007 10:48:11 +0000 (+0000) Subject: fixed function of advanced button in formslib - you had to click it twice initially X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=74d15d359d09fb7ce902d32b13b7512f9aa3e148;p=moodle.git fixed function of advanced button in formslib - you had to click it twice initially --- diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 60a0713c03..6641e2d371 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -251,7 +251,7 @@ function elementShowAdvanced(elements, show) { function showAdvancedOnClick(button, hidetext, showtext){ var toSet=findChildNodes(button.form, null, 'advanced'); var buttontext = ''; - if (button.form.elements['mform_showadvanced_last'].value == '0') { + if (button.form.elements['mform_showadvanced_last'].value == '0' || button.form.elements['mform_showadvanced_last'].value == '' ) { elementShowAdvanced(toSet, true); buttontext = hidetext; button.form.elements['mform_showadvanced_last'].value = '1';