| 1 |
<?php |
| 2 |
/** |
| 3 |
* Approved Page 2 business-details form. |
| 4 |
* |
| 5 |
* @package Booking Calendar |
| 6 |
* @var array<string,mixed> $template_context Authorized step context. |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
$step_data = $template_context['step_data']; |
| 14 |
$values = $step_data['values']; |
| 15 |
?> |
| 16 |
<section class="wpbc_setup_wizard__step-content" aria-labelledby="wpbc-setup-wizard-step-title"> |
| 17 |
<header class="wpbc_setup_wizard__step-heading"> |
| 18 |
<h1 id="wpbc-setup-wizard-step-title"><?php esc_html_e( 'Tell Us About Your Business', 'booking' ); ?></h1> |
| 19 |
<p class="wpbc_setup_wizard__lead"><?php esc_html_e( 'This will help customize your experience.', 'booking' ); ?></p> |
| 20 |
</header> |
| 21 |
|
| 22 |
<form class="wpbc_setup_wizard__content-panel" id="wpbc-setup-wizard-step-form" data-wpbc-setup-wizard-fields novalidate> |
| 23 |
<div class="wpbc_setup_wizard__field-grid"> |
| 24 |
<div class="wpbc_setup_wizard__field"> |
| 25 |
<label for="wpbc-setup-wizard-business-name"><?php esc_html_e( "What's the name of your business?", 'booking' ); ?></label> |
| 26 |
<input id="wpbc-setup-wizard-business-name" type="text" name="business_name" value="<?php echo esc_attr( $values['business_name'] ); ?>" maxlength="200" autocomplete="organization" required data-wpbc-setup-wizard-field aria-describedby="wpbc-setup-wizard-business-name-error"> |
| 27 |
<span class="wpbc_setup_wizard__field-error" id="wpbc-setup-wizard-business-name-error" data-wpbc-setup-wizard-error-for="business_name"></span> |
| 28 |
</div> |
| 29 |
|
| 30 |
<div class="wpbc_setup_wizard__field"> |
| 31 |
<label for="wpbc-setup-wizard-business-stage"><?php esc_html_e( 'Which one of these best describes you?', 'booking' ); ?></label> |
| 32 |
<select id="wpbc-setup-wizard-business-stage" name="business_stage" required data-wpbc-setup-wizard-field aria-describedby="wpbc-setup-wizard-business-stage-error"> |
| 33 |
<?php foreach ( $step_data['business_stages'] as $stage_id => $stage_label ) : ?> |
| 34 |
<option value="<?php echo esc_attr( $stage_id ); ?>"<?php selected( $values['business_stage'], $stage_id ); ?>><?php echo esc_html( $stage_label ); ?></option> |
| 35 |
<?php endforeach; ?> |
| 36 |
</select> |
| 37 |
<span class="wpbc_setup_wizard__field-error" id="wpbc-setup-wizard-business-stage-error" data-wpbc-setup-wizard-error-for="business_stage"></span> |
| 38 |
</div> |
| 39 |
|
| 40 |
<div class="wpbc_setup_wizard__field"> |
| 41 |
<label for="wpbc-setup-wizard-booking-email"><?php esc_html_e( 'Your Booking Email Address', 'booking' ); ?></label> |
| 42 |
<input id="wpbc-setup-wizard-booking-email" type="email" name="booking_email" value="<?php echo esc_attr( $values['booking_email'] ); ?>" maxlength="254" autocomplete="email" required data-wpbc-setup-wizard-field aria-describedby="wpbc-setup-wizard-booking-email-error"> |
| 43 |
<span class="wpbc_setup_wizard__field-error" id="wpbc-setup-wizard-booking-email-error" data-wpbc-setup-wizard-error-for="booking_email"></span> |
| 44 |
</div> |
| 45 |
|
| 46 |
<div class="wpbc_setup_wizard__field"> |
| 47 |
<label for="wpbc-setup-wizard-industry"><?php esc_html_e( 'What industry is your booking business in?', 'booking' ); ?></label> |
| 48 |
<select id="wpbc-setup-wizard-industry" name="industry" required data-wpbc-setup-wizard-field aria-describedby="wpbc-setup-wizard-industry-error"> |
| 49 |
<option value=""><?php esc_html_e( 'Select', 'booking' ); ?></option> |
| 50 |
<?php foreach ( $step_data['industries'] as $industry_group ) : ?> |
| 51 |
<optgroup label="<?php echo esc_attr( $industry_group['label'] ); ?>"> |
| 52 |
<?php foreach ( $industry_group['options'] as $industry_id => $industry_label ) : ?> |
| 53 |
<option value="<?php echo esc_attr( $industry_id ); ?>"<?php selected( $values['industry'], $industry_id ); ?>><?php echo esc_html( $industry_label ); ?></option> |
| 54 |
<?php endforeach; ?> |
| 55 |
</optgroup> |
| 56 |
<?php endforeach; ?> |
| 57 |
</select> |
| 58 |
<span class="wpbc_setup_wizard__field-error" id="wpbc-setup-wizard-industry-error" data-wpbc-setup-wizard-error-for="industry"></span> |
| 59 |
</div> |
| 60 |
|
| 61 |
</div> |
| 62 |
|
| 63 |
<div class="wpbc_setup_wizard__divider"></div> |
| 64 |
<div class="wpbc_setup_wizard__consent"> |
| 65 |
<input id="wpbc-setup-wizard-personalization-consent" type="checkbox" name="personalization_consent" value="1"<?php checked( ! empty( $values['personalization_consent'] ) ); ?> data-wpbc-setup-wizard-field> |
| 66 |
<label for="wpbc-setup-wizard-personalization-consent"><?php esc_html_e( 'By checking this box, I agree to share this setup data to personalize my setup experience, get more relevant content, and help improve WP Booking Calendar for everyone.', 'booking' ); ?></label> |
| 67 |
</div> |
| 68 |
</form> |
| 69 |
</section> |
| 70 |
|