[Koha-bugs] [Bug 25587] JavaScript issue - "clear" button doesn't reset some dropdowns

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 22 17:18:56 CEST 2020


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

--- Comment #1 from Peter Vashchuk <stalkernoid at gmail.com> ---
Created attachment 105271
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105271&action=edit
Bug 25587: fix for "clear" button to reset all selects

Button "clear" on cgi-bin/koha/admin/smart-rules.pl did not reset fields with a
dropdown selector except the first one.

This happens because jQuery selector .find("select option:first")
in koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
selects only single first element in the whole group, as from jquery doc:
> The :first pseudo-class is equivalent to :eq( 0 ). It could also be written as :lt( 1 ). While this matches only a single element, :first-child can match more than one: One for each parent. (https://api.jquery.com/first-selector/)

And it works if replaced by: .find("select option:first-child")

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list