Bug #7735
closedCancel button are validating fields in filters and event classes
0%
Files
Related issues
Updated by Rajmund Hruška 4 months ago
- Due date set to 10/08/2021
- Start date changed from 05/13/2024 to 10/08/2021
- Follows Bug #7519: Cancel buttons are validating fields added
Updated by Rajmund Hruška 3 months ago
- To be discussed changed from No to Yes
Simple solution would be to just remove the cancel buttons from those forms, similar to how to it was done in 1c53383a. That would fix this issue on frontend.
There is a feature on backend which handles action 'cancel': it flashes a banner saying that the action XXX was canceled.
def check_action_cancel(self, form, **kwargs):
"""
*Hook method*. Check the form for *cancel* button press and cancel the action.
"""
if hasattr(form, hawat.const.FORM_ACTION_CANCEL):
if getattr(form, hawat.const.FORM_ACTION_CANCEL).data:
self.flash(
flask.Markup(self.get_message_cancel(**kwargs)),
hawat.const.FLASH_INFO
)
return self.redirect(
default_url = self.get_url_next()
)
return None
But the question is, do we need this functionality? I think we can remove this.
Updated by Pavel Kácha 3 months ago
Rajmund Hruška wrote in #note-2:
Simple solution would be to just remove the cancel buttons from those forms, similar to how to it was done in 1c53383a. That would fix this issue on frontend.
There is a feature on backend which handles action 'cancel': it flashes a banner saying that the action XXX was canceled.
[...]But the question is, do we need this functionality? I think we can remove this.
Well, in login forms, it does not make sense (much) to cancel login, as that means you can't get inside the app altogether, and closing the window (tab) is appropriate.
Is it appropriate here? We don't open new windows for specific functions as this, so the user relies on us correctly returning him to previous state, which is not doable without Cancel, I guess?
Updated by Rajmund Hruška 3 months ago
Pavel Kácha wrote in #note-4:
Rajmund Hruška wrote in #note-2:
Simple solution would be to just remove the cancel buttons from those forms, similar to how to it was done in 1c53383a. That would fix this issue on frontend.
There is a feature on backend which handles action 'cancel': it flashes a banner saying that the action XXX was canceled.
[...]But the question is, do we need this functionality? I think we can remove this.
Well, in login forms, it does not make sense (much) to cancel login, as that means you can't get inside the app altogether, and closing the window (tab) is appropriate.
Is it appropriate here? We don't open new windows for specific functions as this, so the user relies on us correctly returning him to previous state, which is not doable without Cancel, I guess?
Instead of closing the window, the user could just press 'Back' button in the browser.
Updated by Pavel Kácha 3 months ago
Couldn't Cancel be just link to previous page then?
Updated by Rajmund Hruška 3 months ago
Pavel Kácha wrote in #note-6:
Couldn't Cancel be just link to previous page then?
Yes it could, that would be quite simple. We would lose that flash which informs about canceling the action, though. But, in my proposed solution we would lose it anyway
Updated by Pavel Kácha 3 months ago
Rajmund Hruška wrote in #note-7:
Pavel Kácha wrote in #note-6:
Couldn't Cancel be just link to previous page then?
Yes it could, that would be quite simple. We would lose that flash which informs about canceling the action, though. But, in my proposed solution we would lose it anyway
Sure. That is probably also solvable by adding some "flash=" like argument to returning URL, but I guess the whole Cancel flash bussiness is quite superfluous.
Updated by Rajmund Hruška 3 months ago
- Status changed from Feedback to In Progress
- Assignee set to Rajmund Hruška
- To be discussed changed from Yes to No
Updated by Rajmund Hruška 3 months ago
- Status changed from In Progress to Resolved
Updated by Rajmund Hruška 3 months ago
- Status changed from Resolved to In Review