Moodle
  1. Moodle
  2. MDL-10382

Allow removing of elements with disabledIf conditions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.9
    • Component/s: Forms Library
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      28860

      Description

      The problem is that the getLockOptionEndScript() may try to use getElement with the name of removed element

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          fixed in cvs

          Show
          Petr Škoda added a comment - fixed in cvs
          Hide
          Jamie Pratt added a comment -

          This fix has broken disabledIf in many forms. The problem is that if the dependentOn element is an element in a group then elementExists will return false.

          Will revert this for now.

          Show
          Jamie Pratt added a comment - This fix has broken disabledIf in many forms. The problem is that if the dependentOn element is an element in a group then elementExists will return false. Will revert this for now.
          Show
          Jamie Pratt added a comment - Fix was http://moodle.cvs.sourceforge.net/moodle/moodle/lib/formslib.php?r1=1.112&r2=1.113 Reverted it.
          Hide
          Petr Škoda added a comment -

          Oh, sorry - working on another fix - thanks!

          I am glad I did not try to commit it into head

          Show
          Petr Škoda added a comment - Oh, sorry - working on another fix - thanks! I am glad I did not try to commit it into head
          Hide
          Petr Škoda added a comment -

          reclosing - thanks!

          Show
          Petr Škoda added a comment - reclosing - thanks!
          Hide
          Petr Škoda added a comment -

          added some more checks to prevent JS errors when hardFreezing elements with disabledIf conditions

          Show
          Petr Škoda added a comment - added some more checks to prevent JS errors when hardFreezing elements with disabledIf conditions
          Hide
          Jamie Pratt added a comment -

          The code to fix this is very similar to the patch Urs is working on to have mooTools js framework work with Moodle.

          Show
          Jamie Pratt added a comment - The code to fix this is very similar to the patch Urs is working on to have mooTools js framework work with Moodle.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: