-
Notifications
You must be signed in to change notification settings - Fork 58
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
Part 2: Change report flow to POST request for Setup Scan and Saving report #3182
Part 2: Change report flow to POST request for Setup Scan and Saving report #3182
Conversation
@@ -115,109 +108,11 @@ def get_context_data(self, **kwargs): | |||
return context | |||
|
|||
|
|||
class SaveGenerateReportMixin(ReportPluginView): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to mixins.py
@@ -134,72 +131,6 @@ def get_context_data(self, **kwargs): | |||
return context | |||
|
|||
|
|||
class SaveAggregateReportMixin(ReportPluginView): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to mixins.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is aggregate specific code and not a general reporting mixin. What is the reason to moving it to a mixins file instead of keeping it in the aggregate specific file? It doesn't seem a logical place to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you hadn't unnecessarily move this there also wouldn't have been merge conflicts here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have move this code to mixins to keep the flow of the report wizard in the code more readable. As it follows a path top down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also put it at the bottom of the file.
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
…t/report-flow-post-request-part-2
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
class="inline layout-wide"> | ||
{% csrf_token %} | ||
{% include "forms/report_form_fields.html" %} | ||
<form novalidate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this novalidate needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validation has the HTML styling, we use our own Django validations with messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean also Manon styling for showing form errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If validation can already be done by the browser / before submitting the form in my opinion that it is better user experience then having it done after the form is submitted. If there are styling issues with the validation errors we should fix those syling issues instead of not doing the validation.
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
…vws/nl-kat-coordination into feat/report-flow-post-request-part-2
Changes
Issue link
#3279
Closes #3279
Code Checklist
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.