mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-25 04:13:44 +03:00

This broadly enables & styles the pledge forms across the frontend and wp-admin. - Switches field `readonly` control to a variable called `$readonly` - Create `PledgeMeta\get_pledge_meta()` which will fetch data from `$_POST`, a pledge post, or defaults. - Add Number of Employees field - Update form content to match mockup: - fields now have help text - success message uses content from mockup - logo field is moved to the "org info" section - Style form in theme, add some similar styles to the admin Fixes #7, fixes #28
35 lines
687 B
PHP
35 lines
687 B
PHP
<?php
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
|
|
/** @var array $contributors */
|
|
/** @var array $data */
|
|
/** @var bool $readonly */
|
|
?>
|
|
|
|
<?php if ( empty( $contributors ) ) : ?>
|
|
|
|
<div class="form-field">
|
|
<label for="5ftf-pledge-contributors">
|
|
<?php esc_html_e( 'Contributors', 'wordpressorg' ); ?>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="5ftf-pledge-contributors"
|
|
name="pledge-contributors"
|
|
value=""
|
|
required
|
|
aria-describedby="5ftf-pledge-contributors-help"
|
|
/>
|
|
<p id="5ftf-pledge-contributors-help">
|
|
<?php esc_html_e( 'Separate each username with a comma.', 'wordpressorg' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<?php else : ?>
|
|
|
|
<div class="5ftf-contributors">
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|