There are quite a few places in the templates where a <select> tag's size attribute is defined as "1." This is not necessary because the default setting for the tag is 1. It becomes a problem when using Bootstrap because Bootstrap's CSS targets <select> tags with a size attribute: select[multiple], select[size] { height: auto; } The goal is to be able to set a comfortable height property to <select> tags which are size 1. Removing the attribute in cases where it is equal to 1 will allow us to consistently size a <select> tag while allowing multiple selects to have the correct size.
Created attachment 119046 [details] [review] Bug 28066: Remove select tag's size attribute where it is 1 This patch removes the "size" attribute from <select> tags where the value of the attribute is 1. The attribute is unnecessary because the default value when the attribute is undefined is 1. This will allow for more careful sizing of <select> tags without a size attribute while preserving the desired behavior of <select> tags which have a size greater than 1. The patch modifies 83 files but makes the same minor corrections to each. I think examining the diff is sufficent, or testing a representative set of pages: - Administration -> MARC frameworks -> MARC structure -> Edit tag: The "Authorized value" select. - Patrons -> New patron: The "Library" select. - Reports -> Patrons with no checkouts: The "Into an application" selects. If anyone would like help testing any particular template I can follow-up.
Created attachment 119049 [details] [review] Bug 28066: Remove select tag's size attribute where it is 1 This patch removes the "size" attribute from <select> tags where the value of the attribute is 1. The attribute is unnecessary because the default value when the attribute is undefined is 1. This will allow for more careful sizing of <select> tags without a size attribute while preserving the desired behavior of <select> tags which have a size greater than 1. The patch modifies 83 files but makes the same minor corrections to each. I think examining the diff is sufficent, or testing a representative set of pages: - Administration -> MARC frameworks -> MARC structure -> Edit tag: The "Authorized value" select. - Patrons -> New patron: The "Library" select. - Reports -> Patrons with no checkouts: The "Into an application" selects. If anyone would like help testing any particular template I can follow-up. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I scanned a few of the pages with the change and am happy it doesn't cause any regressions. I then used 'ack' to scan the codebase for missed cases and couldn't spot any. Signing off
Created attachment 119139 [details] [review] Bug 28066: Remove select tag's size attribute where it is 1 This patch removes the "size" attribute from <select> tags where the value of the attribute is 1. The attribute is unnecessary because the default value when the attribute is undefined is 1. This will allow for more careful sizing of <select> tags without a size attribute while preserving the desired behavior of <select> tags which have a size greater than 1. The patch modifies 83 files but makes the same minor corrections to each. I think examining the diff is sufficent, or testing a representative set of pages: - Administration -> MARC frameworks -> MARC structure -> Edit tag: The "Authorized value" select. - Patrons -> New patron: The "Library" select. - Reports -> Patrons with no checkouts: The "Into an application" selects. If anyone would like help testing any particular template I can follow-up. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 119140 [details] [review] Bug 28066: (QA follow-up) Fix some single quote occurences Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added a QA check https://gitlab.com/koha-community/qa-test-tools/-/issues/49 Issue #49 - Forbit select tag's size attribute where it is 1
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x