Remove route, tests, and template code for deleting a portfolio
This commit is contained in:
@@ -56,14 +56,10 @@
|
||||
{% include "portfolios/fragments/primary_point_of_contact.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% if user_can(permissions.ARCHIVE_PORTFOLIO) %}
|
||||
{% include "portfolios/fragments/delete_portfolio.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% if user_can(permissions.VIEW_PORTFOLIO_USERS) %}
|
||||
{% include "portfolios/fragments/portfolio_members.html" %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if user_can(permissions.VIEW_PORTFOLIO_ACTIVITY_LOG) and config.get("USE_AUDIT_LOG", False) %}
|
||||
{% include "fragments/audit_events_log.html" %}
|
||||
{{ Pagination(audit_events, url_for('portfolios.admin', portfolio_id=portfolio.id)) }}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
{% from "components/delete_confirmation.html" import DeleteConfirmation %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/modal.html" import Modal %}
|
||||
|
||||
<section id="primary-point-of-contact" class="panel">
|
||||
<div class="panel__content">
|
||||
<h2>{{ "fragments.delete_portfolio.title" | translate }}</h2>
|
||||
<p>{{ "fragments.delete_portfolio.subtitle" | translate }}</p>
|
||||
|
||||
|
||||
<div
|
||||
class="usa-button-primary {% if applications_count == 0 %}button-danger{% else %}usa-button-disabled{% endif %}"
|
||||
{% if applications_count == 0 %}v-on:click="openModal('delete_portfolio')"{% endif %}
|
||||
>
|
||||
{{ "common.deactivate" | translate }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% call Modal(name="delete_portfolio") %}
|
||||
<h1>
|
||||
{{ 'fragments.delete_portfolio.title' | translate }}
|
||||
</h1>
|
||||
<hr>
|
||||
{{
|
||||
Alert(
|
||||
level="warning",
|
||||
title=('components.modal.destructive_title' | translate),
|
||||
message=('components.modal.destructive_message' | translate({"resource": "portfolio"})),
|
||||
)
|
||||
}}
|
||||
|
||||
{{
|
||||
DeleteConfirmation(
|
||||
modal_id='delete_portfolio',
|
||||
delete_text='Deactivate',
|
||||
delete_action=url_for('portfolios.delete_portfolio', portfolio_id=portfolio.id),
|
||||
form=portfolio_form,
|
||||
confirmation_text="deactivate",
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
Reference in New Issue
Block a user