mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-14 22:35:45 +03:00
Refactor forms to be able to reuse inputs in multiple contexts
This commit is contained in:
parent
213531ca08
commit
9199e44c66
13 changed files with 231 additions and 185 deletions
34
plugins/wporg-5ftf/views/inputs-pledge-contributors.php
Normal file
34
plugins/wporg-5ftf/views/inputs-pledge-contributors.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
|
||||
/** @var bool $editable */
|
||||
/** @var array $data */
|
||||
/** @var array $contributors */
|
||||
?>
|
||||
|
||||
<?php if ( empty( $contributors ) ) : ?>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-pledge-contributors">
|
||||
<?php esc_html_e( 'Contributors', 'wordpressorg' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="large-text"
|
||||
id="5ftf-pledge-contributors"
|
||||
name="pledge-contributors"
|
||||
value=""
|
||||
required
|
||||
/>
|
||||
<p>
|
||||
<!-- Instructions for inputting wporg usernames -->
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="5ftf-contributors">
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
Loading…
Add table
Add a link
Reference in a new issue