Merge pull request #456 from dod-ccpo/fix-revoke-resend-ie

Fix revoke/resend invitations in IE
This commit is contained in:
patricksmithdds
2018-11-28 13:01:30 -05:00
committed by GitHub
6 changed files with 78 additions and 20 deletions

View File

@@ -1,19 +1,10 @@
{% 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>
{% macro ConfirmationButton(btn_text, action, confirm_msg="Are you sure?", confirm_btn="Confirm", cancel_btn="Cancel") -%}
<confirmation-popover
btn_text='{{ btn_text }}'
action='{{ action }}'
csrf_token='{{ csrf_token() }}'
confirm_msg='{{ confirm_msg }}'
confirm_btn_text='{{ confirm_btn }}'
cancel_btn_text='{{ cancel_btn }}'>
</confirmation-popover>
{%- endmacro %}

View File

@@ -44,14 +44,12 @@
{{ ConfirmationButton(
"Revoke Invitation",
url_for("workspaces.revoke_invitation", workspace_id=workspace.id, token=member.latest_invitation.token),
form.csrf_token
) }}
{% endif %}
{% if member.can_resend_invitation %}
{{ ConfirmationButton (
"Resend Invitation",
url_for("workspaces.resend_invitation", workspace_id=workspace.id, token=member.latest_invitation.token),
form.csrf_token,
confirm_msg="Are you sure? This will send an email to invite the user to join this workspace."
)}}
{% endif %}