Permalink
Browse files

MDL-7013 disabeldIf implemented in resource settings

  • Loading branch information...
1 parent 9958e84 commit f6bb9a93a3783e55c964df61623ece999a569826 skodak committed Jan 12, 2007
@@ -583,17 +583,17 @@ function setup_elements(&$mform) {
$mform->addElement('checkbox', 'framepage', get_string('frameifpossible', 'resource'));
$mform->setDefault('framepage', 0);
-// $mform->disabledIf('framepage', 'windowpopup', '', 0);
+ $mform->disabledIf('framepage', 'windowpopup', 'eq', 0);
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', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
} else {
$mform->addElement('checkbox', $option, get_string('new'.$option, 'resource'));
$mform->setDefault($option, $CFG->{'resource_popup'.$option});
-// $mform->disabledIf($option, 'windowpopup', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
}
}
@@ -158,17 +158,17 @@ function setup_elements(&$mform) {
$mform->addElement('checkbox', 'blockdisplay', get_string('showcourseblocks', 'resource'));
$mform->setDefault('blockdisplay', 0);
-// $mform->disabledIf('blockdisplay', 'windowpopup', '', 0);
+ $mform->disabledIf('blockdisplay', 'windowpopup', 'eq', '0');
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', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', '1');
} else {
$mform->addElement('checkbox', $option, get_string('new'.$option, 'resource'));
$mform->setDefault($option, $CFG->{'resource_popup'.$option});
-// $mform->disabledIf($option, 'windowpopup', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', '1');
}
}
}
@@ -641,11 +641,11 @@ function setup_elements(&$mform) {
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', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
} else {
$mform->addElement('checkbox', $option, get_string('new'.$option, 'resource'));
$mform->setDefault($option, $CFG->{'resource_popup'.$option});
- // $mform->disabledIf($option, 'windowpopup', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
}
}
@@ -654,17 +654,17 @@ function setup_elements(&$mform) {
$mform->addElement('selectyesno', 'param_navigationmenu', get_string('navigationmenu', 'resource'));
$mform->setDefault('param_navigationmenu', 1);
$mform->addElement('selectyesno', 'param_tableofcontents', get_string('tableofcontents', 'resource'));
- // $mform->disabledIf($option, 'param_navigationmenu', '', 1);
+ $mform->disabledIf($option, 'param_navigationmenu', 'eq', 1);
$mform->setDefault('param_tableofcontents', 0);
$mform->addElement('selectyesno', 'param_navigationbuttons', get_string('navigationbuttons', 'resource'));
$mform->setDefault('param_navigationbuttons', 0);
$mform->addElement('selectyesno', 'param_skipsubmenus', get_string('skipsubmenus', 'resource'));
$mform->setDefault('param_skipsubmenus', 1);
- // $mform->disabledIf($option, 'param_navigationmenu', '', 1);
+ $mform->disabledIf($option, 'param_navigationmenu', 'eq', 1);
$mform->addElement('selectyesno', 'param_navigationupbutton', get_string('navigationup', 'resource'));
$mform->setDefault('param_navigationup', 1);
- // $mform->disabledIf($option, 'param_navigationmenu', '', 1);
- // $mform->disabledIf($option, 'param_navigationmenu', '', 0);//????????
+ $mform->disabledIf($option, 'param_navigationmenu', 'eq', 1);
+ $mform->disabledIf($option, 'param_navigationmenu', 'eq', 0);//????????
}
@@ -576,17 +576,17 @@ function setup_elements(&$mform) {
$mform->addElement('checkbox', 'framepage', get_string('frameifpossible', 'resource'));
$mform->setDefault('framepage', 0);
-// $mform->disabledIf('framepage', 'windowpopup', '', 0);
+ $mform->disabledIf('framepage', 'windowpopup', 'eq', 0);
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', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
} else {
$mform->addElement('checkbox', $option, get_string('new'.$option, 'resource'));
$mform->setDefault($option, $CFG->{'resource_popup'.$option});
-// $mform->disabledIf($option, 'windowpopup', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
}
}
@@ -165,17 +165,17 @@ function setup_elements(&$mform) {
$mform->addElement('checkbox', 'blockdisplay', get_string('showcourseblocks', 'resource'));
$mform->setDefault('blockdisplay', 0);
-// $mform->disabledIf('blockdisplay', 'windowpopup', '', 0);
+ $mform->disabledIf('blockdisplay', 'windowpopup', 'eq', 0);
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', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
} else {
$mform->addElement('checkbox', $option, get_string('new'.$option, 'resource'));
$mform->setDefault($option, $CFG->{'resource_popup'.$option});
-// $mform->disabledIf($option, 'windowpopup', '', 1);
+ $mform->disabledIf($option, 'windowpopup', 'eq', 1);
}
}
}

0 comments on commit f6bb9a9

Please sign in to comment.