]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7013 disabeldIf implemented in resource settings
authorskodak <skodak>
Fri, 12 Jan 2007 10:24:01 +0000 (10:24 +0000)
committerskodak <skodak>
Fri, 12 Jan 2007 10:24:01 +0000 (10:24 +0000)
mod/resource/type/file/resource.class.php
mod/resource/type/html/resource.class.php
mod/resource/type/ims/resource.class.php
mod/resource/type/repository/resource.class.php
mod/resource/type/text/resource.class.php

index b33580904270f328f084d8a7bd9ecc3c1f36c8c0..72461a9cd94dd2d4bec7b7fa3fdf0515811d979e 100644 (file)
@@ -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);
         }
     }
 
index 3c25c51d0ff219f2e9e656395818fdbaa6c785d1..0df9474913d931dc4b31b86d1c4cfc8732193013 100644 (file)
@@ -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');
         }
     }
 }
index 42b3af8ecb7541653021a990d0f6a1fefc276249..a022517d861257a5482998ae160551e5724df403 100644 (file)
@@ -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', '', 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 @@ class resource_ims extends resource_base {
         $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);//????????
 
     }
 
index 63a524c81582be7475a0c1a810568b23d1c126eb..027603b767779c7c8ce38a2e7a37d728b587822e 100644 (file)
@@ -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);
         }
     }
 
index 94257f0b55d0e692c0fde4c537ca157065a444d4..82d81627a1bb70cd9c5bcec84ebd8126d897f089 100644 (file)
@@ -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);
         }
     }
 }