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

Update form styles in CMS when editing Elements #478

Merged

Conversation

NightJar
Copy link
Contributor

@NightJar NightJar commented Oct 30, 2018

The fields in e.g. 'split mode' editing within the CMS looked a bit
squished as the labels first took up an amount of room to the left of
the field proper. The better and desired approach here was to use the
.stacked class - rendering the labels atop the field.

However this approach would require every element built to add the
extraClass to the FormField instance in PHP in the getCMSFields method.
This is less than ideal, so it was decided to proceed with an override
for elements (and elements only) that will achieve the same effect.

Resolves #388

The fields in e.g. 'split mode' editing within the CMS looked a bit
squished as the labels first took up an amount of room to the left of
the field proper. The better and desired approach here was to use the
.stacked class - rendering the labels atop the field.

However this approach would require every element built to add the
extraClass to the FormField instance in PHP in the getCMSFields method.
This is less than ideal, so it was decided to proceed with an override
for elements (and elements only) that will achieve the same effect.

Also addresses checkboxes and radio buttons where the label generally
sits on the other side of the input element, where .stacked does not.
@ScopeyNZ ScopeyNZ merged commit e6b7ee9 into silverstripe:master Oct 30, 2018
@ScopeyNZ ScopeyNZ deleted the pulls/4.0/full-stack-form branch October 30, 2018 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants