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

Allow disabled- and form-Attribute on fieldsets #255

Merged
merged 4 commits into from
Jan 9, 2024
Merged

Allow disabled- and form-Attribute on fieldsets #255

merged 4 commits into from
Jan 9, 2024

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

This PR wants to allow the Attributes "disabled" and "form" on fieldsets. This is related to Issue #155.

Signed-off-by: Thomas Müller <mimmi20@live.de>
@froschdesign
Copy link
Member

@mimmi20
The name attribute is removed here:

if (! isset($this->doctypesAllowedToHaveNameAttribute[$this->getDoctype()])) {
unset($attributes['name']);
}

A replacement can be:

if (! $this->getDoctypeHelper()->isHtml5()) {
    unset(
        $attributes['name'],
        $attributes['disabled'],
        $attributes['form']
    );
}

The doctypesAllowedToHaveNameAttribute property can then be removed:

private array $doctypesAllowedToHaveNameAttribute = [
Doctype::HTML5 => true,
Doctype::XHTML5 => true,
];

Signed-off-by: Thomas Müller <mimmi20@live.de>
@mimmi20 mimmi20 marked this pull request as ready for review January 4, 2024 12:44
Signed-off-by: Thomas Müller <mimmi20@live.de>
Signed-off-by: Thomas Müller <mimmi20@live.de>
@froschdesign froschdesign added this to the 3.18.0 milestone Jan 4, 2024
@Slamdunk Slamdunk linked an issue Jan 9, 2024 that may be closed by this pull request
@Slamdunk
Copy link
Contributor

Slamdunk commented Jan 9, 2024

Thank you 🎊

@Slamdunk Slamdunk merged commit 39262de into laminas:3.18.x Jan 9, 2024
11 checks passed
@mimmi20 mimmi20 deleted the feature-disable-fieldsets branch January 9, 2024 07:58
@froschdesign froschdesign changed the title allow disabled- and form-Attribute on fieldsets Allow disabled- and form-Attribute on fieldsets Jan 9, 2024
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.

I can't set atrribue "disabe" to fieldset tag.
3 participants