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

Custom attributes for select option elements are being stripped in Theme Boost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Forms Library, Themes
    • Labels:
    • Testing Instructions:
      Hide
      Test on Boost theme
      1. Download optiontest.php to your moodle root directory.
      2. Open it on your web browser.
      3. Inspect the option tags of the various select elements and check and confirm the options have the following attributes:
        • value
        • custom-attr
        • data-otherval
      4. Confirm that Option 1 is selected for all the select elements (Select Groups and Select Groups Inline will have "Option X - 1" selected. It doesn't matter, we just want to confirm that the "selected" attribute is being set.)
      5. Check that Option 2 is disabled for all of the select elements. For Select Groups and Select Groups-Inline, "Option X - 2" are disabled.
      6. Check that Option 3 has its label shown instead (e.g. "Option 3 label")
      7. Check the values for the "label", "custom-attr" and "data-otherval" attributes.
        • Confirm that the values are not double quoted.
      Show
      Test on Boost theme Download optiontest.php to your moodle root directory. Open it on your web browser. Inspect the option tags of the various select elements and check and confirm the options have the following attributes: value custom-attr data-otherval Confirm that Option 1 is selected for all the select elements (Select Groups and Select Groups Inline will have " Option X - 1 " selected. It doesn't matter, we just want to confirm that the "selected" attribute is being set.) Check that Option 2 is disabled for all of the select elements. For Select Groups and Select Groups-Inline , " Option X - 2 " are disabled. Check that Option 3 has its label shown instead (e.g. " Option 3 label ") Check the values for the " label ", " custom-attr " and " data-otherval " attributes. Confirm that the values are not double quoted.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56577-master

      Description

      Just found out that content-item selection does not work in Theme Boost. When I inspected the option elements, I noticed that the custom attributes that were set in mod_form have not been rendered.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpataleta Jun Pataleta
              Reporter:
              jpataleta Jun Pataleta
              Peer reviewer:
              Simey Lameze
              Integrator:
              Andrew Nicols
              Tester:
              Jake Dallimore
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Bas Brands
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16