From dfc7f21941cd1e47acbeccc39ceceff0c1847e22 Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 19 Jan 2007 19:50:30 +0000 Subject: [PATCH] fixed wrong disabledif conditions in resource subtypes - sorry --- mod/resource/type/file/resource.class.php | 6 +++--- mod/resource/type/html/resource.class.php | 6 +++--- mod/resource/type/ims/resource.class.php | 4 ++-- mod/resource/type/repository/resource.class.php | 6 +++--- mod/resource/type/text/resource.class.php | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index f76f3bc068..89f9039268 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -583,18 +583,18 @@ function setup_elements(&$mform) { $mform->addElement('checkbox', 'framepage', get_string('frameifpossible', 'resource')); $mform->setDefault('framepage', 0); - $mform->disabledIf('framepage', 'windowpopup', 'eq', 0); + $mform->disabledIf('framepage', 'windowpopup', 'eq', 1); $mform->setAdvanced('framepage'); foreach ($RESOURCE_WINDOW_OPTIONS as $option) { if ($option == 'height' or $option == 'width') { $mform->addElement('text', $option, get_string('new'.$option, 'resource'), array('size'=>'4')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } else { $mform->addElement('checkbox', $option, get_string('new'.$option, 'resource')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } $mform->setAdvanced($option); } diff --git a/mod/resource/type/html/resource.class.php b/mod/resource/type/html/resource.class.php index a60c16f1d5..1e192ab581 100644 --- a/mod/resource/type/html/resource.class.php +++ b/mod/resource/type/html/resource.class.php @@ -158,18 +158,18 @@ function setup_elements(&$mform) { $mform->addElement('checkbox', 'blockdisplay', get_string('showcourseblocks', 'resource')); $mform->setDefault('blockdisplay', 0); - $mform->disabledIf('blockdisplay', 'windowpopup', 'eq', '0'); + $mform->disabledIf('blockdisplay', 'windowpopup', 'eq', '1'); $mform->setAdvanced('blockdisplay'); foreach ($RESOURCE_WINDOW_OPTIONS as $option) { if ($option == 'height' or $option == 'width') { $mform->addElement('text', $option, get_string('new'.$option, 'resource'), array('size'=>'4')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', '1'); + $mform->disabledIf($option, 'windowpopup', 'eq', '0'); } else { $mform->addElement('checkbox', $option, get_string('new'.$option, 'resource')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', '1'); + $mform->disabledIf($option, 'windowpopup', 'eq', '0'); } $mform->setAdvanced($option); } diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php index 4184649b04..47e19f5c7e 100644 --- a/mod/resource/type/ims/resource.class.php +++ b/mod/resource/type/ims/resource.class.php @@ -641,11 +641,11 @@ class resource_ims extends resource_base { if ($option == 'height' or $option == 'width') { $mform->addElement('text', $option, get_string('new'.$option, 'resource'), array('size'=>'4')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } else { $mform->addElement('checkbox', $option, get_string('new'.$option, 'resource')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } $mform->setAdvanced($option); } diff --git a/mod/resource/type/repository/resource.class.php b/mod/resource/type/repository/resource.class.php index 642e203e94..7d3da0ac83 100644 --- a/mod/resource/type/repository/resource.class.php +++ b/mod/resource/type/repository/resource.class.php @@ -576,18 +576,18 @@ function setup_elements(&$mform) { $mform->addElement('checkbox', 'framepage', get_string('frameifpossible', 'resource')); $mform->setDefault('framepage', 0); - $mform->disabledIf('framepage', 'windowpopup', 'eq', 0); + $mform->disabledIf('framepage', 'windowpopup', 'eq', 1); $mform->setAdvanced('framepage'); foreach ($RESOURCE_WINDOW_OPTIONS as $option) { if ($option == 'height' or $option == 'width') { $mform->addElement('text', $option, get_string('new'.$option, 'resource'), array('size'=>'4')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } else { $mform->addElement('checkbox', $option, get_string('new'.$option, 'resource')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } $mform->setAdvanced($option); } diff --git a/mod/resource/type/text/resource.class.php b/mod/resource/type/text/resource.class.php index b619bc0f80..1e6c420a2c 100644 --- a/mod/resource/type/text/resource.class.php +++ b/mod/resource/type/text/resource.class.php @@ -165,18 +165,18 @@ function setup_elements(&$mform) { $mform->addElement('checkbox', 'blockdisplay', get_string('showcourseblocks', 'resource')); $mform->setDefault('blockdisplay', 0); - $mform->disabledIf('blockdisplay', 'windowpopup', 'eq', 0); + $mform->disabledIf('blockdisplay', 'windowpopup', 'eq', 1); $mform->setAdvanced('blockdisplay'); foreach ($RESOURCE_WINDOW_OPTIONS as $option) { if ($option == 'height' or $option == 'width') { $mform->addElement('text', $option, get_string('new'.$option, 'resource'), array('size'=>'4')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } else { $mform->addElement('checkbox', $option, get_string('new'.$option, 'resource')); $mform->setDefault($option, $CFG->{'resource_popup'.$option}); - $mform->disabledIf($option, 'windowpopup', 'eq', 1); + $mform->disabledIf($option, 'windowpopup', 'eq', 0); } $mform->setAdvanced($option); } -- 2.39.5