Add phone ext
This commit is contained in:
parent
9992ed44b6
commit
6bc157b2b3
32
alembic/versions/4c0b8263d800_add_phone_extension.py
Normal file
32
alembic/versions/4c0b8263d800_add_phone_extension.py
Normal file
@ -0,0 +1,32 @@
|
||||
"""Add Phone Extension
|
||||
|
||||
Revision ID: 4c0b8263d800
|
||||
Revises: 9c24c609878a
|
||||
Create Date: 2018-10-29 11:14:01.332665
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4c0b8263d800'
|
||||
down_revision = '9c24c609878a'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('request_reviews', sa.Column('phone_ext_mao', sa.String(), nullable=True))
|
||||
op.add_column('request_revisions', sa.Column('phone_ext', sa.String(), nullable=True))
|
||||
op.add_column('users', sa.Column('phone_ext', sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('users', 'phone_ext')
|
||||
op.drop_column('request_revisions', 'phone_ext')
|
||||
op.drop_column('request_reviews', 'phone_ext_mao')
|
||||
# ### end Alembic commands ###
|
@ -69,6 +69,7 @@ class Users(object):
|
||||
"last_name",
|
||||
"email",
|
||||
"phone_number",
|
||||
"phone_ext",
|
||||
"service_branch",
|
||||
"citizenship",
|
||||
"designation",
|
||||
|
@ -19,5 +19,6 @@ class CCPOReviewForm(ValidatedForm):
|
||||
phone_mao = TelField(
|
||||
"Mission Owner phone number (optional)", validators=[Optional(), PhoneNumber()]
|
||||
)
|
||||
phone_ext_mao = StringField("Extension (optional)")
|
||||
fname_ccpo = StringField("First Name (optional)", validators=[Optional(), Name()])
|
||||
lname_ccpo = StringField("Last Name (optional)", validators=[Optional(), Name()])
|
||||
|
@ -25,6 +25,7 @@ USER_FIELDS = {
|
||||
description="Enter your 10-digit U.S. phone number",
|
||||
validators=[PhoneNumber()],
|
||||
),
|
||||
"phone_ext": StringField("Extension"),
|
||||
"service_branch": SelectField(
|
||||
"Service Branch or Agency",
|
||||
description="Which service or organization do you belong to within the DoD?",
|
||||
@ -86,6 +87,7 @@ class EditUserForm(ValidatedForm):
|
||||
last_name = inherit_user_field("last_name")
|
||||
email = inherit_user_field("email")
|
||||
phone_number = inherit_user_field("phone_number")
|
||||
phone_ext = inherit_user_field("phone_ext")
|
||||
service_branch = inherit_user_field("service_branch")
|
||||
citizenship = inherit_user_field("citizenship")
|
||||
designation = inherit_user_field("designation")
|
||||
|
@ -167,6 +167,7 @@ class InformationAboutYouForm(ValidatedForm):
|
||||
lname_request = inherit_field(USER_FIELDS["last_name"])
|
||||
email_request = inherit_field(USER_FIELDS["email"])
|
||||
phone_number = inherit_field(USER_FIELDS["phone_number"])
|
||||
phone_ext = inherit_field(USER_FIELDS["phone_ext"], required=False)
|
||||
service_branch = inherit_field(USER_FIELDS["service_branch"])
|
||||
citizenship = inherit_field(USER_FIELDS["citizenship"])
|
||||
designation = inherit_field(USER_FIELDS["designation"])
|
||||
|
@ -81,6 +81,7 @@ class Request(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
"citizenship",
|
||||
"designation",
|
||||
"phone_number",
|
||||
"phone_ext",
|
||||
"email_request",
|
||||
"fname_request",
|
||||
"lname_request",
|
||||
|
@ -18,6 +18,7 @@ class RequestReview(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
lname_mao = Column(String)
|
||||
email_mao = Column(String)
|
||||
phone_mao = Column(String)
|
||||
phone_ext_mao = Column(String)
|
||||
fname_ccpo = Column(String)
|
||||
lname_ccpo = Column(String)
|
||||
|
||||
|
@ -57,6 +57,7 @@ class RequestRevision(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
citizenship = Column(String)
|
||||
designation = Column(String)
|
||||
phone_number = Column(String)
|
||||
phone_ext = Column(String)
|
||||
email_request = Column(String)
|
||||
fname_request = Column(String)
|
||||
lname_request = Column(String)
|
||||
|
@ -21,6 +21,7 @@ class User(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
first_name = Column(String)
|
||||
last_name = Column(String)
|
||||
phone_number = Column(String)
|
||||
phone_ext = Column(String)
|
||||
service_branch = Column(String)
|
||||
citizenship = Column(String)
|
||||
designation = Column(String)
|
||||
|
@ -64,6 +64,7 @@ class JEDIRequestFlow(object):
|
||||
"lname_request": user.last_name,
|
||||
"email_request": user.email,
|
||||
"phone_number": user.phone_number,
|
||||
"phone_ext": user.phone_ext,
|
||||
"service_branch": user.service_branch,
|
||||
"designation": user.designation,
|
||||
"citizenship": user.citizenship,
|
||||
|
@ -42,6 +42,10 @@
|
||||
flex-basis: 66.66%;
|
||||
}
|
||||
|
||||
&.form-col--sixth {
|
||||
flex-basis: 16.66%;
|
||||
}
|
||||
|
||||
.usa-input {
|
||||
margin-left: ($gap * 4);
|
||||
margin-right: ($gap * 4);
|
||||
|
@ -21,9 +21,12 @@
|
||||
{{ TextInput(form.email, validation='email') }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
<div class='form-col form-col--third'>
|
||||
{{ TextInput(form.phone_number, validation='usPhone') }}
|
||||
</div>
|
||||
<div class='form-col form-col--sixth'>
|
||||
{{ TextInput(form.phone_ext)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ OptionsInput(form.service_branch) }}
|
||||
|
@ -102,7 +102,20 @@
|
||||
|
||||
{{ DefinitionReviewField("Email Address", "information_about_you", "email_request") }}
|
||||
|
||||
{{ DefinitionReviewField("Phone Number", "information_about_you", "phone_number", filter="usPhone") }}
|
||||
<div>
|
||||
<dt>Phone Number</dt>
|
||||
<dd>
|
||||
{% if data.information_about_you.phone_number is not none %}
|
||||
{{ data.information_about_you.phone_number }}
|
||||
{% else %}
|
||||
{{ RequiredLabel() }}
|
||||
{% endif %}
|
||||
|
||||
{% if data.information_about_you.phone_ext %}
|
||||
ext. {{ data.information_about_you.phone_ext }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{{ DefinitionReviewField("Service Branch or Agency", "information_about_you", "service_branch", filter="getOptionLabel", filter_args=[service_branches]) }}
|
||||
|
||||
|
@ -112,7 +112,12 @@
|
||||
<h3 class='approval-log__log-item__header'>Mission Owner approval on behalf of:</h3>
|
||||
<span>{{ review.full_name_mao }}</span>
|
||||
<span>{{ review.email_mao }}</span>
|
||||
<span>{{ review.phone_mao }}</span>
|
||||
<span>
|
||||
{{ review.phone_mao }}
|
||||
{% if review.phone_ext_mao %}
|
||||
ext. {{ review.phone_ext_mao }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -202,9 +207,13 @@
|
||||
{{ TextInput(review_form.email_mao, placeholder="name@mail.mil", validation='email') }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
<div class='form-col form-col--third'>
|
||||
{{ TextInput(review_form.phone_mao, placeholder="(123) 456-7890", validation='usPhone') }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--sixth'>
|
||||
{{ TextInput(review_form.phone_ext_mao)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
@ -27,7 +27,12 @@
|
||||
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--half'>{{ TextInput(f.email_request, placeholder='e.g. jane@mail.mil', validation='email') }}</div>
|
||||
<div class='form-col form-col--half'>{{ TextInput(f.phone_number, placeholder='e.g. (123) 456-7890', validation='usPhone') }}</div>
|
||||
<div class='form-col form-col--third'>
|
||||
{{ TextInput(f.phone_number, placeholder='e.g. (123) 456-7890', validation='usPhone') }}
|
||||
</div>
|
||||
<div class='form-col form-col--sixth'>
|
||||
{{ TextInput(f.phone_ext)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>We want to collect the following information from you for security auditing and determining priviledged user access.</p>
|
||||
|
@ -163,6 +163,7 @@ class RequestFactory(Base):
|
||||
citizenship="United States",
|
||||
designation="military",
|
||||
phone_number="1234567890",
|
||||
phone_ext="123",
|
||||
email_request=user.email,
|
||||
fname_request=user.first_name,
|
||||
lname_request=user.last_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user