add expiration_date to manual task order form
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import re
|
||||
from wtforms.fields.html5 import EmailField
|
||||
import pendulum
|
||||
from wtforms.fields.html5 import DateField, EmailField
|
||||
from wtforms.fields import StringField, FileField
|
||||
from wtforms.validators import InputRequired, Required, Email, Regexp
|
||||
from flask_wtf.file import FileAllowed
|
||||
@@ -11,6 +12,7 @@ from atst.domain.task_orders import TaskOrders
|
||||
from .fields import NewlineListField, SelectField
|
||||
from .forms import ValidatedForm
|
||||
from .data import FUNDING_TYPES
|
||||
from .validators import DateRange
|
||||
|
||||
|
||||
PE_REGEX = re.compile(
|
||||
@@ -166,6 +168,20 @@ class ExtendedFinancialForm(BaseFinancialForm):
|
||||
|
||||
funding_type_other = StringField("If other, please specify")
|
||||
|
||||
expiration_date = DateField(
|
||||
"Task Order Expiration Date",
|
||||
description="Please enter the expiration date for the Task Order",
|
||||
validators=[
|
||||
Required(),
|
||||
DateRange(
|
||||
lower_bound=pendulum.duration(days=0),
|
||||
upper_bound=pendulum.duration(years=100),
|
||||
message="Must be a date in the future.",
|
||||
),
|
||||
],
|
||||
format="%m/%d/%Y",
|
||||
)
|
||||
|
||||
clin_0001 = StringField(
|
||||
"<dl><dt>CLIN 0001</dt> - <dd>Unclassified IaaS and PaaS Amount</dd></dl>",
|
||||
validators=[InputRequired()],
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
from sqlalchemy import Column, Integer, String, ForeignKey, Enum as SQLAEnum
|
||||
from sqlalchemy import Column, Integer, String, ForeignKey, Enum as SQLAEnum, Date
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from atst.models import Base
|
||||
@@ -32,6 +32,7 @@ class TaskOrder(Base):
|
||||
clin_1003 = Column(Integer)
|
||||
clin_2001 = Column(Integer)
|
||||
clin_2003 = Column(Integer)
|
||||
expiration_date = Column(Date())
|
||||
|
||||
attachment_id = Column(ForeignKey("attachments.id"))
|
||||
pdf = relationship("Attachment")
|
||||
|
@@ -146,5 +146,6 @@ def view_request_details(request_id=None):
|
||||
"requests/details.html",
|
||||
data=data,
|
||||
request=request,
|
||||
financial_review=financial_review,
|
||||
requires_fv_action=requires_fv_action,
|
||||
)
|
||||
|
Reference in New Issue
Block a user