atst/atst/forms/org.py
luisgov 9d781577c4 Update request form (#45)
* Implement OrganizationInfo form, add it to the template

* Format request_new

* Update "Details of Use" section

* Refactor request_new

* Added some new fields, but form is still WIP

* Add details of use fields

* Add org info fields

* Add some comments

* Add Financial Verification and more Details of Use fields

* Update some textarea fields to single text field

* WIP

* Implement OrganizationInfo form, add it to the template

* Format request_new

* Update "Details of Use" section

* Refactor request_new

* Added some new fields, but form is still WIP

* Add details of use fields

* Add org info fields

* Add some comments

* Add Financial Verification and more Details of Use fields

* Update some textarea fields to single text field

* Format

* Update fields with the correct fieldtypes

* Begin updating sidenav changes

* Split form into each section

* adjust and skip some outdated form validation tests

* break request form into multiple form objects

* need to send user ID to requests-queue

* use DateForm for start date in request

* alter request_new handler to pass raw form data to template

* change review form

* Add KO and COR section titles

* Update date input class name

* Add a special case for the summary form. We should refactor this

* Add read-only fields for review and submit section

* Add minimum number validators to request form

* Fix formatting

* Use html5 datepicker for dates

* Fix request form validators

* Finish org info form

* Finish POC form

* Finish financial verification form

* Move PE and UII to financial form

* Un-skip form validation test
2018-07-03 10:10:44 -04:00

35 lines
1.1 KiB
Python

from wtforms.fields.html5 import EmailField, TelField
from wtforms.fields import RadioField, StringField
from wtforms.validators import Required, Length, Email
from wtforms_tornado import Form
from .fields import DateField
class OrgForm(Form):
fname_request = StringField("First Name", validators=[Required()])
lname_request = StringField("Last Name", validators=[Required()])
email_request = EmailField(
"Email (associated with your CAC)", validators=[Required(), Email()]
)
phone_number = TelField("Phone Number", validators=[Required(), Length(min=7)])
service_branch = StringField("Service Branch or Agency", validators=[Required()])
citizenship = RadioField(
choices=[
("United States", "United States"),
("Foreign National", "Foreign National"),
("Other", "Other"),
],
validators=[Required()],
)
designation = StringField("Designation of Person", validators=[Required()])
date_latest_training = DateField(
"Latest Information Assurance (IA) Training completion date.",
validators=[Required()],
)