WorryFree Computers   »   [go: up one dir, main page]

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

[5.1] Add Global Setting for Form Layout option to custom fields #37320

Merged
merged 77 commits into from
Nov 2, 2023

Conversation

AndySDH
Copy link
Contributor
@AndySDH AndySDH commented Mar 19, 2022

Pull Request for Issue #37162. Follow-up to PR #36551 and issue #36548.

Purpose of the PR

As discussed in #37162, this allows users to set a global preference for the HTML Select for custom fields of types: list, SQL, radio, integer.

I would have just removed the option, as the "raw" select is just ugly, but @laoneo noted that we need to keep it for Backwards Compatibility.

Summary of Changes

  • Added plugin settings for all relevant fields so that the field inherits from the global options by default (this allows users to set a global preference instead of having to set it for each field they create)
  • The global option will still use the old "raw" style by default (to keep Backwards Compatibility)
  • Implemented the same setting for the Integer field type as well (it was forgotten about in PR 36551 )
  • Renamed the option to "Form Layout" for it to be more explicative
  • Added new language strings in a shared language file to avoid duplicating them for all field types

Testing Instructions

First create the custom field:

  • Create Custom Field of type 'list' for the Content component. Make sure that the 'Multiple' setting is set to 'Yes'
  • Go to Options->Form Options: Keep the 'Form Layout' as 'Use Settings from Plugin'

Then:

  • Go to Plugin Manager, and in the plugin options for 'Fields - List', change the default 'Form Layout' option
  • Edit an article and check the form display of the field, it will change based on your selection of 'Form Layout'

Actual result BEFORE applying this Pull Request

There was no global setting to inherit from the plugin for 'Form Layout'

Expected result AFTER applying this Pull Request

There is now a global setting for 'Form Layout' that controls the default value when not specified in an individual field.

Changing the global setting will change the form layout of the field.

Co-authored-by: Brian Teeman <brian@teeman.net>
AndySDH and others added 3 commits March 19, 2022 17:26
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
@obuisard
Copy link
Contributor
obuisard commented Oct 2, 2023

I have tested this and have not triggered any errors this time. I think it is OK but do not know how to create a ticked pass box as I usually do that with the Joomla test interface which is currently down.

You will have to wait for the issue tracker to get back online, I am afraid. This is the only way you can cast your test. In the meantime, Richard set the PR as RTC, which acknowledges your test.

@AndySDH
Copy link
Contributor Author
AndySDH commented Oct 2, 2023

I have tested this and have not triggered any errors this time. I think it is OK but do not know how to create a ticked pass box as I usually do that with the Joomla test interface which is currently down.

Thank you :)

@Quy Quy removed the PBF Pizza, Bugs and Fun label Oct 2, 2023
@richard67 richard67 changed the title [5.1] Add Global Setting for Form Layout option to custom fields [5.0] Add Global Setting for Form Layout option to custom fields Oct 3, 2023
@richard67 richard67 added PBF Pizza, Bugs and Fun PR-5.0-dev and removed RTC This Pull Request is Ready To Commit PR-5.1-dev labels Oct 3, 2023
@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37320.

@joomla-cms-bot joomla-cms-bot added PR-5.1-dev RTC This Pull Request is Ready To Commit labels Oct 3, 2023
@richard67 richard67 removed PBF Pizza, Bugs and Fun PR-5.0-dev labels Oct 3, 2023
@richard67 richard67 changed the title [5.0] Add Global Setting for Form Layout option to custom fields [5.1] Add Global Setting for Form Layout option to custom fields Oct 3, 2023
@LadySolveig LadySolveig added this to the Joomla! 5.1.0 milestone Nov 1, 2023
@LadySolveig
Copy link
Contributor

Many thanks for this contribution @AndySDH and the very nice teamwork!

@Razzo1987
Copy link
Contributor

I have tested this item ✅ successfully on 9137eee

Very nice work! We love it!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37320.

@Razzo1987 Razzo1987 merged commit 5eb45ba into joomla:5.1-dev Nov 2, 2023
3 of 4 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 2, 2023
heelc29 added a commit to heelc29/joomla-cms that referenced this pull request Dec 31, 2023
Razzo1987 pushed a commit that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet