mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Use Flask for routing
This commit: - replaces links that look like buttons with forms and submit buttons - splits the view code for SMS into its own file - moves the routing into the Python by adding handling for `post` requests - uses Flask’s `url_for` to generate URLs, rather than hard coding them (so that it’s easier to change the URLs) - chages the URLs for sending text messages
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
{{ sms_message(message_template) }}
|
||||
|
||||
<p>
|
||||
<a class="button" href="/jobs/job" role="button">Send {{recipients|length}} text messages</a>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" value="Send {{recipients|length}} text messages" />
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user