warning alert for manually entering task order info on financial form

This commit is contained in:
dandds 2018-08-21 09:22:39 -04:00
parent 4c1ffecea5
commit 0a6cbe7e03
3 changed files with 20 additions and 0 deletions

1
.gitignore vendored
View File

@ -34,3 +34,4 @@ config/dev.ini
# CRLs
/crl
/crl-tmp
*.bk

View File

@ -72,6 +72,10 @@ class BaseFinancialForm(ValidatedForm):
valid = validate_pe_id(self.pe_id, existing_request)
return valid
@property
def is_missing_task_order_id(self):
return False
task_order_id = StringField(
"Task Order Number associated with this request",
description="Include the original Task Order number (including the 000X at the end). Do not include any modification numbers. Note that there may be a lag between approving a task order and when it becomes available in our system.",
@ -127,6 +131,10 @@ class FinancialForm(BaseFinancialForm):
except NotFoundError:
raise ValidationError("Task Order number not found")
@property
def is_missing_task_order_id(self):
return "task_order_id" in self.errors
class ExtendedFinancialForm(BaseFinancialForm):
def validate(self, *args, **kwargs):

View File

@ -16,6 +16,17 @@
) }}
{% endif %}
{% if f.is_missing_task_order_id %}
{% set extended_url = url_for('requests.financial_verification', request_id=request_id, extended=True) %}
{{ Alert('Task Order not found in EDA',
message="We could not find your Task Order in our system of record, EDA.
Please confirm that you have entered it correctly.
<a href=\"%s\">Otherwise enter TO information manually.</a>
"|format(extended_url),
level='warning'
) }}
{% endif %}
<div class="panel">
<div class="panel__heading">