-
Notifications
You must be signed in to change notification settings - Fork 81
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
Error messages during organization creation are not cleared #1220
Comments
Bugfix/Cadasta#1220: Clear error messages during create organization.
Just curious, is that something that happens in other forms as well? Say the project form for example? If yes, we need a generic solution that works across all forms and all fields. |
Cool @oliverroick , I will look into this and update the PR accordingly. By the way, I anyway need to update the PR for making the work "Name" lowercase. Sorry to have skipped that by mistake. Thanks! |
To be tested if that is reproducible in other forms (like for projects). |
Retested in the forms for creating projects. Interestingly behaviour is slightly different:
However inverting the order (first use an existing name and then try to use an empty name) presents both error messages: I think this is a much more corner case. |
Hi @dpalomino, the PR has been updated and now takes care of error messages while creating a new project. Looking forward to completely fix this issue. Thanks! :) |
@khantaalaman it's in cadasta/organization/tests/test_forms.py line 68. Please correct me if I am wrong. @dpalomino @oliverroick |
@yoshi2095 I have already mentioned it as the location where we would have to make the change and it's a test.
I am not getting the file responsible for the feature itself and not the test. Thanks for searching it btw. :) |
We're using Parsley to do client-side form validation. There might be a way to make Parsley use the same element to display error messages that Django does. That way you can have Parsley take care of the problem and it will be added to all forms. If that's not possible, you can add that functionality to |
@clash99 volunteered to take a look, thanks! |
Steps to reproduce the error
Attempt to create an organization with an empty name. It will show you the appropriate empty name error message. Then enter an organization name that already exists.
Actual behavior
Both error messages appear simultaneously. (The same error occurs no matter which order you trigger them in succession.)
Expected behavior
Any visible error message should be cleared upon clicking "Save", so that only the applicable error message appears after a new error is found. Also "Name" in the "Organization with this Name already exists" error message should be lowercase.
The text was updated successfully, but these errors were encountered: