mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-13 13:55:44 +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
51
plugins/wporg-5ftf/views/inputs-pledge-org-info.php
Normal file
51
plugins/wporg-5ftf/views/inputs-pledge-org-info.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
|
||||
/** @var bool $editable */
|
||||
/** @var array $data */
|
||||
?>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-org-name">
|
||||
<?php esc_html_e( 'Organization Name', 'wordpressorg' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="large-text"
|
||||
id="5ftf-org-name"
|
||||
name="org-name"
|
||||
value="<?php echo esc_attr( $data['org-name'] ); ?>"
|
||||
required
|
||||
<?php echo ( $editable ) ? '' : 'readonly'; ?>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-org-url">
|
||||
<?php esc_html_e( 'Website Address', 'wordpressorg' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="url"
|
||||
class="large-text"
|
||||
id="5ftf-org-url"
|
||||
name="org-url"
|
||||
value="<?php echo esc_attr( $data['org-url'] ); ?>"
|
||||
required
|
||||
<?php echo ( $editable ) ? '' : 'readonly'; ?>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-org-description">
|
||||
<?php _e( 'Organization Blurb', 'wordpressorg' ); ?>
|
||||
</label>
|
||||
<textarea
|
||||
class="large-text"
|
||||
id="5ftf-org-description"
|
||||
name="org-description"
|
||||
required
|
||||
<?php echo ( $editable ) ? '' : 'readonly'; ?>
|
||||
>
|
||||
<?php echo esc_html( $data['org-description'] ); ?>
|
||||
</textarea>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue