mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-02 01:01:18 +03:00
Hide confirmation when pledge is a draft
This commit is contained in:
parent
53a1d9b294
commit
725fdbb94b
|
@ -209,6 +209,7 @@ function add_meta_boxes() {
|
||||||
function render_meta_boxes( $pledge, $box ) {
|
function render_meta_boxes( $pledge, $box ) {
|
||||||
$readonly = ! current_user_can( 'edit_page', $pledge->ID );
|
$readonly = ! current_user_can( 'edit_page', $pledge->ID );
|
||||||
$is_manage = true;
|
$is_manage = true;
|
||||||
|
$pledge_id = $pledge->ID;
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
foreach ( get_pledge_meta_config() as $key => $config ) {
|
foreach ( get_pledge_meta_config() as $key => $config ) {
|
||||||
|
|
|
@ -4,8 +4,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||||
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||||
|
|
||||||
/** @var array $contributors */
|
/** @var array $contributors */
|
||||||
/** @var array $data */
|
/** @var int $pledge_id */
|
||||||
/** @var bool $readonly */
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/template" id="tmpl-5ftf-contributor-lists">
|
<script type="text/template" id="tmpl-5ftf-contributor-lists">
|
||||||
|
@ -75,7 +74,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="5ftf-contributors">
|
<div id="5ftf-contributors">
|
||||||
<div class="pledge-contributors pledge-status__<?php echo esc_attr( get_post_status() ); ?>">
|
<div class="pledge-contributors pledge-status__<?php echo esc_attr( get_post_status( $pledge_id ) ); ?>">
|
||||||
<?php if ( ! empty( $contributors ) ) : ?>
|
<?php if ( ! empty( $contributors ) ) : ?>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
|
|
|
@ -63,6 +63,10 @@
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contributor-list-heading {
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
.contributor-list {
|
.contributor-list {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
|
|
||||||
|
@ -85,4 +89,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pledge-contributors.pledge-status__draft .resend-confirm {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue