mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-12 13:25:45 +03:00
Refinements to the pledge form and associated meta
This commit is contained in:
parent
7092faebcb
commit
abbfe6dad1
3 changed files with 180 additions and 177 deletions
|
@ -4,152 +4,106 @@
|
|||
*/
|
||||
|
||||
/** @var array $messages */
|
||||
/** @var bool $complete */
|
||||
?>
|
||||
|
||||
<p>
|
||||
<a href="#">Manage an existing pledge</a>
|
||||
</p>
|
||||
|
||||
<?php if ( ! empty( $messages ) ) : ?>
|
||||
|
||||
<?php foreach ( $messages as $message ) : ?>
|
||||
<div class="notice notice-error">
|
||||
<?php echo wpautop( $message ); ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="" method="post">
|
||||
<fieldset>
|
||||
<legend><?php _e( 'Company Details', 'wporg' ); ?></legend>
|
||||
<?php if ( true === $complete ) : ?>
|
||||
|
||||
<div class="notice notice-info">
|
||||
<?php echo wpautop( __( 'Thank you for your submission. You will receive an email confirmation.', 'wporg' ) ); ?>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<form action="" method="post">
|
||||
<div>
|
||||
<label for="5ftf-company-name">
|
||||
<?php _e( 'Company Name', 'wporg' ); ?>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-company-name"
|
||||
name="company-name"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'company-name' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
<label for="5ftf-org-name">
|
||||
<?php _e( 'Organization Name', 'wporg' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-org-name"
|
||||
name="org-name"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'org-name' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-company-url">
|
||||
<?php _e( 'Company URL', 'wporg' ); ?>
|
||||
<input
|
||||
type="url"
|
||||
id="5ftf-company-url"
|
||||
name="company-url"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'company-url' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
Logo <strong>TODO</strong>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-company-email">
|
||||
<?php _e( 'Company Email', 'wporg' ); ?>
|
||||
<input
|
||||
type="email"
|
||||
id="5ftf-company-email"
|
||||
name="company-email"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'company-email' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
<label for="5ftf-org-description">
|
||||
<?php _e( 'Organization Blurb', 'wporg' ); ?>
|
||||
</label>
|
||||
<textarea
|
||||
id="5ftf-org-description"
|
||||
name="org-description"
|
||||
required
|
||||
>
|
||||
<?php echo esc_html( filter_input( INPUT_POST, 'org-description' ) ); ?>
|
||||
</textarea>
|
||||
<span class="field-help">280 characters</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-company-phone">
|
||||
<?php _e( 'Company Phone Number', 'wporg' ); ?>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-company-phone"
|
||||
name="company-phone"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'company-phone' ) ); ?>"
|
||||
/>
|
||||
<label for="5ftf-admin-wporg-username">
|
||||
<?php _e( 'Admin Username', 'wporg' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-admin-wporg-username"
|
||||
name="admin-wporg-username"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'admin-wporg-username' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
<span class="field-help">This user will be responsible for managing your organization's pledge.</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-company-total-employees">
|
||||
<?php _e( 'Total Employees', 'wporg' ); ?>
|
||||
<input
|
||||
type="number"
|
||||
id="5ftf-company-total-employees"
|
||||
name="company-total-employees"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'company-total-employees' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php _e( 'Pledge Manager', 'wporg' ); ?></legend>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-contact-name">
|
||||
<?php _e( 'Name', 'wporg' ); ?>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-contact-name"
|
||||
name="contact-name"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'contact-name' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
<label for="5ftf-contributor-wporg-usernames">
|
||||
<?php _e( 'Contributing Employee Usernames', 'wporg' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-contributor-wporg-usernames"
|
||||
name="contributor-wporg-usernames"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'contributor-wporg-usernames' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
<span class="field-help">Separate each username with a comma.</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-contact-wporg-username">
|
||||
<?php _e( 'WordPress.org User Name', 'wporg' ); ?>
|
||||
<input
|
||||
type="text"
|
||||
id="5ftf-contact-wporg-username"
|
||||
name="contact-wporg-username"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'contact-wporg-username' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php _e( 'Pledge', 'wporg' ); ?></legend>
|
||||
|
||||
<div>
|
||||
<label for="5ftf-pledge-hours">
|
||||
<?php _e( 'Pledged Hours Per Week', 'wporg' ); ?>
|
||||
<input
|
||||
type="number"
|
||||
id="5ftf-pledge-hours"
|
||||
name="pledge-hours"
|
||||
value="<?php echo esc_attr( filter_input( INPUT_POST, 'pledge-hours' ) ); ?>"
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<?php
|
||||
printf(
|
||||
__( 'The company pledges that it meets the <a href="%s">expectations</a> of the Five For The Future program and that it will dedicate this amount of employee time per week to the WordPress project', 'wporg' ),
|
||||
esc_url( '#' )
|
||||
);
|
||||
?>
|
||||
<label>
|
||||
<label for="5ftf-pledge-agreement">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="5ftf-pledge-agreement"
|
||||
name="pledge-agreement"
|
||||
<?php checked( filter_input( INPUT_POST, 'pledge-agreement', FILTER_VALIDATE_BOOLEAN ) ) ?>
|
||||
required
|
||||
/>
|
||||
<?php _e( 'Yes', 'wporg' ); ?>
|
||||
<?php _e( 'I agree', 'wporg' ); ?>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div>
|
||||
<input type="submit" id="5ftf-pledge-submit" name="action" class="button button-primary" value="<?php esc_attr_e( 'Submit', 'wporg' ); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<input type="submit" id="5ftf-pledge-submit" name="action" class="button button-primary" value="<?php esc_attr_e( 'Submit Pledge', 'wporg' ); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue