Merge pull request #436 from dod-ccpo/revoke-invitation-#160300315
Revoke invitation #160300315
This commit is contained in:
19
templates/components/confirmation_button.html
Normal file
19
templates/components/confirmation_button.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% macro ConfirmationButton(btn_text, action, csrf_token, confirm_msg="Are you sure?", confirm_btn="Confirm", cancel_btn="Cancel") -%}
|
||||
<v-popover placement='top-start'>
|
||||
<template slot="popover">
|
||||
<p>{{ confirm_msg }}</p>
|
||||
<div class='action-group'>
|
||||
<form method="POST" action="{{ action }}">
|
||||
{{ csrf_token }}
|
||||
<button class='usa-button usa-button-primary' type='submit'>
|
||||
{{ confirm_btn }}
|
||||
</button>
|
||||
</form>
|
||||
<button class='usa-button usa-button-secondary' v-close-popover>
|
||||
{{ cancel_btn }}
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<button class="tooltip-target" type="button">{{ btn_text }}</button>
|
||||
</v-popover>
|
||||
{%- endmacro %}
|
@@ -5,6 +5,7 @@
|
||||
{% from "components/selector.html" import Selector %}
|
||||
{% from "components/options_input.html" import OptionsInput %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/confirmation_button.html" import ConfirmationButton %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -38,6 +39,13 @@
|
||||
{% if editable %}
|
||||
<a href='{{ url_for("users.user") }}' class='icon-link'>edit account details</a>
|
||||
{% endif %}
|
||||
{% if member.latest_invitation.is_pending %}
|
||||
{{ ConfirmationButton(
|
||||
"Revoke Invitation",
|
||||
url_for("workspaces.revoke_invitation", workspace_id=workspace.id, token=member.latest_invitation.token),
|
||||
form.csrf_token
|
||||
) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user