MDL-17135 fixed too general js function name + fixed whitespace coding style

This commit is contained in:
skodak 2009-10-21 20:01:00 +00:00
parent 72977b3786
commit 1b92e90218
2 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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