First page of request form rendering, but flow is still WIP
This commit is contained in:
@@ -90,3 +90,56 @@
|
||||
</div>
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro TextInput(field, placeholder='') -%}
|
||||
<div class='usa-input {% if errors %}usa-input--error{% endif %}'>
|
||||
<label for={{field.name}}>
|
||||
{{ field.label }}
|
||||
|
||||
{% if field.description %}
|
||||
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if errors %}
|
||||
{{ Icon('alert') }}
|
||||
{% endif %}
|
||||
</label>
|
||||
|
||||
{{ field(placeholder=placeholder) | safe }}
|
||||
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<span class='usa-input__message'>{{ error }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro OptionsInput(field, inline=False) -%}
|
||||
<div class='usa-input {% if errors %}usa-input--error{% endif %}'>
|
||||
|
||||
<fieldset class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
||||
<legend>
|
||||
{{ field.label }}
|
||||
|
||||
{% if field.description %}
|
||||
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
{{ Icon('alert') }}
|
||||
{% endif %}
|
||||
</legend>
|
||||
|
||||
{{ field() }}
|
||||
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<span class='usa-input__message'>{{ error }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
{%- endmacro %}
|
||||
|
13
templates/requests/menu.html
Normal file
13
templates/requests/menu.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="progress-menu progress-menu--four">
|
||||
<ul>
|
||||
{% for s in screens %}
|
||||
<li class="progress-menu__item">
|
||||
<a href="{{ url_for('requests.requests_form_update', screen=loop.index+1, request_id=request_id) if request_id else url_for('requests.requests_form_new', screen=loop.index+1) }}"
|
||||
{% if g.matchesPath('/requests/new/{{ loop.index + 1 }}') %}class="active"{% endif %}
|
||||
>
|
||||
{{ s['title'] }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
@@ -1,13 +0,0 @@
|
||||
<div class="progress-menu progress-menu--four">
|
||||
<ul>
|
||||
{% for i,s in enumerate(screens) %}
|
||||
<li class="progress-menu__item">
|
||||
<a href="{{ reverse_url('request_form_update', i+1, request_id) if request_id else reverse_url('request_form_new',i+1) }}"
|
||||
{% if matchesPath('/requests/new/'+str(i+1)) %}class="active"{% end %}
|
||||
>
|
||||
{{ s['title'] }}
|
||||
</a>
|
||||
</li>
|
||||
{% end %}
|
||||
</ul>
|
||||
</div>
|
12
templates/requests/screen-0.html
Normal file
12
templates/requests/screen-0.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends '../requests_new.html.to' %}
|
||||
|
||||
{% block form %}
|
||||
<h2>New JEDI Request</h2>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus error omnis a, tenetur similique quo officiis voluptates eum recusandae dolorem minus dignissimos, magni consequatur, maxime debitis reprehenderit sint non iusto?</p>
|
||||
|
||||
<a class='usa-button usa-button-secondary' href='{{ url_for('requests.request_form_new',next_screen) }}'>New Application</a>
|
||||
<a class='usa-button usa-button-secondary' href='{{ url_for('requests.request_form_new',next_screen) }}'>Existing Application</a>
|
||||
<a class='usa-button usa-button-secondary' href='{{ url_for('requests.request_form_new',next_screen) }}'>Sandbox Environment</a>
|
||||
|
||||
{% endblock %}
|
@@ -1,12 +0,0 @@
|
||||
{% extends '../requests_new.html.to' %}
|
||||
|
||||
{% block form %}
|
||||
<h2>New JEDI Request</h2>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus error omnis a, tenetur similique quo officiis voluptates eum recusandae dolorem minus dignissimos, magni consequatur, maxime debitis reprehenderit sint non iusto?</p>
|
||||
|
||||
<a class='usa-button usa-button-secondary' href='{{ reverse_url('request_form_new',next_screen) }}'>New Application</a>
|
||||
<a class='usa-button usa-button-secondary' href='{{ reverse_url('request_form_new',next_screen) }}'>Existing Application</a>
|
||||
<a class='usa-button usa-button-secondary' href='{{ reverse_url('request_form_new',next_screen) }}'>Sandbox Environment</a>
|
||||
|
||||
{% end %}
|
46
templates/requests/screen-1.html
Normal file
46
templates/requests/screen-1.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{% extends 'requests_new.html' %}
|
||||
|
||||
{% from "components.html" import Alert, TextInput, OptionsInput %}
|
||||
|
||||
{% block subtitle %}
|
||||
<h2>Details of Use</h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
{% if f.errors %}
|
||||
{{ Alert('There were some errors',
|
||||
message="<p>Please see below.</p>",
|
||||
level='error'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<p>We’d like to know a little about how you plan to use JEDI Cloud services to process your request. Please answer the following questions to the best of your ability. Note that the CCPO does not directly help with migrating systems to JEDI Cloud. These questions are for learning about your cloud readiness and financial usage of the JEDI Cloud; your estimates will not be used for any department level reporting.</p>
|
||||
<p><em>All fields are required, unless specified optional.</em></p>
|
||||
|
||||
<h2>General</h2>
|
||||
{{ TextInput(f.dod_component) }}
|
||||
{{ TextInput(f.jedi_usage,placeholder="e.g. We are migrating XYZ application to the cloud so that...") }}
|
||||
|
||||
<h2>Cloud Readiness</h2>
|
||||
{{ TextInput(f.num_software_systems,placeholder="Number of systems") }}
|
||||
{{ OptionsInput(f.jedi_migration) }}
|
||||
{{ OptionsInput(f.rationalization_software_systems) }}
|
||||
{{ OptionsInput(f.technical_support_team) }}
|
||||
{{ OptionsInput(f.organization_providing_assistance) }}
|
||||
{{ OptionsInput(f.engineering_assessment) }}
|
||||
{{ TextInput(f.data_transfers) }}
|
||||
{{ TextInput(f.expected_completion_date) }}
|
||||
{{ OptionsInput(f.cloud_native) }}
|
||||
|
||||
<h2>Financial Usage</h2>
|
||||
{{ TextInput(f.estimated_monthly_spend) }}
|
||||
<p>So this means you are spending approximately <b>$X</b> annually</p>
|
||||
{{ TextInput(f.dollar_value) }}
|
||||
{{ TextInput(f.number_user_sessions) }}
|
||||
{{ TextInput(f.average_daily_traffic) }}
|
||||
{{ TextInput(f.start_date) }}
|
||||
|
||||
|
||||
{% endblock %}
|
@@ -1,45 +0,0 @@
|
||||
{% extends '../requests_new.html.to' %}
|
||||
|
||||
{% block subtitle %}
|
||||
<h2>Details of Use</h2>
|
||||
{% end %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
{% autoescape None %}
|
||||
{% if f.errors %}
|
||||
{% module Alert('There were some errors',
|
||||
message="<p>Please see below.</p>",
|
||||
level='error'
|
||||
) %}
|
||||
{% end %}
|
||||
|
||||
|
||||
<p>We’d like to know a little about how you plan to use JEDI Cloud services to process your request. Please answer the following questions to the best of your ability. Note that the CCPO does not directly help with migrating systems to JEDI Cloud. These questions are for learning about your cloud readiness and financial usage of the JEDI Cloud; your estimates will not be used for any department level reporting.</p>
|
||||
<p><em>All fields are required, unless specified optional.</em></p>
|
||||
|
||||
<h2>General</h2>
|
||||
{% module TextInput(f.dod_component) %}
|
||||
{% module TextInput(f.jedi_usage,placeholder="e.g. We are migrating XYZ application to the cloud so that...") %}
|
||||
|
||||
<h2>Cloud Readiness</h2>
|
||||
{% module TextInput(f.num_software_systems,placeholder="Number of systems") %}
|
||||
{% module OptionsInput(f.jedi_migration) %}
|
||||
{% module OptionsInput(f.rationalization_software_systems) %}
|
||||
{% module OptionsInput(f.technical_support_team) %}
|
||||
{% module OptionsInput(f.organization_providing_assistance) %}
|
||||
{% module OptionsInput(f.engineering_assessment) %}
|
||||
{% module TextInput(f.data_transfers) %}
|
||||
{% module TextInput(f.expected_completion_date) %}
|
||||
{% module OptionsInput(f.cloud_native) %}
|
||||
|
||||
<h2>Financial Usage</h2>
|
||||
{% module TextInput(f.estimated_monthly_spend) %}
|
||||
<p>So this means you are spending approximately <b>$X</b> annually</p>
|
||||
{% module TextInput(f.dollar_value) %}
|
||||
{% module TextInput(f.number_user_sessions) %}
|
||||
{% module TextInput(f.average_daily_traffic) %}
|
||||
{% module TextInput(f.start_date) %}
|
||||
|
||||
|
||||
{% end %}
|
32
templates/requests/screen-2.html
Normal file
32
templates/requests/screen-2.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends 'requests_new.html' %}
|
||||
|
||||
{% from "components.html" import Alert, TextInput, OptionsInput %}
|
||||
|
||||
{% block subtitle %}
|
||||
<h2>Information About You</h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
{% if f.errors %}
|
||||
{{ Alert('There were some errors',
|
||||
message="<p>Please see below.</p>",
|
||||
level='error'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
<p>Please tell us more about you.</p>
|
||||
|
||||
{{ TextInput(f.fname_request,placeholder='First Name') }}
|
||||
{{ TextInput(f.lname_request,placeholder='Last Name') }}
|
||||
{{ TextInput(f.email_request,placeholder='jane@mail.mil') }}
|
||||
{{ TextInput(f.phone_number,placeholder='(123) 456-7890') }}
|
||||
|
||||
<p>We want to collect the following information from you for security auditing and determining priviledged user access</p>
|
||||
|
||||
{{ TextInput(f.service_branch,placeholder='e.g. US Air Force, US Army, US Navy, Marine Corps, Defense Media Agency') }}
|
||||
{{ OptionsInput(f.citizenship) }}
|
||||
{{ OptionsInput(f.designation) }}
|
||||
{{ TextInput(f.date_latest_training) }}
|
||||
|
||||
{% endblock %}
|
@@ -1,31 +0,0 @@
|
||||
{% extends '../requests_new.html.to' %}
|
||||
|
||||
{% block subtitle %}
|
||||
<h2>Information About You</h2>
|
||||
{% end %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
{% autoescape None %}
|
||||
{% if f.errors %}
|
||||
{% module Alert('There were some errors',
|
||||
message="<p>Please see below.</p>",
|
||||
level='error'
|
||||
) %}
|
||||
{% end %}
|
||||
|
||||
<p>Please tell us more about you.</p>
|
||||
|
||||
{% module TextInput(f.fname_request,placeholder='First Name') %}
|
||||
{% module TextInput(f.lname_request,placeholder='Last Name') %}
|
||||
{% module TextInput(f.email_request,placeholder='jane@mail.mil') %}
|
||||
{% module TextInput(f.phone_number,placeholder='(123) 456-7890') %}
|
||||
|
||||
<p>We want to collect the following information from you for security auditing and determining priviledged user access</p>
|
||||
|
||||
{% module TextInput(f.service_branch,placeholder='e.g. US Air Force, US Army, US Navy, Marine Corps, Defense Media Agency') %}
|
||||
{% module OptionsInput(f.citizenship) %}
|
||||
{% module OptionsInput(f.designation) %}
|
||||
{% module TextInput(f.date_latest_training) %}
|
||||
|
||||
{% end %}
|
45
templates/requests_new.html
Normal file
45
templates/requests_new.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col">
|
||||
|
||||
{% include 'requests/menu.html' %}
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel__heading">
|
||||
<h1>New Request</h1>
|
||||
<div class="subtitle">{% block subtitle %}{% endblock %}</div>
|
||||
</div>
|
||||
|
||||
<div class="panel__content">
|
||||
{% block form_action %}
|
||||
{% if request_id %}
|
||||
<form method='POST' action="{{ url_for('requests.requests_form_update', screen=current, request_id=request_id) }}" autocomplete="off">
|
||||
{% else %}
|
||||
<form method='POST' action="{{ url_for('requests.requests_form_update', screen=current) }}" autocomplete="off">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{{ f.csrf_token }}
|
||||
{% block form %}
|
||||
form goes here
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% block next %}
|
||||
|
||||
<div class='action-group'>
|
||||
<input type='submit' class='usa-button usa-button-primary' value='Save & Continue' />
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -1,46 +0,0 @@
|
||||
{% extends "base.html.to" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col">
|
||||
|
||||
{% include 'requests/menu.html.to' %}
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel__heading">
|
||||
<h1>New Request</h1>
|
||||
<div class="subtitle">{% block subtitle %}{% end %}</div>
|
||||
</div>
|
||||
|
||||
<div class="panel__content">
|
||||
{% block form_action %}
|
||||
{% if request_id %}
|
||||
<form method='POST' action="{{ reverse_url('request_form_update', current, request_id) }}" autocomplete="off">
|
||||
{% else %}
|
||||
<form method='POST' action="{{ reverse_url('request_form_new', current) }}" autocomplete="off">
|
||||
{% end %}
|
||||
{% end %}
|
||||
|
||||
{{ form.csrf_token }}
|
||||
{% block form %}
|
||||
form goes here
|
||||
{% end %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% block next %}
|
||||
|
||||
<div class='action-group'>
|
||||
<input type='submit' class='usa-button usa-button-primary' value='Save & Continue' />
|
||||
</div>
|
||||
|
||||
{% end %}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% end %}
|
||||
|
Reference in New Issue
Block a user