commit
9869fd3e5d
@ -1,30 +1,21 @@
|
|||||||
|
import ExpandSidenavMixin from '../mixins/expand_sidenav'
|
||||||
import ToggleMixin from '../mixins/toggle'
|
import ToggleMixin from '../mixins/toggle'
|
||||||
|
|
||||||
const cookieName = 'expandSidenav'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'sidenav-toggler',
|
name: 'sidenav-toggler',
|
||||||
|
|
||||||
mixins: [ToggleMixin],
|
mixins: [ExpandSidenavMixin, ToggleMixin],
|
||||||
|
|
||||||
props: {
|
mounted: function() {
|
||||||
defaultVisible: {
|
this.$parent.$emit('sidenavToggle', this.isVisible)
|
||||||
type: Boolean,
|
|
||||||
default: function() {
|
|
||||||
if (document.cookie.match(cookieName)) {
|
|
||||||
return !!document.cookie.match(cookieName + ' *= *true')
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toggle: function(e) {
|
toggle: function(e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.isVisible = !this.isVisible
|
this.isVisible = !this.isVisible
|
||||||
document.cookie = cookieName + '=' + this.isVisible + '; path=/'
|
document.cookie = this.cookieName + '=' + this.isVisible + '; path=/'
|
||||||
|
this.$parent.$emit('sidenavToggle', this.isVisible)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
12
js/index.js
12
js/index.js
@ -32,12 +32,14 @@ import ToForm from './components/forms/to_form'
|
|||||||
import ClinFields from './components/clin_fields'
|
import ClinFields from './components/clin_fields'
|
||||||
import PopDateRange from './components/pop_date_range'
|
import PopDateRange from './components/pop_date_range'
|
||||||
import ToggleMenu from './components/toggle_menu'
|
import ToggleMenu from './components/toggle_menu'
|
||||||
|
import ExpandSidenav from './mixins/expand_sidenav'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
Vue.use(VTooltip)
|
Vue.use(VTooltip)
|
||||||
|
|
||||||
Vue.mixin(Modal)
|
Vue.mixin(Modal)
|
||||||
|
Vue.mixin(ExpandSidenav)
|
||||||
|
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
el: '#app-root',
|
el: '#app-root',
|
||||||
@ -67,6 +69,12 @@ const app = new Vue({
|
|||||||
ToggleMenu,
|
ToggleMenu,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
sidenavExpanded: this.defaultVisible,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.$on('modalOpen', data => {
|
this.$on('modalOpen', data => {
|
||||||
if (data['isOpen']) {
|
if (data['isOpen']) {
|
||||||
@ -105,6 +113,10 @@ const app = new Vue({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.$on('sidenavToggle', data => {
|
||||||
|
this.sidenavExpanded = data
|
||||||
|
})
|
||||||
},
|
},
|
||||||
delimiters: ['!{', '}'],
|
delimiters: ['!{', '}'],
|
||||||
|
|
||||||
|
15
js/mixins/expand_sidenav.js
Normal file
15
js/mixins/expand_sidenav.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
cookieName: 'expandSidenav',
|
||||||
|
defaultVisible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: function() {
|
||||||
|
if (document.cookie.match(this.cookieName)) {
|
||||||
|
return !!document.cookie.match(this.cookieName + ' *= *true')
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -47,3 +47,4 @@
|
|||||||
@import "sections/application_edit";
|
@import "sections/application_edit";
|
||||||
@import "sections/reports";
|
@import "sections/reports";
|
||||||
@import "sections/task_order";
|
@import "sections/task_order";
|
||||||
|
@import "sections/ccpo";
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
.usa-alert {
|
.usa-alert {
|
||||||
padding-bottom: 2.4rem;
|
padding-bottom: 2.4rem;
|
||||||
|
max-width: $max-panel-width;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin alert {
|
@mixin alert {
|
||||||
@ -97,38 +98,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert {
|
|
||||||
@include alert;
|
|
||||||
@include alert-level("info");
|
|
||||||
|
|
||||||
&.alert--success {
|
|
||||||
@include alert-level("success");
|
|
||||||
|
|
||||||
.alert__actions {
|
|
||||||
.icon-link {
|
|
||||||
@include icon-link-color($color-green, $color-white);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.alert--warning {
|
|
||||||
@include alert-level("warning");
|
|
||||||
|
|
||||||
.alert__actions {
|
|
||||||
.icon-link {
|
|
||||||
@include icon-link-color($color-gold-dark, $color-white);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.alert--error {
|
|
||||||
@include alert-level("error");
|
|
||||||
|
|
||||||
.alert__actions {
|
|
||||||
.icon-link {
|
|
||||||
@include icon-link-color($color-red, $color-white);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
.error-page {
|
.error-page {
|
||||||
|
max-width: $max-page-width;
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: unset;
|
||||||
|
border: none;
|
||||||
max-width: 475px;
|
max-width: 475px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
.panel {
|
|
||||||
&__heading {
|
&__heading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: $gap 0;
|
padding: $gap 0;
|
||||||
@ -15,17 +20,6 @@
|
|||||||
margin-bottom: $gap;
|
margin-bottom: $gap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__body {
|
|
||||||
padding: $gap * 2;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
hr {
|
|
||||||
width: 80%;
|
|
||||||
margin: auto;
|
|
||||||
margin-bottom: $gap * 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
max-width: 1190px;
|
max-width: $max-page-width;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
|
@ -19,6 +19,7 @@ $sidenav-collapsed-width: 10rem;
|
|||||||
$max-panel-width: 90rem;
|
$max-panel-width: 90rem;
|
||||||
$home-pg-icon-width: 6rem;
|
$home-pg-icon-width: 6rem;
|
||||||
$large-spacing: 4rem;
|
$large-spacing: 4rem;
|
||||||
|
$max-page-width: $max-panel-width + $sidenav-expanded-width + $large-spacing;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* USWDS Variables
|
* USWDS Variables
|
||||||
|
@ -32,22 +32,35 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.action-group-footer {
|
.action-group-footer {
|
||||||
|
padding-top: $gap;
|
||||||
|
padding-bottom: $gap;
|
||||||
|
padding-right: $gap * 4;
|
||||||
|
position: fixed;
|
||||||
|
bottom: $footer-height;
|
||||||
|
left: 0;
|
||||||
|
background: white;
|
||||||
|
border-top: 1px solid $color-gray-lighter;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&.action-group-footer--expand-offset {
|
||||||
|
padding-left: $sidenav-expanded-width;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.action-group-footer--collapse-offset {
|
||||||
|
padding-left: $sidenav-collapsed-width;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-group-footer--container {
|
||||||
@extend .action-group;
|
@extend .action-group;
|
||||||
|
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: $large-spacing;
|
||||||
|
max-width: $max-panel-width;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
margin-top: 0;
|
}
|
||||||
margin-bottom: 0;
|
|
||||||
padding-top: $gap;
|
|
||||||
padding-bottom: $gap;
|
|
||||||
|
|
||||||
position: fixed;
|
|
||||||
bottom: $footer-height;
|
|
||||||
background: white;
|
|
||||||
right: 0;
|
|
||||||
padding-right: $gap * 4;
|
|
||||||
border-top: 1px solid $color-gray-lighter;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
3
styles/sections/_ccpo.scss
Normal file
3
styles/sections/_ccpo.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.ccpo-panel-container {
|
||||||
|
max-width: $max-panel-width;
|
||||||
|
}
|
@ -39,14 +39,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<span class="action-group-footer">
|
<div
|
||||||
|
class="action-group-footer"
|
||||||
|
v-bind:class="{'action-group-footer--expand-offset': this.$root.sidenavExpanded, 'action-group-footer--collapse-offset': !this.$root.sidenavExpanded}">
|
||||||
|
<div class="action-group-footer--container">
|
||||||
{% block next_button %}
|
{% block next_button %}
|
||||||
{{ SaveButton(text=('portfolios.applications.new.step_1_button_text' | translate)) }}
|
{{ SaveButton(text=('portfolios.applications.new.step_1_button_text' | translate)) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</base-form>
|
</base-form>
|
||||||
|
|
||||||
|
@ -61,7 +61,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="action-group-footer">
|
<div
|
||||||
|
class="action-group-footer"
|
||||||
|
v-bind:class="{'action-group-footer--expand-offset': this.$root.sidenavExpanded, 'action-group-footer--collapse-offset': !this.$root.sidenavExpanded}">
|
||||||
|
<div class="action-group-footer--container">
|
||||||
{% block next_button %}
|
{% block next_button %}
|
||||||
{{ SaveButton(text=('portfolios.applications.new.step_2_button_text' | translate)) }}
|
{{ SaveButton(text=('portfolios.applications.new.step_2_button_text' | translate)) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -71,7 +74,8 @@
|
|||||||
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</application-environments>
|
</application-environments>
|
||||||
|
|
||||||
|
@ -25,7 +25,10 @@
|
|||||||
action_update="applications.update_new_application_step_3") }}
|
action_update="applications.update_new_application_step_3") }}
|
||||||
|
|
||||||
|
|
||||||
<span class="action-group-footer">
|
<div
|
||||||
|
class="action-group-footer"
|
||||||
|
v-bind:class="{'action-group-footer--expand-offset': this.$root.sidenavExpanded, 'action-group-footer--collapse-offset': !this.$root.sidenavExpanded}">
|
||||||
|
<div class="action-group-footer--container">
|
||||||
<a class="usa-button" href="{{ url_for('applications.settings', application_id=application_id) }}">
|
<a class="usa-button" href="{{ url_for('applications.settings', application_id=application_id) }}">
|
||||||
{{ "portfolios.applications.new.step_3_button_text" | translate }}
|
{{ "portfolios.applications.new.step_3_button_text" | translate }}
|
||||||
</a>
|
</a>
|
||||||
@ -35,6 +38,7 @@
|
|||||||
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
||||||
{{ "common.cancel" | translate }}
|
{{ "common.cancel" | translate }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
{% from "components/text_input.html" import TextInput %}
|
{% from "components/text_input.html" import TextInput %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="ccpo-panel-container">
|
||||||
<base-form inline-template>
|
<base-form inline-template>
|
||||||
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.submit_new_user') }}" method="POST">
|
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.submit_new_user') }}" method="POST">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
@ -21,4 +22,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</base-form>
|
</base-form>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
{% from "components/text_input.html" import TextInput %}
|
{% from "components/text_input.html" import TextInput %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="ccpo-panel-container">
|
||||||
{% if new_user %}
|
{% if new_user %}
|
||||||
<h3>{{ 'ccpo.form.confirm_user_title' | translate }}</h3>
|
<h3>{{ 'ccpo.form.confirm_user_title' | translate }}</h3>
|
||||||
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.confirm_new_user') }}" method="POST">
|
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.confirm_new_user') }}" method="POST">
|
||||||
@ -30,4 +31,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
{% from "components/modal.html" import Modal %}
|
{% from "components/modal.html" import Modal %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="ccpo-panel-container">
|
||||||
<div class='col'>
|
<div class='col'>
|
||||||
<div class="h2">
|
<div class="h2">
|
||||||
{{ "ccpo.users_title" | translate }}
|
{{ "ccpo.users_title" | translate }}
|
||||||
@ -80,4 +81,5 @@
|
|||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<main class="usa-section usa-content error-page">
|
<main class="usa-section usa-content error-page">
|
||||||
|
<div class="panel">
|
||||||
<div class="panel__heading">
|
<div class="panel__heading">
|
||||||
{{ Icon('cloud', classes="icon--red icon--large")}}
|
{{ Icon('cloud', classes="icon--red icon--large")}}
|
||||||
<hr>
|
<hr>
|
||||||
@ -17,6 +18,7 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/favicon.ico') }} " />
|
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/favicon.ico') }} " />
|
||||||
</head>
|
</head>
|
||||||
<body class="{% if g.modalOpen %} modalOpen{% endif %}">
|
<body class="{% if g.modalOpen %} modalOpen{% endif %}">
|
||||||
|
<div id='app-root'>
|
||||||
{% block template_vars %}{% endblock %}
|
{% block template_vars %}{% endblock %}
|
||||||
|
|
||||||
{% include 'components/usa_header.html' %}
|
{% include 'components/usa_header.html' %}
|
||||||
@ -34,5 +34,6 @@
|
|||||||
{% assets "js_all" %}
|
{% assets "js_all" %}
|
||||||
<script src="{{ ASSET_URL }}"></script>
|
<script src="{{ ASSET_URL }}"></script>
|
||||||
{% endassets %}
|
{% endassets %}
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<p>{{ "portfolios.header" | translate }}</p>
|
<p>{{ "portfolios.header" | translate }}</p>
|
||||||
<h1>{{ 'portfolios.new.title' | translate }}</h1>
|
<h1>{{ 'portfolios.new.title' | translate }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{ StickyCTA(text="portfolios.new.cta_step_1"|translate, context=("portfolios.new.sticky_header_context"|translate({"step": "1"}) )) }}
|
{{ StickyCTA(text="portfolios.new.cta_step_1"|translate, context=("portfolios.new.sticky_header_context"|translate({"step": "1"}) )) }}
|
||||||
<base-form inline-template>
|
<base-form inline-template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -38,13 +39,18 @@
|
|||||||
{{ "forms.portfolio.defense_component.help_text" | translate | safe }}
|
{{ "forms.portfolio.defense_component.help_text" | translate | safe }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='action-group-footer'>
|
<div
|
||||||
|
class='action-group-footer'
|
||||||
|
v-bind:class="{'action-group-footer--expand-offset': this.$root.sidenavExpanded, 'action-group-footer--collapse-offset': !this.$root.sidenavExpanded}">
|
||||||
|
<div class="action-group-footer--container">
|
||||||
{% block next_button %}
|
{% block next_button %}
|
||||||
{{ SaveButton(text=('portfolios.new.save' | translate), form="portfolio-create", element="input") }}
|
{{ SaveButton(text=('portfolios.new.save' | translate), form="portfolio-create", element="input") }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<a class="usa-button usa-button-secondary" href="{{ url_for('atst.home') }}">
|
<a class="usa-button usa-button-secondary" href="{{ url_for('atst.home') }}">
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</base-form>
|
</base-form>
|
||||||
|
@ -31,7 +31,10 @@
|
|||||||
<div class="task-order">
|
<div class="task-order">
|
||||||
{% block to_builder_form_field %}{% endblock %}
|
{% block to_builder_form_field %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<span class="action-group-footer">
|
<div
|
||||||
|
class="action-group-footer"
|
||||||
|
v-bind:class="{'action-group-footer--expand-offset': this.$root.sidenavExpanded, 'action-group-footer--collapse-offset': !this.$root.sidenavExpanded}">
|
||||||
|
<div class="action-group-footer--container">
|
||||||
{% block next_button %}
|
{% block next_button %}
|
||||||
<input
|
<input
|
||||||
type="submit"
|
type="submit"
|
||||||
@ -58,14 +61,13 @@
|
|||||||
</a>
|
</a>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a
|
<a
|
||||||
v-on:click="openModal('cancel')"
|
v-on:click="openModal('cancel')"
|
||||||
class="action-group__action icon-link">
|
class="action-group__action icon-link">
|
||||||
{{ "common.cancel" | translate }}
|
{{ "common.cancel" | translate }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</to-form>
|
</to-form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user