Pledge Management: Allow pledge admins to remove the pledge (#123)

* Rename generic "frontend" file to dialog

* Add a "remove pledge" action

* Process pledge deactivation

* Trigger an email on user-initiated pledge deactivation

* Show an error when trying to manage a deactivated pledge

* Add a label for "deactivated" pledges
This commit is contained in:
Kelly Dwan 2019-12-10 14:07:48 -05:00 committed by GitHub
parent 619af97bd1
commit bdbf6d573e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 184 additions and 26 deletions

View file

@ -1,4 +1,4 @@
/* global ajaxurl, FiveForTheFuture, fftfContributors, jQuery */
/* global FiveForTheFuture, fftfContributors, jQuery */
/* eslint no-alert: "off" */
jQuery( document ).ready( function( $ ) {
let ajaxurl = window.ajaxurl;
@ -153,4 +153,10 @@ jQuery( document ).ready( function( $ ) {
_addContributors();
}
} );
$( '#5ftf-pledge-remove' ).on( 'click', function( event ) {
if ( ! confirm( FiveForTheFuture.removePrompt ) ) {
event.preventDefault();
}
} );
} );