Skip to content

Conversation

@laoneo
Copy link
Member

@laoneo laoneo commented May 9, 2017

Summary of Changes

Com_categories has a nice little feature which allows the component developer to place a form file on /administrator/components/com_foo/models/forms/category.xml which get loaded when editing a category.
This pr introduces the same functionality for com_fields. If a file is found on the location /administrator/components/com_foo/models/forms/fields/bar.xml then this file get loaded when the entity com_foo.bar is edited.

Additionally an overwrite is added which hides the "Automatic Display" field for com_users as it is not relevant for that component.

It should fix #14377 and #15244.

Testing Instructions

Create a new User custom field.

Expected result

The "Automatic Display" field in options is not displayed.

Actual result

The "Automatic Display" field in options is displayed.

Documentation Changes Required

Would be nice to have that feature documented.

@Bakual
Copy link
Contributor

Bakual commented May 9, 2017

I like this proposal, I'm only not so sure about the location where the file is placed.
With this we will have /models/forms/fields and /models/fields which may be a bit confusing.
What about following the naming pattern which is used for the searchtool filters? So /models/forms/field_bar.xml?

@laoneo
Copy link
Member Author

laoneo commented May 9, 2017

When you have many entities, then the forms folder get cluttered with too many files. Thats why I recommend to put it into a subfolder.

@AlexRed
Copy link
Contributor

AlexRed commented May 9, 2017

I have tested this item ✅ successfully on bf40057

Patch ok for me. Thanks

Can do the same also for Contact fields (Mail) ?


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

@laoneo
Copy link
Member Author

laoneo commented May 10, 2017

@AlexRed I can do it, when this one got merged. It will be then only one file to add.

@ghost
Copy link

ghost commented May 10, 2017

I have tested this item ✅ successfully on bf40057


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

@ghost
Copy link

ghost commented May 10, 2017

RTC after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 10, 2017
@rdeutz rdeutz added this to the Joomla 3.7.1 milestone May 10, 2017
@rdeutz rdeutz merged commit 2c7be41 into joomla:staging May 10, 2017
@joomla-cms-bot joomla-cms-bot added PR-staging and removed RTC This Pull Request is Ready To Commit labels May 10, 2017
@laoneo laoneo deleted the cf/form-include branch May 10, 2017 16:01
@laoneo
Copy link
Member Author

laoneo commented May 10, 2017

@AlexRed check out #15953 for the Contact -> Mail fix.

wojsmol added a commit to wojsmol/joomla-cms that referenced this pull request May 10, 2017
zero-24 pushed a commit that referenced this pull request May 10, 2017
brianteeman pushed a commit to brianteeman/joomla-cms that referenced this pull request May 16, 2017
…#15915)

* Support to include component specific form files

* Hide the display param for users
brianteeman pushed a commit to brianteeman/joomla-cms that referenced this pull request May 16, 2017
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.

[com_fields] Automatic Display in User Context doesn´t apply in this context

5 participants