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

This starts to address several items in the roadmap, but probably doesn't fully address any of them. It takes the plugin code that was written several months ago, before the scope of this project was fully sorted out, and refactors it to be a starting point for the roadmap. * Adds template files for form inputs that can be used to both create new pledges and manage existing pledges * Does some validation and sanitization work on form submissions * Adds a custom post status for deactivated pledges
35 lines
968 B
PHP
35 lines
968 B
PHP
<?php
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
|
|
/** @var bool $editable */
|
|
/** @var array $data */
|
|
?>
|
|
|
|
<div class="form-field">
|
|
<label for="5ftf-pledge-email" class="screen-reader-text">
|
|
<?php esc_html_e( 'Email', 'wordpressorg' ); ?>
|
|
</label>
|
|
<input
|
|
type="email"
|
|
class="large-text"
|
|
id="5ftf-pledge-email"
|
|
name="org-pledge-email"
|
|
value="<?php echo esc_attr( $data['pledge-email'] ); ?>"
|
|
required
|
|
<?php echo ( $editable ) ? '' : 'readonly'; ?>
|
|
/>
|
|
|
|
<?php if ( is_admin() ) : ?>
|
|
<?php if ( $data['pledge-email-confirmed'] ) : ?>
|
|
<span class="dashicons dashicons-yes-alt" aria-hidden="true"></span>
|
|
<?php esc_html_e( 'Confirmed', 'wporg' ); ?>
|
|
<?php else : ?>
|
|
<span class="dashicons dashicons-warning" aria-hidden="true"></span>
|
|
<?php esc_html_e( 'Unconfirmed', 'wporg' ); ?>
|
|
<button class="button-secondary">
|
|
<?php esc_html_e( 'Resend confirmation', 'wporg' ); ?>
|
|
</button>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</div>
|