This Pull Request adds the attribute subfield_widths to overcome this limitation, but keeps subfield_sizes as a fallback for backwards compatibility in case subfields_widths is not set.
Current behavior before PR
The values set for subfield_sizes have no effect
Desired behavior after PR is merged
The values set for subfield_sizes have effect
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.
Description of the issue/feature this PR addresses
This Pull Request adds the
subfield_widths
property toRecordField
so it has precedence oversize
attribute.System sets the value for
size
attribute properly when renderinginput
elements. However, there are some css rules (either coming from bootstrap and defined in senaite css - see https://github.com/senaite/senaite.core/blob/2.x/webpack/app/scss/forms.scss#L55-L56 -) that apply awidth
to input elements.As stated at https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size , If CSS targets the element with properties impacting the width, CSS takes precedence.. Therefore, the values set for
subfield_sizes
are always omitted.This Pull Request adds the attribute
subfield_widths
to overcome this limitation, but keepssubfield_sizes
as a fallback for backwards compatibility in casesubfields_widths
is not set.Current behavior before PR
The values set for
subfield_sizes
have no effectDesired behavior after PR is merged
The values set for
subfield_sizes
have effect-- I confirm I have tested this PR thoroughly and coded it according to PEP8 and Plone's Python styleguide standards.