Switch inputs to default editable

Use `$readonly` variable to toggle on readonly state
This commit is contained in:
Kelly Dwan 2019-10-08 13:12:11 -04:00
parent 61ef972391
commit 001c8ee243
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
7 changed files with 14 additions and 12 deletions

View file

@ -1,8 +1,8 @@
<?php
namespace WordPressDotOrg\FiveForTheFuture\View;
/** @var bool $editable */
/** @var array $data */
/** @var bool $readonly */
?>
<div class="form-field">
@ -16,7 +16,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
name="org-pledge-email"
value="<?php echo esc_attr( $data['pledge-email'] ); ?>"
required
<?php echo ( $editable ) ? '' : 'readonly'; ?>
<?php echo $readonly ? 'readonly' : ''; ?>
/>
<?php if ( is_admin() ) : ?>