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

Add module for displaying moodleform in a modal window

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1 modal forms

      1. As admin go to Site administration>Courses>Course custom fields
      2. Create a category
      3. Add new fields, edit fields, make sure the form is displayed in the modal dialogue and works properly. Especially check the following:
        • if there are changes in the form and you close the tab the browser displays the warning
        • after you submit, cancel or even simply close the dialogue (by pressing X) there is no "unsaved changes" warning if you try to close the tab
        • when you use atto as the editor, enter the text in the editor field, leave the window open until the "Draft saved" message appears and then refresh the tab. If you start editing a different element - the text is not restored, if you start editing the same element - text is restored. After you submit/cancel/close dialogue and edit the same element - the text is not restored.
        • text in the editor is saved if you use tinymce editor

      Test 2 ajax (embedded) forms

      1. pick the last commit from the branch https://github.com/moodle/moodle/compare/master...marinaglancy:MDL-64554-master-alltogether
      2. Open pages /tag/test1.php , /tag/test2.php , /tag/test3.php
      3. Make sure the repeated elements work in all three forms, browser alerts about closing the window if there are unsaved changes, editor text is saved, etc.
      4. For the ajax form in /tag/test3.php repeat the same tests that you were doing for course custom fields
      Show
      Test 1 modal forms As admin go to Site administration>Courses>Course custom fields Create a category Add new fields, edit fields, make sure the form is displayed in the modal dialogue and works properly. Especially check the following: if there are changes in the form and you close the tab the browser displays the warning after you submit, cancel or even simply close the dialogue (by pressing X) there is no "unsaved changes" warning if you try to close the tab when you use atto as the editor, enter the text in the editor field, leave the window open until the "Draft saved" message appears and then refresh the tab. If you start editing a different element - the text is not restored, if you start editing the same element - text is restored. After you submit/cancel/close dialogue and edit the same element - the text is not restored. text in the editor is saved if you use tinymce editor Test 2 ajax (embedded) forms pick the last commit from the branch https://github.com/moodle/moodle/compare/master...marinaglancy:MDL-64554-master-alltogether Open pages /tag/test1.php , /tag/test2.php , /tag/test3.php Make sure the repeated elements work in all three forms, browser alerts about closing the window if there are unsaved changes, editor text is saved, etc. For the ajax form in /tag/test3.php repeat the same tests that you were doing for course custom fields
    • Affected Branches:
      MOODLE_36_STABLE
    • Pull Master Branch:
      MDL-64554-master-3

      Description

      Currently it is very complicated to display a form inside a modal window. This tutorial is too difficult to follow and have some errors https://docs.moodle.org/dev/MForm_Modal

      Create a easy way to display a form in a popup

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 31 minutes
                  31m