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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.3.2
    • Component/s: Filepicker
    • Labels:
    • Testing Instructions:
      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)
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-34221-master

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/12