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

@ -31,6 +31,15 @@ body.single.single-5ftf_pledge {
margin-top: ms(2);
}
}
.pledge-status {
display: inline-block;
padding: 4px 12px;
font-size: ms(-1);
text-transform: uppercase;
background-color: $color-error-red;
color: white;
}
}
.entry-title {

View file

@ -29,7 +29,8 @@
height: auto;
}
[id*="help"] p {
[id*="help"] p,
p[id*="help"] {
margin-top: ms(-5);
font-size: ms(-2);
}

View file

@ -6,6 +6,7 @@ use WordPressDotOrg\FiveForTheFuture\XProfile;
use WP_Post;
use const WordPressDotOrg\FiveForTheFuture\PledgeMeta\META_PREFIX;
use const WordPressDotOrg\FiveForTheFuture\Pledge\DEACTIVE_STATUS;
$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( get_the_ID() );
@ -30,6 +31,9 @@ get_header();
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<div>
<?php if ( DEACTIVE_STATUS === get_post_status() ) : ?>
<span class="pledge-status"><?php esc_html_e( 'deactivated', 'wporg-5ftf' ); ?></span>
<?php endif; ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<span class="pledge-url">
<?php