Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: allow attributes for <fieldset> wrapper #253

Draft
wants to merge 22 commits into
base: 3.18.x
Choose a base branch
from

Conversation

mimmi20
Copy link
Contributor

@mimmi20 mimmi20 commented Jan 3, 2024

Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Description

With this PR Attributes will be allowed an the fieldset wrapper for radio- oder multicheckbox-Elements. This PR is related to Issue #62.

@mimmi20 mimmi20 force-pushed the feature-attributes-for-fieldset-wrapper branch from 7952f65 to 3ecb00d Compare January 3, 2024 18:07
$markup = sprintf(
'<fieldset><legend>%s</legend>%s</fieldset>',
'<fieldset%s><legend%s>%s</legend>%s</fieldset>',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the markup (fieldset and legend) is still hard-coded. The idea was therefore to use the wrapper functionality from the FormCollection helper and extend it. This would allow the same handling between the different helpers.
The legend_attributes option which is introduced here also specifies that it is always a legend element.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, I ask myself if the handling is not too cumbersome for the user, because the same options would have to be set for each MultiCheckbox or Radio element every time. 🤔
(Related to #62 (comment))

@froschdesign froschdesign marked this pull request as draft January 3, 2024 19:32
@froschdesign froschdesign linked an issue Jan 3, 2024 that may be closed by this pull request
@mimmi20 mimmi20 force-pushed the feature-attributes-for-fieldset-wrapper branch from 5c3c106 to 4bf89ef Compare January 9, 2024 08:41
mimmi20 and others added 22 commits January 9, 2024 14:16
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: George Steel <george@net-glue.co.uk>
… exception.

Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
…ed the same as a string literal

Signed-off-by: George Steel <george@net-glue.co.uk>
Improve type inference for FormElementManager::get()
Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
Signed-off-by: George Steel <george@net-glue.co.uk>
String is the correct argument type, but it is not possible to implement in the 3.x series

Signed-off-by: George Steel <george@net-glue.co.uk>
Add failing test case for integer element labels
….x_MkCXLtZO

Merge release 3.19.1 into 3.20.x
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
@mimmi20 mimmi20 force-pushed the feature-attributes-for-fieldset-wrapper branch from 4bf89ef to df79f8e Compare January 14, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FormRow: allow attributes for <fieldset> wrapper
4 participants