Moodle
  1. Moodle
  2. MDL-31796

$mform->disabledIf doesn't work for 'filemanager' mform elements

    Details

    • Testing Instructions:
      Hide

      create a form
      add one 'filemanager' element
      add one 'hidden' element
      preset the hidden element to 0 and to 1. Look at the status of the 'filemanager' element.

      Show
      create a form add one 'filemanager' element add one 'hidden' element preset the hidden element to 0 and to 1. Look at the status of the 'filemanager' element.
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      The following code does not work as expected.

      $fieldname = 'filemanagername';
      $attachmentoptions = array('maxbytes' => 1024, 'accepted_types' => '*', 'subdirs' => false, 'maxfiles' => -1);
      $mform->addElement('filemanager', $fieldname, 'filemanager_label', null, $attachmentoptions);
      $mform->disabledIf($fieldname, 'referencefield', 'eq', '1');

      so, the 'filemanager' mform element is not disable even if 'referencefield' is equal to 1

        Gliffy Diagrams

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting that. Sorry for missing it earlier.

          Show
          Michael de Raadt added a comment - Thanks for reporting that. Sorry for missing it earlier.
          Hide
          Michael de Raadt added a comment -

          Has this been tested since MDL-25937 was integrated? It looks like a duplicate but came in later.

          Show
          Michael de Raadt added a comment - Has this been tested since MDL-25937 was integrated? It looks like a duplicate but came in later.
          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this issue.

          We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

          If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

          Michael d.

          TW9vZGxlDQo=

          Show
          Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
          Hide
          Daniele Cordella added a comment -

          This is a relevant issue.
          I can not understand why it is still not handled.

          Show
          Daniele Cordella added a comment - This is a relevant issue. I can not understand why it is still not handled.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: