diff --git a/admin/webservice/script.js b/admin/webservice/script.js index 8db3c012e62..a7d9f7a2f1c 100644 --- a/admin/webservice/script.js +++ b/admin/webservice/script.js @@ -1,12 +1,10 @@ /* This function disable the valid until field of a user into service_users.php*/ -function disablevaliduntil(event, userid) { +function external_disablevaliduntil(event, userid) { var disabled; - if (document.getElementById('enablevaliduntil'+userid).checked) - { + if (document.getElementById('enablevaliduntil'+userid).checked) { disabled = false; - } - else { + } else { disabled = true; } document.getElementById('menufromday'+userid).disabled = disabled; diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index 02877932712..e5ac7e87eae 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -191,7 +191,7 @@ if (!empty($allowedusers)) { $checkbox->text = get_string('enabled', 'webservice'); $checkbox->label->text = get_string('enabled', 'webservice'); $checkbox->alt = get_string('enabled', 'webservice'); - $checkbox->add_action('change', 'disablevaliduntil', array($user->id)); //into admin/webservice/script.js + $checkbox->add_action('change', 'external_disablevaliduntil', array($user->id)); //into admin/webservice/script.js $contents .= $OUTPUT->checkbox($checkbox, 'enablevaliduntil'); $contents .= ""; //init date selector disable status