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

Make the tab active if there are errors in the form #15116

Closed
Ruslan-Aleev opened this issue Jun 16, 2020 · 6 comments
Closed

Make the tab active if there are errors in the form #15116

Ruslan-Aleev opened this issue Jun 16, 2020 · 6 comments

Comments

@Ruslan-Aleev
Copy link
Collaborator

Bug report

Summary

@alroniks made extremely useful functionality that catches the tab with errors and makes it active - #14235

But, as it turned out, tab does not always become active.

For example, if the name TV contains invalid characters:

tab_error_1

Although if the name TV is empty, the tab is activated, everything is fine:

tab_error_2

Expected behavior

Make the tab active if there are ANY errors in the form

Environment

MODX 2.x >

@Ruslan-Aleev
Copy link
Collaborator Author

Most likely related with #15088

@smg6511
Copy link
Collaborator

smg6511 commented Jun 26, 2020

I have a solution for this and will be submitting a PR in the next few days. The reason this happens (in the other element form panels as well) is the failure method that ultimately fires the failureSubmit event is missing. The reason it works when the name field is blank is that the native extjs allowBlank validation is triggering the failure whereas invalid field value errors are reported in the submission failure response.

@Ruslan-Aleev
Copy link
Collaborator Author

I have a solution for this and will be submitting a PR in the next few days.

It would be great! If you have a desire, look at this issue - #15088 they are related.

@smg6511
Copy link
Collaborator

smg6511 commented Jul 1, 2020

Almost finished on this issue and #15088 that you mentioned. Trying to cover as many scenarios as I can think of ... the last of which (for now) is handing the behavior when tvs are moved into custom panels via manager customization rules. I should have the PR very soon...

@JoshuaLuckers
Copy link
Contributor

I should have the PR very soon...

You can always create a PR and mark it as draft! We really appreciate the effort!

Mark-H added a commit that referenced this issue Oct 4, 2020
…diting resources or elements [#14743, #15116, #15088]

Merge remote-tracking branch 'upstream/pr/15146' into 2.x

* upstream/pr/15146:
  Follow up elements validation fixes
  Update modx.panel.resource.js
  Additional Updates to Element Validation and Field Display
  Fix Various Issues with Element Validation and Field Display
@Mark-H
Copy link
Collaborator

Mark-H commented Oct 4, 2020

Fixed in 2.8

@Mark-H Mark-H closed this as completed Oct 4, 2020
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

No branches or pull requests

4 participants