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
This commit is contained in:
luisgov
2018-07-03 10:10:44 -04:00
committed by richard-dds
parent 863d323319
commit 9d781577c4
22 changed files with 890 additions and 505 deletions

View File

@@ -5,112 +5,141 @@
{% autoescape None %}
{% if f.errors %}
<b>There were some errors, see below.</b>
<b class="usa-input-error-message">There were some errors, see below.</b>
{% end %}
<h3 id="application-details">Application Details</h3>
<!-- DETAILS OF USE -->
<button class="usa-button-secondary usa-button-active">New Application</button>
<button class="usa-button-secondary" disabled>Existing Application</button>
<button class="usa-button-secondary" disabled>Sandbox Application</button>
<h3 id="overall-request-details">Overall Request Details</h3>
<p>Please help us understand the size and scope of your resource request.</p>
{{ f.dollar_value.label }}
{{ f.dollar_value(placeholder="Total dollar amount to be associated with the Task Order")}}
{% for e in f.dollar_value.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.num_applications.label }}
{{ f.num_applications(placeholder="Estimated number of applications") }}
{% for e in f.num_applications.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.date_start.label }}
{{ f.date_start }}
{% for e in f.date_start.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.supported_organizations.label }}
{{ f.supported_organizations(placeholder="Add tags associated with DoD components or other entities") }}
{% for e in f.supported_organizations.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.app_description.label }}
{{ f.app_description(placeholder="Example: My organization is supporting the migration of XYZ system to the cloud due to XX policy memo. I am planning to use a sandbox environment to do testing.") }}
{% for e in f.app_description.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
<h3 id="cloud-resources">Cloud Resources</h3>
<p>Please tell us about your expected cloud resource usage as best as you can. Please refer to the <a href="">Cloud Service Provider</a> as necessary.</p>
{{ f.total_cores.label }}
{{ f.total_cores(placeholder="Expected total cores", min="1", max="32") }}
{% for e in f.total_cores.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.total_ram.label }}
{{ f.total_ram(placeholder="Expected amount of RAM", min="1", max="32") }}
{% for e in f.total_ram.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.total_object_storage.label }}
{{ f.total_object_storage(placeholder="Expected total object storage") }}
{% for e in f.total_object_storage.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.total_database_storage.label }}
{{ f.total_database_storage(placeholder="Expected total database storage") }}
{% for e in f.total_database_storage.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.total_server_storage.label }}
{{ f.total_server_storage(placeholder="Expected total server storage") }}
{% for e in f.total_server_storage.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
{{ f.application_name.label }}
{{ f.application_name(placeholder="What is the application name?") }}
{{ f.application_description.label }}
{{ f.application_description(placeholder="Describe the application") }}
{{ f.dollar_value.label }}
{{ f.dollar_value(placeholder="$") }}
{{ f.input_estimate.label }}
{{ f.input_estimate }}
<b>NEW</b>
<hr>
<fieldset>
<label for="input-start-date">Expected start date</label>
<div class="usa-date-of-birth">
<div class="usa-form-group usa-form-group-month">
{{ f.date_start.month.label }}
{{ f.date_start.month(min="1", max="12") }}
</div>
<div class="usa-form-group usa-form-group-day">
{{ f.date_start.day.label }}
{{ f.date_start.day(min="1", max="31") }}
</div>
<div class="usa-form-group usa-form-group-year">
{{ f.date_start.year.label }}
{{ f.date_start.year(min="2000", max="2040") }}
</div>
</div>
</fieldset>
{{ f.period_of_performance.label }}
{{ f.period_of_performance }}
<br>
<fieldset class="usa-fieldset-inputs usa-sans">
{{ f.classification_level.label }}
{{ f.classification_level(class_="usa-unstyled-list") }}
</fieldset>
{{ f.primary_service_branch.label }}
{{ f.primary_service_branch(placeholder="Add tags associated with service branches") }}
<br>
<fieldset class="usa-fieldset-inputs usa-sans">
{{ f.cloud_model.label }}
{{ f.cloud_model(class_="usa-unstyled-list") }}
</fieldset>
<h3 id="support-staff">Support Staff</h3>
<p>We want to learn more about the people helping you with the cloud.</p>
<!-- Computation -->
<h4 id="application-details">Computation</h4>
<p>These headings introduce, respectively, sections and subsections within your body copy. As you create these headings, follow the same guidelines that you use when writing section headings: Be succinct, descriptive, and precise.</p>
{{ f.number_of_cores.label }}
{{ f.number_of_cores(placeholder="Total cores", min="1", max="32") }}
<!-- example field with custom validation -->
{{ f.total_ram.label }}
{{ f.total_ram(placeholder="Total RAM", min="1", max="32") }}
<!-- example validation errors -->
{% for e in f.total_ram.errors %}
<fieldset class="usa-fieldset-inputs">
{{ f.has_contractor_advisor.label }}
{{ f.has_contractor_advisor(class_="usa-unstyled-list") }}
{% for e in f.has_contractor_advisor.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
</fieldset>
<fieldset class="usa-fieldset-inputs">
{{ f.is_migrating_application.label }}
{{ f.is_migrating_application(class_="usa-unstyled-list") }}
{% for e in f.is_migrating_application.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
</fieldset>
<!-- Storage -->
<h4 id="application-storage">Storage</h4>
<p>The particulars of your body copy will be determined by the topic of your page. Regardless of topic, its a good practice to follow the inverted pyramid structure when writing copy: Begin with the information thats most important to your users and then present information of less importance.</p>
<fieldset class="usa-fieldset-inputs">
{{ f.has_migration_office.label }}
{{ f.has_migration_office(class_="usa-unstyled-list") }}
{% for e in f.has_migration_office.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
</fieldset>
{{ f.object_storage.label }}
{{ f.object_storage(placeholder="Total object storage") }}
<fieldset class="usa-fieldset-inputs">
{{ f.supporting_organization.label }}
{{ f.supporting_organization(placeholder="Example: AF CCE/HNI, Navy SPAWAR, MITRE", class_="usa-unstyled-list") }}
{% for e in f.supporting_organization.errors %}
<div class="usa-input-error-message">
{{ e }}
</div>
{% end %}
</fieldset>
{{ f.server_storage.label }}
{{ f.server_storage(placeholder="Total server storage") }}
<!-- Application Usage -->
<h4 id="application-usage">Estimated Application Storage</h4>
<p>The particulars of your body copy will be determined by the topic of your page. Regardless of topic, its a good practice to follow the inverted pyramid structure when writing copy: Begin with the information thats most important to your users and then present information of less importance.</p>
{{ f.total_active_users.label }}
{{ f.total_active_users(placeholder="Total active users") }}
{{ f.total_peak_users.label }}
{{ f.total_peak_users(placeholder="Total peak users") }}
{{ f.total_requests.label }}
{{ f.total_requests(placeholder="Total requests") }}
{{ f.total_environments.label }}
{{ f.total_environments(placeholder="Total number of environments") }}
{% end %}