Cancel buttons are validating fields
In the forms, for example registration form, the Cancel button validates the fields. This is most likely present in all of the forms which contain the Cancel button. The expected behaviour is just to go back to the previous page.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Pavel Kácha assigned to @rajmund_hruska · Imported
assigned to @rajmund_hruska
By Rajmund Hruška on 2024-12-26T14:07:24
- Pavel Kácha changed milestone to %Backlog · Imported
changed milestone to %Backlog
- Author Owner
May I take this one?
Relation 'precedes' to: 7735
Jan Mach - Development 1.0h 2021-10-30 :: Time including initial research
By Jan Mach on 2021-10-28T19:14:11
- Author Owner
Yes, I don't mind.
By Rajmund Hruška on 2021-10-29T14:12:50
- Pavel Kácha assigned to @Jan_Mach and unassigned @rajmund_hruska · Imported
assigned to @Jan_Mach and unassigned @rajmund_hruska
By Rajmund Hruška on 2024-12-26T14:24:06
- Pavel Kácha added S-In Progress label and removed S-New label · Imported
added S-In Progress label and removed S-New label
- Pavel Kácha changed milestone to %2.9 · Imported
changed milestone to %2.9
- Author Owner
Fixed, merged, built and deployed to mentat-alt for verification.
The issue was in built-in JS form validation, not in backend form processing code. It was necessary to add onclick handler to all cancel buttons, that will disable the validation prior to submitting the form.
By Jan Mach on 2021-10-30T19:16:37
- Pavel Kácha added Done 100% S-Resolved labels and removed Done 0% S-In Progress labels · Imported
added Done 100% S-Resolved labels and removed Done 0% S-In Progress labels
- Pavel Kácha added S-In Review label and removed S-Resolved label · Imported
added S-In Review label and removed S-Resolved label
- Pavel Kácha added S-In Progress label and removed S-In Review label · Imported
added S-In Progress label and removed S-In Review label
- Author Owner
As agreed during our last VC I have removed cancel buttons from all login and registration forms. It does not make any sense here, because the user does not have anywhere to go back, since the whole application is protected by authorization.
Fix deployed to mentat-alt.
By Jan Mach on 2021-11-07T06:05:39
- Pavel Kácha added S-In Review label and removed S-In Progress label · Imported
added S-In Review label and removed S-In Progress label
- Pavel Kácha added S-Closed label and removed S-In Review label · Imported
added S-Closed label and removed S-In Review label
- Author Owner
There seems to be some trouble with the fix.
[2022-05-31 17:16:47,229] ERROR in app: Exception on /users/188/update? [GET], referer: https://mentat-hub.cesnet.cz/mentat/users/188/show Traceback (most recent call last):, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show response = self.full_dispatch_request(), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show rv = self.handle_user_exception(e), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show reraise(exc_type, exc_value, tb), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show raise value, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show rv = self.dispatch_request(), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show return self.view_functions[rule.endpoint](**req.view_args), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show return func(*args, **kwargs), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show return self.dispatch_request(*args, **kwargs), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/view/__init__.py", line 2196, in dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show return self.generate_response(), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/view/mixin.py", line 94, in generate_response, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show **self.response_context, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show ctx.app,, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/flask/templating.py", line 120, in _render, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show rv = template.render(context), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/environment.py", line 1291, in render, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show self.environment.handle_exception(), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/environment.py", line 925, in handle_exception, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show raise rewrite_traceback_stack(source=source), referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/users/templates/users/creatupdate.html", line 1, in top-level template code, referer: https://menta {%- extends "_layout_creatupdate.html" %}, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/blueprints/design_bs3/templates/_layout_creatupdate.html", line 1, in top-level template code, referer: https:/ {%- extends "_layout.html" %}, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/blueprints/design_bs3/templates/_layout.html", line 197, in top-level template code, referer: https://mentat-hu {%- block body %}, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/blueprints/design_bs3/templates/_layout.html", line 256, in block 'body', referer: https://mentat-hub.cesnet.cz {%- block content %}{% endblock content %}, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/blueprints/design_bs3/templates/_layout_creatupdate.html", line 37, in block 'content', referer: https://mentat {%- block itemform_buttons %}, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/vial/blueprints/design_bs3/templates/_layout_creatupdate.html", line 38, in block 'itemform_buttons', referer: https {{ form.cancel(class_='btn btn-default') }}, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/utils.py", line 84, in from_obj, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show if hasattr(obj, "jinja_pass_arg"):, referer: https://mentat-hub.cesnet.cz/mentat/users/188/show jinja2.exceptions.UndefinedError: 'hawat.blueprints.users.forms.AdminUpdateUserAccountForm object' has no attribute 'cancel', referer: https://mentat-hub.cesnet.cz/menta
By Radko Krkoš on 2022-05-31T15:42:51
- Pavel Kácha added S-Feedback label and removed S-Closed label · Imported
added S-Feedback label and removed S-Closed label
- Author Owner
This issue is not present at mentat-alt at this moment. I think it was fixed in 72eaea5f and this commit didn't reach
release
branch yet.By Rajmund Hruška on 2022-06-01T10:59:46
- Pavel Kácha added S-Closed label and removed S-Feedback label · Imported
added S-Closed label and removed S-Feedback label
- Pavel Kácha closed · Imported
closed
- Author Owner
Relation Precedes - Bug 7735 Cancel button are validating fields in filters and event classes
By Rajmund Hruška on 2024-05-13T08:51:18
- Pavel Kácha added 30m of time spent at 2021-11-07 · Imported
added 30m of time spent at 2021-11-07
By Jan Mach on 2024-12-26T14:24:06