mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-21 02:23:43 +03:00

Adding the `button` mixin into `input[type="submit"] caused conflicts with the other button classes (`.button-primary`) due to specificity. The button classes should be used on all buttons instead. This also updates which button on the Manage Pledge form is the "primary" action, since it's easy to skip the Update button when it's not primary.
78 lines
2.3 KiB
PHP
Executable file
78 lines
2.3 KiB
PHP
Executable file
<?php
|
||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||
|
||
use WP_Post;
|
||
|
||
/**
|
||
* @var string $directory_url
|
||
* @var bool $email_confirmed
|
||
* @var bool $is_new_pledge
|
||
* @var int $pledge_id
|
||
* @var WP_Post|null $pledge
|
||
*/
|
||
?>
|
||
|
||
<?php if ( true === $email_confirmed ) : ?>
|
||
|
||
<div class="notice notice-success notice-alt">
|
||
<p>
|
||
<?php
|
||
if ( $is_new_pledge ) {
|
||
printf(
|
||
wp_kses_post( __( 'Thank you for confirming your address! We’ve emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.', 'wporg-5ftf' ) ),
|
||
esc_url( $directory_url )
|
||
);
|
||
} else {
|
||
printf(
|
||
wp_kses_post( __( 'Thank you for confirming your address! If you have confirmed contributors, your pledge is visible in <a href=\"%s\">the directory</a> again. Otherwise, your pledge wiill show up once one contributor confirms their participation.', 'wporg-5ftf' ) ),
|
||
esc_url( $directory_url )
|
||
);
|
||
}
|
||
?>
|
||
</p>
|
||
|
||
<?php if ( $pledge instanceof WP_Post ) : ?>
|
||
<p>
|
||
<?php echo wp_kses_post( sprintf(
|
||
__( 'In the meantime, your pledge will be visible here: %s', 'wporg-5ftf' ),
|
||
sprintf(
|
||
'<a href="%1$s">%1$s</a>',
|
||
esc_url( get_permalink( $pledge ) )
|
||
)
|
||
) ); ?>
|
||
</p>
|
||
<?php endif; ?>
|
||
|
||
<p>
|
||
<?php esc_html_e( 'Thanks again for pledging your organization’s resources to contribute to WordPress! We can do great things together!', 'wporg-5ftf' ); ?>
|
||
</p>
|
||
</div>
|
||
|
||
<?php else : ?>
|
||
|
||
<div class="notice notice-error notice-alt">
|
||
<p>
|
||
<?php
|
||
// There could be other reasons it failed, like an invalid token, but this is the most common reason,
|
||
// and the only one that normal users should experience, so we're assuming it in order to provide
|
||
// the best UX.
|
||
esc_html_e( 'Your confirmation link has expired, please obtain a new one:', 'wporg-5ftf' );
|
||
?>
|
||
</p>
|
||
|
||
<form action="" method="get">
|
||
<input type="hidden" name="pledge_id" value="<?php echo esc_attr( $pledge_id ); ?>" />
|
||
<input type="hidden" name="action" value="resend_pledge_confirmation" />
|
||
|
||
<p>
|
||
<input
|
||
type="submit"
|
||
class="button"
|
||
value="Resend Confirmation"
|
||
/>
|
||
</p>
|
||
</form>
|
||
</div>
|
||
|
||
<?php endif; ?>
|