Set max width on ccpo admin pages
This commit is contained in:
parent
68c7a70082
commit
e7487aa114
@ -47,3 +47,4 @@
|
||||
@import "sections/application_edit";
|
||||
@import "sections/reports";
|
||||
@import "sections/task_order";
|
||||
@import "sections/ccpo";
|
||||
|
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;
|
||||
}
|
@ -4,21 +4,23 @@
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
|
||||
{% block content %}
|
||||
<base-form inline-template>
|
||||
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.submit_new_user') }}" method="POST">
|
||||
{{ form.csrf_token }}
|
||||
<h1>{{ "ccpo.form.add_user_title" | translate }}</h1>
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--two-thirds'>
|
||||
{{ TextInput(form.dod_id, validation='dodId', optional=False) }}
|
||||
</div>
|
||||
<div class="form-col form-col--third">
|
||||
<div class='action-group'>
|
||||
{{ SaveButton(text="common.next"|translate, element="input", additional_classes="action-group__action", form="add-ccpo-user-form") }}
|
||||
<a class='action-group__action icon-link icon-link--default' href="{{ url_for('ccpo.users') }}">{{ "common.cancel" | translate }}</a>
|
||||
<div class="ccpo-panel-container">
|
||||
<base-form inline-template>
|
||||
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.submit_new_user') }}" method="POST">
|
||||
{{ form.csrf_token }}
|
||||
<h1>{{ "ccpo.form.add_user_title" | translate }}</h1>
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--two-thirds'>
|
||||
{{ TextInput(form.dod_id, validation='dodId', optional=False) }}
|
||||
</div>
|
||||
<div class="form-col form-col--third">
|
||||
<div class='action-group'>
|
||||
{{ SaveButton(text="common.next"|translate, element="input", additional_classes="action-group__action", form="add-ccpo-user-form") }}
|
||||
<a class='action-group__action icon-link icon-link--default' href="{{ url_for('ccpo.users') }}">{{ "common.cancel" | translate }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</base-form>
|
||||
</form>
|
||||
</base-form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -3,31 +3,33 @@
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
|
||||
{% block content %}
|
||||
{% if new_user %}
|
||||
<h3>{{ 'ccpo.form.confirm_user_title' | translate }}</h3>
|
||||
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.confirm_new_user') }}" method="POST">
|
||||
{{ form.csrf_token }}
|
||||
<input type="hidden" name="dod_id" value="{{ form.dod_id.data }}">
|
||||
<div>
|
||||
<p>
|
||||
{{ "ccpo.form.confirm_user_text" | translate }}
|
||||
</p>
|
||||
<p>
|
||||
{{ new_user.full_name }}
|
||||
</p>
|
||||
<p>
|
||||
{{ new_user.email }}
|
||||
</p>
|
||||
</div>
|
||||
<div class='action-group'>
|
||||
<input
|
||||
type='submit'
|
||||
class='action-group__action usa-button'
|
||||
value='{{ "ccpo.form.confirm_button" | translate }}'>
|
||||
<a class='action-group__action icon-link icon-link--default' href="{{ url_for('ccpo.users') }}">
|
||||
{{ "common.cancel" | translate }}
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<div class="ccpo-panel-container">
|
||||
{% if new_user %}
|
||||
<h3>{{ 'ccpo.form.confirm_user_title' | translate }}</h3>
|
||||
<form id="add-ccpo-user-form" action="{{ url_for('ccpo.confirm_new_user') }}" method="POST">
|
||||
{{ form.csrf_token }}
|
||||
<input type="hidden" name="dod_id" value="{{ form.dod_id.data }}">
|
||||
<div>
|
||||
<p>
|
||||
{{ "ccpo.form.confirm_user_text" | translate }}
|
||||
</p>
|
||||
<p>
|
||||
{{ new_user.full_name }}
|
||||
</p>
|
||||
<p>
|
||||
{{ new_user.email }}
|
||||
</p>
|
||||
</div>
|
||||
<div class='action-group'>
|
||||
<input
|
||||
type='submit'
|
||||
class='action-group__action usa-button'
|
||||
value='{{ "ccpo.form.confirm_button" | translate }}'>
|
||||
<a class='action-group__action icon-link icon-link--default' href="{{ url_for('ccpo.users') }}">
|
||||
{{ "common.cancel" | translate }}
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -6,78 +6,80 @@
|
||||
{% from "components/modal.html" import Modal %}
|
||||
|
||||
{% block content %}
|
||||
<div class='col'>
|
||||
<div class="h2">
|
||||
{{ "ccpo.users_title" | translate }}
|
||||
</div>
|
||||
<div class="ccpo-panel-container">
|
||||
<div class='col'>
|
||||
<div class="h2">
|
||||
{{ "ccpo.users_title" | translate }}
|
||||
</div>
|
||||
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "common.name" | translate }}</th>
|
||||
<th>{{ "common.email" | translate }}</th>
|
||||
<th>{{ "common.dod_id" | translate }}</th>
|
||||
{% if user_can(permissions.DELETE_CCPO_USER) %}
|
||||
<th></th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user, form in users_info %}
|
||||
{% set modal_id = "disable_ccpo_user_{}".format(user.dod_id) %}
|
||||
{% set disable_button_class = 'button-danger-outline' %}
|
||||
{% if user == g.current_user %}
|
||||
{% set disable_button_class = "usa-button-disabled" %}
|
||||
{% endif %}
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ user.full_name }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
<td>{{ user.dod_id }}</td>
|
||||
<th>{{ "common.name" | translate }}</th>
|
||||
<th>{{ "common.email" | translate }}</th>
|
||||
<th>{{ "common.dod_id" | translate }}</th>
|
||||
{% if user_can(permissions.DELETE_CCPO_USER) %}
|
||||
<td>
|
||||
<a v-on:click="openModal('{{ modal_id }}')" class='usa-button {{ disable_button_class }}'>
|
||||
{{ "common.disable" | translate }}
|
||||
</a>
|
||||
</td>
|
||||
<th></th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user, form in users_info %}
|
||||
{% set modal_id = "disable_ccpo_user_{}".format(user.dod_id) %}
|
||||
{% set disable_button_class = 'button-danger-outline' %}
|
||||
{% if user == g.current_user %}
|
||||
{% set disable_button_class = "usa-button-disabled" %}
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<td>{{ user.full_name }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
<td>{{ user.dod_id }}</td>
|
||||
{% if user_can(permissions.DELETE_CCPO_USER) %}
|
||||
<td>
|
||||
<a v-on:click="openModal('{{ modal_id }}')" class='usa-button {{ disable_button_class }}'>
|
||||
{{ "common.disable" | translate }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if user_can(permissions.CREATE_CCPO_USER) %}
|
||||
<a class="icon-link" href="{{ url_for('ccpo.add_new_user')}}">
|
||||
{{ "ccpo.add_user" | translate }} {{ Icon("plus") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if user_can(permissions.DELETE_CCPO_USER) %}
|
||||
{% for user, form in users_info %}
|
||||
{% set modal_id = "disable_ccpo_user_{}".format(user.dod_id) %}
|
||||
{% call Modal(name=modal_id) %}
|
||||
<h1>Disable CCPO User</h1>
|
||||
<hr>
|
||||
{{
|
||||
Alert(
|
||||
title=("components.modal.destructive_title" | translate),
|
||||
message=("ccpo.disable_user.alert_message" | translate({"user_name": user.full_name})),
|
||||
level="warning"
|
||||
)
|
||||
}}
|
||||
{{
|
||||
DeleteConfirmation(
|
||||
modal_id=modal_id,
|
||||
delete_text='Remove Access',
|
||||
delete_action=(url_for('ccpo.remove_access', user_id=user.id)),
|
||||
form=form,
|
||||
confirmation_text='remove'
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if user_can(permissions.CREATE_CCPO_USER) %}
|
||||
<a class="icon-link" href="{{ url_for('ccpo.add_new_user')}}">
|
||||
{{ "ccpo.add_user" | translate }} {{ Icon("plus") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if user_can(permissions.DELETE_CCPO_USER) %}
|
||||
{% for user, form in users_info %}
|
||||
{% set modal_id = "disable_ccpo_user_{}".format(user.dod_id) %}
|
||||
{% call Modal(name=modal_id) %}
|
||||
<h1>Disable CCPO User</h1>
|
||||
<hr>
|
||||
{{
|
||||
Alert(
|
||||
title=("components.modal.destructive_title" | translate),
|
||||
message=("ccpo.disable_user.alert_message" | translate({"user_name": user.full_name})),
|
||||
level="warning"
|
||||
)
|
||||
}}
|
||||
{{
|
||||
DeleteConfirmation(
|
||||
modal_id=modal_id,
|
||||
delete_text='Remove Access',
|
||||
delete_action=(url_for('ccpo.remove_access', user_id=user.id)),
|
||||
form=form,
|
||||
confirmation_text='remove'
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user