Merge pull request #290 from dod-ccpo/remove-internal-notes

Remove internal notes form
This commit is contained in:
richard-dds 2018-09-17 10:51:33 -04:00 committed by GitHub
commit cd0a745ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 34 deletions

View File

@ -12,7 +12,6 @@ from . import requests_bp
from atst.domain.requests import Requests from atst.domain.requests import Requests
from atst.domain.exceptions import NotFoundError from atst.domain.exceptions import NotFoundError
from atst.forms.ccpo_review import CCPOReviewForm from atst.forms.ccpo_review import CCPOReviewForm
from atst.forms.internal_comment import InternalCommentForm
def map_ccpo_authorizing(user): def map_ccpo_authorizing(user):
@ -26,8 +25,6 @@ def render_approval(request, form=None):
if pending_final_approval and request.task_order: if pending_final_approval and request.task_order:
data["task_order"] = request.task_order.to_dictionary() data["task_order"] = request.task_order.to_dictionary()
internal_comment_form = InternalCommentForm(text=request.internal_comments_text)
if not form: if not form:
mo_data = map_ccpo_authorizing(g.current_user) mo_data = map_ccpo_authorizing(g.current_user)
form = CCPOReviewForm(data=mo_data) form = CCPOReviewForm(data=mo_data)
@ -41,7 +38,6 @@ def render_approval(request, form=None):
pending_review=pending_review, pending_review=pending_review,
financial_review=pending_final_approval, financial_review=pending_final_approval,
f=form or CCPOReviewForm(), f=form or CCPOReviewForm(),
internal_comment_form=internal_comment_form,
) )
@ -84,15 +80,3 @@ def task_order_pdf_download(request_id):
else: else:
raise NotFoundError("task_order pdf") raise NotFoundError("task_order pdf")
@requests_bp.route("/requests/internal_comments/<string:request_id>", methods=["POST"])
def create_internal_comment(request_id):
form = InternalCommentForm(http_request.form)
if form.validate():
request = Requests.get(g.current_user, request_id)
Requests.update_internal_comments(g.current_user, request, form.data["text"])
return redirect(
url_for("requests.approval", request_id=request_id, _anchor="ccpo-notes")
)

View File

@ -135,24 +135,6 @@
</section> </section>
{% endif %} {% endif %}
<section class='internal-notes' id='ccpo-notes'>
<form method="POST" action="{{ url_for('requests.create_internal_comment', request_id=request.id) }}">
<div class='panel'>
<div class='panel__content'>
{{ internal_comment_form.csrf_token }}
{{ TextInput(internal_comment_form.text, paragraph=True, noMaxWidth=True) }}
</div>
</div>
<div class='action-group action-group--tight'>
<button class='usa-button' type="submit">Save Notes</button>
</div>
</form>
</section>
<section> <section>
<div class='panel'> <div class='panel'>
<header class='panel__heading panel__heading--divider'> <header class='panel__heading panel__heading--divider'>