use full prefix for certifying official in SO review

This commit is contained in:
dandds 2019-02-20 11:37:49 -05:00
parent 4521b7483f
commit 41e715a404
6 changed files with 49 additions and 21 deletions

View File

@ -0,0 +1,27 @@
"""full prefix for certifying official on dd 254
Revision ID: fa3ba4049218
Revises: 7d9f070012ae
Create Date: 2019-02-20 11:19:39.655438
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fa3ba4049218'
down_revision = '7d9f070012ae'
branch_labels = None
depends_on = None
def upgrade():
op.alter_column("dd_254s", "co_address", new_column_name="certifying_official_address")
op.alter_column("dd_254s", "co_phone", new_column_name="certifying_official_phone")
op.alter_column("dd_254s", "co_title", new_column_name="certifying_official_title")
def downgrade():
op.alter_column("dd_254s", "certifying_official_address", new_column_name="co_address")
op.alter_column("dd_254s", "certifying_official_phone", new_column_name="co_phone")
op.alter_column("dd_254s", "certifying_official_title", new_column_name="co_title")

View File

@ -16,17 +16,18 @@ class DD254Form(CacheableForm):
description=translate("forms.dd_254.certifying_official.description"),
validators=[Required()],
)
co_title = StringField(
translate("forms.dd_254.co_title.label"), validators=[Required()]
)
co_address = StringField(
translate("forms.dd_254.co_address.label"),
description=translate("forms.dd_254.co_address.description"),
certifying_official_title = StringField(
translate("forms.dd_254.certifying_official_title.label"),
validators=[Required()],
)
co_phone = TelField(
translate("forms.dd_254.co_phone.label"),
description=translate("forms.dd_254.co_phone.description"),
certifying_official_address = StringField(
translate("forms.dd_254.certifying_official_address.label"),
description=translate("forms.dd_254.certifying_official_address.description"),
validators=[Required()],
)
certifying_official_phone = TelField(
translate("forms.dd_254.certifying_official_phone.label"),
description=translate("forms.dd_254.certifying_official_phone.description"),
validators=[Required(), PhoneNumber()],
)
required_distribution = SelectMultipleField(

View File

@ -11,9 +11,9 @@ class DD254(Base, mixins.TimestampsMixin):
id = types.Id()
certifying_official = Column(String)
co_title = Column(String)
co_address = Column(String)
co_phone = Column(String)
certifying_official_title = Column(String)
certifying_official_address = Column(String)
certifying_official_phone = Column(String)
required_distribution = Column(ARRAY(String))
task_order = relationship("TaskOrder", uselist=False, backref="task_order")

View File

@ -22,9 +22,9 @@
{{ form.csrf_token }}
<h3 class="subheading">{{ "task_orders.so_review.certification" | translate }}</h3>
{{ TextInput(form.certifying_official) }}
{{ TextInput(form.co_title) }}
{{ TextInput(form.co_phone, placeholder='(123) 456-7890', validation='usPhone') }}
{{ TextInput(form.co_address, paragraph=True) }}
{{ TextInput(form.certifying_official_title) }}
{{ TextInput(form.certifying_official_phone, placeholder='(123) 456-7890', validation='usPhone') }}
{{ TextInput(form.certifying_official_address, paragraph=True) }}
<hr>

View File

@ -435,9 +435,9 @@ class DD254Factory(Base):
model = DD254
certifying_official = factory.Faker("name")
co_title = factory.Faker("job")
co_address = factory.Faker("address")
co_phone = factory.LazyFunction(random_phone_number)
certifying_official_title = factory.Faker("job")
certifying_official_address = factory.Faker("address")
certifying_official_phone = factory.LazyFunction(random_phone_number)
required_distribution = factory.LazyFunction(
lambda: [random_choice(data.REQUIRED_DISTRIBUTIONS)]
)

View File

@ -250,12 +250,12 @@ forms:
certifying_official:
label: Name of Certifying Official
description: (First, Last, Middle)
co_title:
certifying_official_title:
label: Title
co_address:
certifying_official_address:
label: Address
description: (Include ZIP Code)
co_phone:
certifying_official_phone:
label: Telephone
description: (Include Area Code)
required_distribution: