139 lines
5.1 KiB
HTML
139 lines
5.1 KiB
HTML
{% extends "portfolios/base.html" %}
|
|
|
|
{% from "components/pagination.html" import Pagination %}
|
|
{% from "components/icon.html" import Icon %}
|
|
{% from "components/text_input.html" import TextInput %}
|
|
{% from "components/multi_step_modal_form.html" import MultiStepModalForm %}
|
|
|
|
{% macro SimpleOptionsInput(field) %}
|
|
<div class="usa-input">
|
|
<fieldset data-ally-disabled="true" class="usa-input__choices">
|
|
<legend>
|
|
<div class="usa-input__title-inline">
|
|
{{ field.label | striptags}}
|
|
</div>
|
|
</legend>
|
|
{{ field() }}
|
|
</fieldset>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% set secondary_breadcrumb = "navigation.portfolio_navigation.portfolio_admin" | translate %}
|
|
|
|
{% block portfolio_content %}
|
|
|
|
{% include "fragments/flash.html" %}
|
|
|
|
<div v-cloak class="portfolio-admin portfolio-content">
|
|
|
|
<div class="panel">
|
|
<div class="panel__content">
|
|
|
|
{% if user_can(permissions.VIEW_PORTFOLIO_NAME) %}
|
|
<form method="POST" action="{{ url_for('portfolios.edit_portfolio', portfolio_id=portfolio.id) }}" autocomplete="false">
|
|
{{ portfolio_form.csrf_token }}
|
|
<div class='form-row'>
|
|
<div class='form-col form-col--half'>
|
|
{{ TextInput(portfolio_form.name, validation="portfolioName") }}
|
|
</div>
|
|
|
|
<div class='edit-portfolio-name action-group'>
|
|
<button type="submit" class="usa-button usa-button-big usa-button-primary" tabindex="0">Save</button>
|
|
</div>
|
|
</div>
|
|
<div class='defense-row'>
|
|
<div>
|
|
<div class='admin-title'>{{ "forms.task_order.defense_component_label" | translate }}</div>
|
|
{% if portfolio.defense_component %}
|
|
<div class='admin-content'>{{ portfolio.defense_component }}</div>
|
|
{% else %}
|
|
<div class='admin-content'>{{ "fragments.portfolio_admin.none" | translate }}</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if user_can(permissions.VIEW_PORTFOLIO_POC) %}
|
|
{% include "fragments/primary_point_of_contact.html" %}
|
|
{% endif %}
|
|
|
|
{% if user_can(permissions.VIEW_PORTFOLIO_USERS) %}
|
|
{% include "fragments/admin/portfolio_members.html" %}
|
|
{% endif %}
|
|
|
|
{% set step_one %}
|
|
<div class="modal__form--header">
|
|
<h1>Invite New Portfolio Member</h1>
|
|
</div>
|
|
<div class='form-row'>
|
|
<div class='form-col form-col--half'>
|
|
{{ TextInput(member_form.first_name, validation='requiredField') }}
|
|
</div>
|
|
<div class='form-col form-col--half'>
|
|
{{ TextInput(member_form.last_name, validation='requiredField') }}
|
|
</div>
|
|
</div>
|
|
<div class='form-row'>
|
|
<div class='form-col form-col--half'>
|
|
{{ TextInput(member_form.email, validation='email') }}
|
|
</div>
|
|
<div class='form-col form-col--half'>
|
|
{{ TextInput(member_form.phone_number, validation='usPhone', optional=True) }}
|
|
</div>
|
|
</div>
|
|
<div class='form-row'>
|
|
<div class='form-col form-col--half'>
|
|
{{ TextInput(member_form.dod_id, validation='dodId') }}
|
|
</div>
|
|
<div class='form-col form-col--half'>
|
|
</div>
|
|
</div>
|
|
<div class='action-group'>
|
|
<input
|
|
type='button'
|
|
v-on:click="next()"
|
|
v-bind:disabled="invalid"
|
|
class='action-group__action usa-button'
|
|
value='Next Step'>
|
|
<a class='action-group__action icon-link icon-link--default' v-on:click="closeModal('{{ new_port_mem }}')">Cancel</a>
|
|
</div>
|
|
{% endset %}
|
|
{% set step_two %}
|
|
<div class="modal__form--padded">
|
|
<div class="modal__form--header">
|
|
<h1>Assign Member Permissions</h1>
|
|
<a class='icon-link'>
|
|
<span class='icon'>{{ Icon('info') }}</span>
|
|
{{ "portfolios.admin.permissions_info" | translate }}
|
|
</a>
|
|
</div>
|
|
{{ SimpleOptionsInput(member_form.perms_app_mgmt) }}
|
|
{{ SimpleOptionsInput(member_form.perms_funding) }}
|
|
{{ SimpleOptionsInput(member_form.perms_reporting) }}
|
|
{{ SimpleOptionsInput(member_form.perms_portfolio_mgmt) }}
|
|
<div class='action-group'>
|
|
<input type="submit" v-on:click="closeModal('{{ new_port_mem }}')" class='action-group__action usa-button' value='Invite Member'>
|
|
<a class='action-group__action icon-link icon-link--default' v-on:click="closeModal('{{ new_port_mem }}')">Cancel</a>
|
|
</div>
|
|
</div>
|
|
{% endset %}
|
|
{{ MultiStepModalForm(
|
|
'add-port-mem',
|
|
member_form,
|
|
url_for("portfolios.create_member", portfolio_id=portfolio.id),
|
|
[step_one, step_two],
|
|
button_text="add new member")
|
|
}}
|
|
|
|
{% include "fragments/audit_events_log.html" %}
|
|
|
|
{% if user_can(permissions.VIEW_PORTFOLIO_ACTIVITY_LOG) %}
|
|
{% include "fragments/audit_events_log.html" %}
|
|
{{ Pagination(audit_events, 'portfolios.portfolio_admin', portfolio_id=portfolio.id) }}
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|