mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Make a function for parsing help query param
Our templates are a littered with `request.args.get('help', '0')`.
This commit refactors these into a single helper method, which can be
used by the view functions, then passed to the template.
This makes the templates cleaner, and should make it easier to refactor
`help` out of the query parameters entirely in the future.
This commit is contained in:
@@ -174,7 +174,7 @@
|
||||
{% else %}
|
||||
<form method="post" enctype="multipart/form-data" action="{{url_for('main.start_job', service_id=current_service.id, upload_id=upload_id)}}" class='page-footer'>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="help" value="{{ '3' if request.args['help'] == '2' else 0 }}" />
|
||||
<input type="hidden" name="help" value="{{ '3' if help else 0 }}" />
|
||||
<input type="submit" class="button" value="Send {{ count_of_recipients }} {{ message_count_label(count_of_recipients, template.template_type, suffix='') }}" />
|
||||
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user