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

chooserdialogue shouldn't access form elements by id

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide

      It's advisable to have your JS console open for these tests

      • Open a course page
      • Turn editing on
      • Open the Activity Chooser
      • Hit the Cancel button
        • Confirm that the submit button is disabled
        • Confirm that the chooser closes correctly without error
      • Re-open the chooser
        • Confirm that the submit button is disabled
      • Select a module
        • Confirm that the submit button is now enabled
      • Click the submit button
        • Confirm that the correct modedit page opens
      Show
      It's advisable to have your JS console open for these tests Open a course page Turn editing on Open the Activity Chooser Hit the Cancel button Confirm that the submit button is disabled Confirm that the chooser closes correctly without error Re-open the chooser Confirm that the submit button is disabled Select a module Confirm that the submit button is now enabled Click the submit button Confirm that the correct modedit page opens
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-34352-master-2

      Description

      It's possible (and likely) that there will be more than one chooserdialogue available at a time. At present, we're using IDs to access certain fields:

      • jumplink
      • submitbutton
      • cancelbutton

      But it's a breach of the XHTML spec to use the same ID multiple times.

      We need to use class selectors rather than IDs

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Sam Hemelryk
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/12