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

Repository plug-in search form does not submit if there are more than one text fields in the form

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Create a repository plug-in with the required functions
      • In the get_listing() function ensure you set 'nosearch' to false
      • Create a print_search() function in your repository plugin
        • In the function write and return HTML and 2 text fields.
      • Attempt to type text into the form and press enter

      Notice that the form will not be submitted.

      Now modify the search form by removing 1 of the text fields. Type text in the text box and press enter. Notice the form submits.

      Show
      Create a repository plug-in with the required functions In the get_listing() function ensure you set 'nosearch' to false Create a print_search() function in your repository plugin In the function write and return HTML and 2 text fields. Attempt to type text into the form and press enter Notice that the form will not be submitted. Now modify the search form by removing 1 of the text fields. Type text in the text box and press enter. Notice the form submits.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      When enabling the 'nosearch' key (setting it to false) and creating a search form for a repository plug-in, the form does not submit any of the data when the enter key is pressed.

      Problem is that for Moodle 2.3 the filepicker does not render a submit button for the search form. And I believe that the YUI code is either looking for 1 and only 1 text field and/or it is looking for a text field named s.

      I haven't been able to figure out where in the filepicker all of this is occurring. But there is definitely a problem with the 2.3 search form.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: