Summary of Changes
This PR is a first step to namespace JForm and fields and rules. It moves JForm/JFormField/JFormHelper/JFormRule to the namespace Joomla\CMS\Form.
New attributes addfieldprefix
, addformprefix
, addruleprefix
are introduced. They are addfieldpath
, addformpath
, addrulepath
and do allow to add a global namespace prefixes. For example in the article.xml file the categoryedit form field is registered like:
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset addfieldprefix="Joomla\Component\Categories\Administrator\Field" >
The fields in the components com_content and com_categories are moved to namespace as well to illustrate including fields of other components and modal ones.
This pr is dona against the 4.0-dev branch. When i got merged, then I will port it back to J3. I needed some real use cases to see if I'm on the right track.
Testing Instructions
- Create an article
- Create a "Single Article" menu item with the new article
Expected result
Article can be created as the category is a required field and uses the categoryedit form field of com_categories.
The article modal field should open a modal window to select an article.
Actual result
All is working fine.
Documentation Changes Required
The new attributes do need to be documented.
After our conversation last night please un-namespace the text form field, fix conflicts and this is good to merge