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

Changed the order of the fields in Form Customization #16052

Merged
merged 2 commits into from Feb 22, 2022
Merged

Changed the order of the fields in Form Customization #16052

merged 2 commits into from Feb 22, 2022

Conversation

Ruslan-Aleev
Copy link
Collaborator

@Ruslan-Aleev Ruslan-Aleev commented Feb 11, 2022

What does it do?

  1. Changed the order of the fields in Form Customization as in the resource form.

Before:
fcf_b

After:
fc_group

  1. Set the headings of the regions in the same style.
    The headings were called somewhere just "ID", somewhere "Region", which was confusing.
    Now the "Region (ID)" is specified - now it is clear that this is a region, and its ID is involved in the rendering of forms.

Why is it needed?

Now clearer when working with regions in FC

Related issue(s)/PR(s)

#14226

@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Feb 11, 2022
@Ruslan-Aleev Ruslan-Aleev added this to the v3.0.0-pl milestone Feb 11, 2022
@Ruslan-Aleev Ruslan-Aleev added area-fc Work related to form customization rules pr/review-needed Pull request requires review and testing. labels Feb 11, 2022
@alroniks
Copy link
Collaborator

Adding region to the table maybe is a good idea, it became more clear. But at the same time grouping by label 1 Field, 5 Fields looks weird and I don't like how it looks.

@Ruslan-Aleev
Copy link
Collaborator Author

Ruslan-Aleev commented Feb 19, 2022

I figured out how to display the region in the group title:

,groupTextTpl: '{[values.rs[0].data.tab]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_('fields')+'" : "'+_('field')+'"]})'

But this, in my opinion, is a strange solution, but it works :)

@Ruslan-Aleev
Copy link
Collaborator Author

Ruslan-Aleev commented Feb 20, 2022

Guys, I corrected the group label, and also left the regions in the grid (this is consistent with the setting of regions for TV and is clearer, as @alroniks pointed out).

Now it looks like this:
fc_group

p.s. But I didn't understand why modx-resource-content is always first (0 in tab_rank). And the position in the core/model/schema/modx.action.fields.schema.xml is not taken into account.

Copy link
Collaborator

@Jako Jako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine here. When is this xml file loaded into the database?

Copy link
Collaborator

@alroniks alroniks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me as well.

@alroniks alroniks added pr/ready-for-merging Pull request reviewed and tested and ready for merging. and removed pr/review-needed Pull request requires review and testing. labels Feb 21, 2022
@Ruslan-Aleev
Copy link
Collaborator Author

Ruslan-Aleev commented Feb 21, 2022

When is this xml file loaded into the database?

During the installation process, probably (not sure), the fields have moved, exactly as they are set in xml. BUT not modx-resource-content tab.

Here is the condition - https://github.com/modxcms/revolution/blob/3.x/_build/resolvers/resolve.actionfields.php#L32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-fc Work related to form customization rules cla-signed CLA confirmed for contributors to this PR. pr/ready-for-merging Pull request reviewed and tested and ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants