Main Koha release repository https://koha-community.org
Find a file
Petro Vashchuk 58c389bf27 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")

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>
2020-06-15 11:53:36 +02:00
acqui Bug 25266: Remove uneeded var 2020-06-15 10:32:20 +02:00
admin Bug 25557: Correct basket.pl column config 2020-06-12 09:57:38 +02:00
api/v1 Bug 25502: Adapt Advanced macros routes to current guidelines 2020-05-19 15:21:16 +01:00
authorities Bug 25428: Correctly encode link if authority subfield is a URL 2020-05-22 09:33:16 +01:00
basket Bug 17842: Simplify the code 2020-06-12 10:32:35 +02:00
C4 Bug 20783: Use iframe to embed Youtube videos 2020-06-15 10:32:43 +02:00
catalogue Bug 23591: Hide archived suggestions 2020-04-14 16:36:41 +01:00
cataloguing Bug 25248: (bug 23463 follow-up) Adjust second occurrence 2020-05-11 14:18:48 +01:00
circ Bug 24612: Make hold-transfer-slip take reserve_id 2020-05-22 09:33:16 +01:00
clubs Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
course_reserves Bug 22970: Allow to change homebranch in batch add course reserves 2020-05-12 11:40:54 +01:00
debian Bug 20783: Remove WWW::YouTube::Download dependency 2020-06-15 10:32:43 +02:00
docs Update contributors 2020-05-31 21:37:51 +01:00
errors Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
etc Bug 23975: (RM follow-up) Comment example configuration 2020-05-22 12:09:29 +01:00
ill Bug 23173: (follow-up) Small improvements in efficiency 2020-04-06 11:05:09 +01:00
installer Bug 25707: (QA follow-up) Clearer message about what's going on 2020-06-12 09:57:22 +02:00
Koha Bug 25507: Fix table in basket group PDF German 2-pages 2020-06-15 10:31:54 +02:00
koha-tmpl Bug 25587: fix for "clear" button to reset all selects 2020-06-15 11:53:36 +02:00
labels Bug 24735: Remove QueryParser-related code 2020-03-02 11:13:03 +00:00
members Bug 25526: Equality matching is case sensative 2020-06-15 10:29:34 +02:00
misc Bug 25642: Fix description of new feature in update_dbix_class_files.pl 2020-06-15 10:30:01 +02:00
offline_circ Bug 23463: Replace ModItem with Koha::Item->store 2020-03-23 09:26:30 +00:00
opac Bug 23276: Do not display tag if pref TagsEnabled is off 2020-06-15 10:32:29 +02:00
patron_lists Bug 19524: Use existing logged_in_user variable 2018-07-18 16:49:30 +00:00
patroncards Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
plugins Bug 23975: (RM follow-up) Comment example configuration 2020-05-22 12:09:29 +01:00
pos Bug 25139: Corrections to date picker handling 2020-04-15 08:33:07 +01:00
reports Bug 24940: Serials statistics wizard: order vendor list alphabetically 2020-04-08 11:46:21 +01:00
reserve Bug 25516: Fix for "Can't call method unblessed on unblessed reference" 2020-05-19 08:29:34 +01:00
reviews Bug 18789: Send Koha::Patron object to the templates 2018-02-16 13:03:58 -03:00
rotating_collections Bug 21500: Remove warnings in rotating collections 2018-10-09 15:02:45 +00:00
serials Bug 25081: Fix wrong comment 2020-04-08 11:53:37 +01:00
services Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
suggestion Bug 24819: (follow-up) Rename suggestor to suggester 2020-04-20 13:36:42 +01:00
svc Bug 4461: Fix status and borrowernumber fields in problem_reports and more 2020-04-06 11:18:59 +01:00
t Bug 25623: Make sure oauth.t rolls back the db 2020-06-15 11:53:36 +02:00
tags Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
tmp/modified_authorities
tools Bug 25608: (bug 23463 follow-up) Fix inventory regression 2020-05-28 17:02:04 +02:00
virtualshelves Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
xt Bug 24897: (RM follow-up) Drop tests for es-ES notices 2020-04-28 06:55:56 +01:00
.editorconfig Bug 24774: Set JSON indentation of 2 spaces in .editorconfig 2020-03-19 09:24:52 +00:00
.eslintrc.json Bug 23834: Add default ESLint configuration 2019-11-03 08:02:39 +00:00
.gitignore Bug 20427: Convert OPAC LESS to SCSS 2018-08-09 15:17:07 +00:00
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap
.scss-lint.yml Bug 21237: Clean up staff client SCSS 2018-08-24 16:23:25 +00:00
about.pl Bug 25506: Fix for "Use of uninitialized value" in about.pl 2020-05-22 09:33:16 +01:00
changelanguage.pl Bug 21299: (QA follow-up) Rename module and subroutine 2018-11-07 21:52:17 +00:00
cpanfile Bug 20783: Remove WWW::YouTube::Download dependency 2020-06-15 10:32:43 +02:00
fix-perl-path.PL
gulpfile.js Bug 21751: Replace fixFloat with HC-sticky to fix Chrome display 2019-02-04 14:13:35 +00:00
help.pl Bug 19817: Use the language from the interface if valid 2018-09-06 17:32:28 +00:00
INSTALL
Koha.pm Koha 20.06 - start of a new dev cycle 2020-06-02 11:20:53 +02:00
koha_perl_deps.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
mainpage.pl Bug 4461: Fix status and borrowernumber fields in problem_reports and more 2020-04-06 11:18:59 +01:00
Makefile.PL Bug 25149: Fix Zebra language code for Greek 2020-04-29 17:14:30 +01:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
package.json Bug 23025: security vulnerability detected in fstream < 1.0.12 defined in yarn.lock 2019-11-27 11:30:17 +00:00
README
README.md Bug 15465: Fix typo in bugs.k-c.org 2017-05-26 11:45:31 -03:00
README.robots
rewrite-config.PL Bug 17851: Add elasticsearch config to koha-conf.xml 2019-10-07 14:09:10 +01:00
yarn.lock Bug 23025: Update yarn.lock 2019-11-27 11:30:17 +00:00

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

http://koha-community.org/

Koha Logo