Skip to content

Commit

Permalink
Prompt before sending mass verification email.
Browse files Browse the repository at this point in the history
Previously, clicking the "Send Family Email" button would immediately send the confirmation email with no additional parameters or confirmation prompts.

Closes  #5125
  • Loading branch information
crossan007 committed Jan 12, 2020
1 parent 60a4f6c commit 7ebb75e
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/v2/templates/people/people-verify-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
<div class="box-body">
<a href="<?= SystemURLs::getRootPath()?>/Reports/ConfirmReport.php" class="btn btn-app"><i class="fa fa-file-pdf-o"></i><?= gettext('Download family letters') ?></a>
<a href="<?= SystemURLs::getRootPath()?>/Reports/ConfirmReportEmail.php" class="btn btn-app"><i class="fa fa-envelope-o"></i><?= gettext('Send family email') ?></a>
<div class="btn btn-app" id="verifyEmail"><i class="fa fa-envelope-o"></i><?= gettext('Send family email') ?></div>
</div>
</div>

Expand Down Expand Up @@ -53,6 +53,26 @@
<script nonce="<?= SystemURLs::getCSPNonce() ?>">
$(document).ready(function () {

$("#verifyEmail").click(function() {
bootbox.confirm({
title: i18next.t("Send Family Verification Emails Now?"),
message: i18next.t("Send data verification request emails to all people in database?")+"<br/><br/>"+i18next.t("This process can take a while depending on the size of your database."),
buttons: {
cancel : {
label: i18next.t("Cancel")
},
confirm: {
label: i18next.t("Send Emails")
}
},
callback: function(result) {
if (result) {
window.location= window.CRM.root + "/Reports/ConfirmReportEmail.php";
}
}
});
});

var dataTableConfig = {
ajax: {
url: window.CRM.root + "/api/families/self-verify",
Expand Down

0 comments on commit 7ebb75e

Please sign in to comment.