-
Notifications
You must be signed in to change notification settings - Fork 0
resubmit button on approved forms #493
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
Conversation
@admin.route('/admin/addToBanner/<form_id>', methods=['POST']) | ||
|
||
|
||
def submitToBanner(form_id): |
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.
We already have a function that submits to banner, right? It happens whenever a form is approved by admins. We shouldn't be re-inventing that solution.
else: | ||
return jsonify({"success": False}), 500 | ||
else: | ||
return jsonify({"success": False}) |
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.
Don't use success: True and False. Use the status codes to determine success or not.
I suspect you also need a try/except around the banner save attempt, but really you should be re-using the code that already does this.
|
||
@admin.route('/admin/addToBanner/<form_id>', methods=['POST']) | ||
|
||
|
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.
Remove the space between the route and the method, please
@@ -213,6 +213,7 @@ | |||
<div class = "col-sm-{{12/buttonState.num_buttons}}"> | |||
|
|||
<a href="#"><button class="btn btn-primary" id="emailLabor">Email Labor</button></a> | |||
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="submitToBanner({{statusForm.laborStatusFormID}})">Resubmit Form</button> |
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.
Do you see how all of the other buttons use the buttonState object to determine if the button should display? This is necessary because it doesn't make sense to have a Resubmit button on every form, and certainly not for every user. Students should not be able to submit their forms to banner, for example.
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.
Has not been resolved yet
Button state changes were never addressed. Re-implemented in commit 87211c2. |
fixes #419
Description:
Resubmit button so that something that should have pushed to banner can be hit so that it goes into Banner.
This button should only be for admins and it should be on approved forms.
Changes:
Testing:
Before

^was stuck like this forever basically
After
