2019-10-04 22:35:02 +03:00
|
|
|
<?php
|
2019-11-21 23:42:59 +02:00
|
|
|
|
2019-10-04 22:35:02 +03:00
|
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
|
|
|
2019-11-21 23:42:59 +02:00
|
|
|
/**
|
|
|
|
* @var array $data
|
|
|
|
* @var int $pledge_id
|
|
|
|
* @var bool $readonly
|
|
|
|
*/
|
|
|
|
|
2019-10-04 22:35:02 +03:00
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="form-field">
|
|
|
|
<label for="5ftf-org-name">
|
2019-11-23 20:24:37 +02:00
|
|
|
<?php esc_html_e( 'Organization Name', 'wporg-5ftf' ); ?>
|
2019-10-04 22:35:02 +03:00
|
|
|
</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
id="5ftf-org-name"
|
|
|
|
name="org-name"
|
|
|
|
value="<?php echo esc_attr( $data['org-name'] ); ?>"
|
|
|
|
required
|
2019-10-09 01:29:35 +03:00
|
|
|
<?php echo $readonly ? 'readonly' : ''; ?>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
2019-10-28 19:33:44 +02:00
|
|
|
<?php if ( ! is_admin() ) : ?>
|
2019-11-21 23:42:59 +02:00
|
|
|
<?php if ( has_post_thumbnail( $pledge_id ) ) : ?>
|
|
|
|
<div class="form-field form-field__logo-display">
|
|
|
|
<?php echo get_the_post_thumbnail( $pledge_id, 'pledge-logo' ); ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2019-10-28 19:33:44 +02:00
|
|
|
<div class="form-field form-field__logo">
|
|
|
|
<label for="5ftf-org-logo">
|
2019-11-23 20:24:37 +02:00
|
|
|
<?php esc_html_e( 'Logo', 'wporg-5ftf' ); ?>
|
2019-10-28 19:33:44 +02:00
|
|
|
</label>
|
|
|
|
<br />
|
|
|
|
<input
|
|
|
|
type="file"
|
|
|
|
id="5ftf-org-logo"
|
|
|
|
name="org-logo"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2019-10-04 22:35:02 +03:00
|
|
|
|
|
|
|
<div class="form-field">
|
|
|
|
<label for="5ftf-org-url">
|
2019-11-23 20:24:37 +02:00
|
|
|
<?php esc_html_e( 'Website Address', 'wporg-5ftf' ); ?>
|
2019-10-04 22:35:02 +03:00
|
|
|
</label>
|
|
|
|
<input
|
|
|
|
type="url"
|
|
|
|
id="5ftf-org-url"
|
|
|
|
name="org-url"
|
2019-11-02 15:13:25 +02:00
|
|
|
placeholder="https://example.com"
|
2019-10-04 22:35:02 +03:00
|
|
|
value="<?php echo esc_attr( $data['org-url'] ); ?>"
|
|
|
|
required
|
2019-10-09 01:29:35 +03:00
|
|
|
<?php echo $readonly ? 'readonly' : ''; ?>
|
2019-10-04 22:35:02 +03:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-field">
|
|
|
|
<label for="5ftf-org-description">
|
2019-11-23 20:24:37 +02:00
|
|
|
<?php esc_html_e( 'Organization Blurb', 'wporg-5ftf' ); ?>
|
2019-10-04 22:35:02 +03:00
|
|
|
</label>
|
|
|
|
<textarea
|
|
|
|
id="5ftf-org-description"
|
|
|
|
name="org-description"
|
2019-10-09 01:29:35 +03:00
|
|
|
rows="5"
|
|
|
|
required
|
|
|
|
<?php echo $readonly ? 'readonly' : ''; ?>
|
|
|
|
><?php /* phpcs:ignore -- php tags should be on the same line as textarea to prevent extra whitespace */
|
|
|
|
echo esc_html( $data['org-description'] );
|
|
|
|
/* phpcs:ignore */ ?></textarea>
|
|
|
|
</div>
|