Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34221

disabledIf doesn't work on drag-and-drop filepicker form elements

XMLWordPrintable

    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • wip-MDL-34221-master
    • Hide

      1. Write a Moodle form which contains a form element of type 'filepicker' AND the form element of type 'filemanager'
      2. Add a form element of type 'select' to the form, with options 'yes' and 'no'.
      3. Use $mform->disabledIf() to make it so that when the 'select' element is set to 'no', the filepicker should be disabled.
      4. Print the form in a standard Moodle page.
      5. Set the 'select' element to 'no'

      Expected outcome: The filepicker/filemanager will become disabled, user is unable to add files either by drag-and-drop or by using filepicker. User also can not see the list of files inside the elements (if there were any)

      Show
      1. Write a Moodle form which contains a form element of type 'filepicker' AND the form element of type 'filemanager' 2. Add a form element of type 'select' to the form, with options 'yes' and 'no'. 3. Use $mform->disabledIf() to make it so that when the 'select' element is set to 'no', the filepicker should be disabled. 4. Print the form in a standard Moodle page. 5. Set the 'select' element to 'no' Expected outcome: The filepicker/filemanager will become disabled, user is unable to add files either by drag-and-drop or by using filepicker. User also can not see the list of files inside the elements (if there were any)

      The new drag-and-drop filepickers don't get disabled by the Javascript generated by $mform->disabledIf(). The "Choose a file..." button gets disabled, but the drag-and-drop box with the arrow and the text "You can drag and drop files here to add them" does not disable.

            davosmith Davo Smith
            aaronw@catalyst.net.nz Aaron Wells
            Sam Hemelryk Sam Hemelryk
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.