Bug 40819: Only initialize select2 for #report_param_form
This patch makes the the css selector specifically target the
report_param_form in guided reports
To test:
1. Go to Reports > Create guided report
2. Click Next >>
3. Click Next >>
3. Notice the form has been initialized as select2
4. Apply patch and refresh the page
5. Confirm the select column form is back to normal
6. Confirm select2 is still initialized for SQL reports
example: select * from items where homebranch IN <<Library|branches:in>>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 646109833f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
368fa69831
commit
ae67fcfe40
|
|
@ -2451,7 +2451,7 @@
|
|||
});
|
||||
|
||||
// Apply select2 to all select fields having a "multiple" attribute
|
||||
let selectFields = document.querySelectorAll('select[multiple]');
|
||||
let selectFields = document.querySelectorAll('#report_param_form select[multiple]');
|
||||
selectFields.forEach((selectField) => {
|
||||
selectField.style.minWidth = '320px';
|
||||
$(selectField).select2();
|
||||
|
|
|
|||
Loading…
Reference in New Issue