https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29773

            Bug ID: 29773
           Summary: suggestion.pl event listener too restrictive
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Acquisitions
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Suggestion.pl has an event listener that is listening to all buttons of the
type submit, which requires the user to select at least one suggestion on the
page.  This prevents other buttons of a submit type that have nothing to do
with that particular form from being added to the page and working without this
same restriction.

$("button[type='submit']").on("click", function(e) {
                    var submit_button = this;
                    var form = $(submit_button).parents("form");
                    var action = $(submit_button).val();
                    var selected_suggestions =
$(form).find("input[name='suggestionid']:checked");
                    if ( selected_suggestions.length == 0 ) {
                        alert(_("Please select at least one suggestion"));
                        e.preventDefault();
                        return false;
                    }

needs to be rewritten so that it is limited to the 4 buttons at the bottom of
the page only.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to