warning alert for manually entering task order info on financial form
This commit is contained in:
parent
4c1ffecea5
commit
0a6cbe7e03
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,3 +34,4 @@ config/dev.ini
|
|||||||
# CRLs
|
# CRLs
|
||||||
/crl
|
/crl
|
||||||
/crl-tmp
|
/crl-tmp
|
||||||
|
*.bk
|
||||||
|
@ -72,6 +72,10 @@ class BaseFinancialForm(ValidatedForm):
|
|||||||
valid = validate_pe_id(self.pe_id, existing_request)
|
valid = validate_pe_id(self.pe_id, existing_request)
|
||||||
return valid
|
return valid
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_missing_task_order_id(self):
|
||||||
|
return False
|
||||||
|
|
||||||
task_order_id = StringField(
|
task_order_id = StringField(
|
||||||
"Task Order Number associated with this request",
|
"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.",
|
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:
|
except NotFoundError:
|
||||||
raise ValidationError("Task Order number not found")
|
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):
|
class ExtendedFinancialForm(BaseFinancialForm):
|
||||||
def validate(self, *args, **kwargs):
|
def validate(self, *args, **kwargs):
|
||||||
|
@ -16,6 +16,17 @@
|
|||||||
) }}
|
) }}
|
||||||
{% endif %}
|
{% 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">
|
||||||
|
|
||||||
<div class="panel__heading">
|
<div class="panel__heading">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user