Main Koha release repository
https://koha-community.org
58c389bf27
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") To reproduce: 1) Go to /cgi-bin/koha/admin/smart-rules.pl 2) Start editing one of existing rules or filling a new one, change all selects to have non-first option selected. Fill text input fields with sample data. 3) Reset all fields with the "clear" button. 4) Observe that only the first dropdown field was reset to the first option while all others still contain previously given values, meanwhile all text input fields are cleared as expected. 5) Apply the patch. 6) Repeat steps 1, 2 and 3. 7) Check that all dropdown fields were reset to first option, as expected. Mentored-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
acqui | ||
admin | ||
api/v1 | ||
authorities | ||
basket | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tmp/modified_authorities | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.scss-lint.yml | ||
about.pl | ||
changelanguage.pl | ||
cpanfile | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
yarn.lock |
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: This is a synced mirror of the official Koha repo.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook