Add a "remove pledge" action

This commit is contained in:
Kelly Dwan 2019-12-06 16:48:54 -05:00
parent fa8bb48ad6
commit fedfface23
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
5 changed files with 45 additions and 4 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();
}
} );
} );