| 1 |
<?php /** |
| 2 |
* @version 1.0 |
| 3 |
* @description Template for Setup pages |
| 4 |
* @category Setup Templates |
| 5 |
* @author wpdevelop |
| 6 |
* |
| 7 |
* @web-site http://oplugins.com/ |
| 8 |
* @email info@oplugins.com |
| 9 |
* |
| 10 |
* @modified 2024-09-09 |
| 11 |
*/ |
| 12 |
|
| 13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 14 |
|
| 15 |
|
| 16 |
// ------------------------------------------------------------------------------------------------------------- |
| 17 |
// == Main - General Info == |
| 18 |
// ------------------------------------------------------------------------------------------------------------- |
| 19 |
/** |
| 20 |
* Template - General Info - Step 01 |
| 21 |
* |
| 22 |
* Help Tips: |
| 23 |
* |
| 24 |
* <script type="text/html" id="tmpl-template_name_a"> |
| 25 |
* Escaped: {{data.test_key}} |
| 26 |
* HTML: {{{data.test_key}}} |
| 27 |
* JS: <# if (true) { alert( 1 ); } #> |
| 28 |
* </script> |
| 29 |
* |
| 30 |
* var template__var = wp.template( 'template_name_a' ); |
| 31 |
* |
| 32 |
* jQuery( '.content' ).html( template__var( { 'test_key' => '<strong>Data</strong>' } ) ); |
| 33 |
* |
| 34 |
* @return void |
| 35 |
*/ |
| 36 |
function wpbc_stp_wiz__template__general_info(){ |
| 37 |
|
| 38 |
?><script type="text/html" id="tmpl-wpbc_stp_wiz__template__general_info"> |
| 39 |
<div class="wpbc_page_main_section wpbc_container wpbc_form wpbc_container_booking_form"> |
| 40 |
<div class="wpbc__form__div wpbc_swp_section wpbc_swp_section__general_info"> |
| 41 |
<div class="wpbc__row"> |
| 42 |
<div class="wpbc__field"> |
| 43 |
<h1 class="wpbc_swp_section_header" ><?php esc_html_e( 'Tell Us About Your Business', 'booking' ); ?></h1> |
| 44 |
<p class="wpbc_swp_section_header_description"><?php esc_html_e('This will help customize your experience.','booking'); ?></p> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
<div class="wpbc__row"> |
| 48 |
<div class="wpbc__field"> |
| 49 |
<label><?php esc_html_e('What\'s the name of your business?','booking'); ?></label><br> |
| 50 |
<input type="text" name="wpbc_swp_business_name" size="40" |
| 51 |
value="<?php echo esc_attr( get_option( 'blogname' ) ); ?>" |
| 52 |
placeholder="<?php echo esc_attr( __( 'Example', 'booking' ) ) . ': ' . esc_attr( get_option( 'blogname' ) ); ?>" |
| 53 |
/> |
| 54 |
</div> |
| 55 |
<div class="wpbc__field"> |
| 56 |
<label><?php esc_html_e('Which one of these best describes you?','booking'); ?></label><br> |
| 57 |
<select name="wpbc_swp_booking_who_setup" onchange="javascript:console.log( this );" > |
| 58 |
<option value="starting"><?php esc_html_e('I\'m just starting my business','booking'); ?></option> |
| 59 |
<option value="in_business"><?php esc_html_e('I\'m already in business','booking'); ?></option> |
| 60 |
<option value="setup_for_client"><?php esc_html_e('I\'m setting up a plugin for a client','booking'); ?></option> |
| 61 |
</select> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
<div class="wpbc__row"> |
| 65 |
<div class="wpbc__field"> |
| 66 |
<label><?php esc_html_e('What industry is your booking business in?','booking'); ?></label><br> |
| 67 |
<select name="wpbc_swp_industry"> |
| 68 |
<option value="---">---</option> |
| 69 |
|
| 70 |
<optgroup label="Hospitality & Property"> |
| 71 |
<option value="property_rentals">Property Rentals</option> |
| 72 |
<option value="hotels">Hotels</option> |
| 73 |
<option value="resorts">Resorts</option> |
| 74 |
<option value="rentals">Vacation Rentals</option> |
| 75 |
<option value="coworking_spaces">Coworking Spaces</option> |
| 76 |
<option value="other_hospitality">Other</option> |
| 77 |
</optgroup> |
| 78 |
|
| 79 |
<optgroup label="Transportation & Activities"> |
| 80 |
<option value="car_rentals">Car Rentals</option> |
| 81 |
<option value="shuttles">Shuttle Services</option> |
| 82 |
<option value="limousines">Limousines</option> |
| 83 |
<option value="tour_operators">Tour Operators</option> |
| 84 |
<option value="adventure_parks">Adventure Parks</option> |
| 85 |
<option value="other_transportation">Other</option> |
| 86 |
</optgroup> |
| 87 |
|
| 88 |
<optgroup label="Events & Entertainment"> |
| 89 |
<option value="event_venues">Event Venues</option> |
| 90 |
<option value="meeting_rooms">Meeting Rooms</option> |
| 91 |
<option value="escape_rooms">Escape Rooms</option> |
| 92 |
<option value="other_events">Other</option> |
| 93 |
</optgroup> |
| 94 |
|
| 95 |
<optgroup label="Health & Wellness"> |
| 96 |
<option value="spas">Spas</option> |
| 97 |
<option value="salons">Salons</option> |
| 98 |
<option value="clinics">Clinics</option> |
| 99 |
<option value="massage_therapy">Massage Therapy</option> |
| 100 |
<option value="other_health">Other</option> |
| 101 |
</optgroup> |
| 102 |
|
| 103 |
<optgroup label="Healthcare"> |
| 104 |
<option value="doctors">Doctors</option> |
| 105 |
<option value="dentists">Dentists</option> |
| 106 |
<option value="therapists">Therapists</option> |
| 107 |
<option value="chiropractors">Chiropractors</option> |
| 108 |
<option value="acupuncturists">Acupuncturists</option> |
| 109 |
<option value="other_healthcare">Other</option> |
| 110 |
</optgroup> |
| 111 |
|
| 112 |
<optgroup label="Professional Services"> |
| 113 |
<option value="consultants">Consultants</option> |
| 114 |
<option value="lawyers">Lawyers</option> |
| 115 |
<option value="accountants">Accountants</option> |
| 116 |
<option value="financial_advisors">Financial Advisors</option> |
| 117 |
<option value="other_professional">Other</option> |
| 118 |
</optgroup> |
| 119 |
|
| 120 |
<optgroup label="Retail & E-Commerce"> |
| 121 |
<option value="product_demos">Product Demonstrations</option> |
| 122 |
<option value="fitting_appointments">Fitting Appointments</option> |
| 123 |
<option value="equipment_rentals">Equipment Rentals</option> |
| 124 |
<option value="other_retail">Other</option> |
| 125 |
</optgroup> |
| 126 |
|
| 127 |
<optgroup label="Education & Training"> |
| 128 |
<option value="tutors">Tutors</option> |
| 129 |
<option value="classes">Classes</option> |
| 130 |
<option value="schools">Schools</option> |
| 131 |
<option value="workshops">Workshops</option> |
| 132 |
<option value="other_education">Other</option> |
| 133 |
</optgroup> |
| 134 |
|
| 135 |
<optgroup label="Food & Restaurants"> |
| 136 |
<option value="table_reservations">Table Reservations</option> |
| 137 |
<option value="catering">Catering</option> |
| 138 |
<option value="banquet_halls">Banquet Halls</option> |
| 139 |
<option value="other_food">Other</option> |
| 140 |
</optgroup> |
| 141 |
|
| 142 |
<optgroup label="Creative & Technical Services"> |
| 143 |
<option value="photographers">Photographers</option> |
| 144 |
<option value="videographers">Videographers</option> |
| 145 |
<option value="web_developers">Web Developers</option> |
| 146 |
<option value="it_support">IT Support</option> |
| 147 |
<option value="art_studios">Art Studios</option> |
| 148 |
<option value="music_lessons">Music Lessons</option> |
| 149 |
<option value="other_creative">Other</option> |
| 150 |
</optgroup> |
| 151 |
|
| 152 |
<optgroup label="Legal Services"> |
| 153 |
<option value="attorneys">Attorneys</option> |
| 154 |
<option value="legal_consultants">Legal Consultants</option> |
| 155 |
<option value="other_legal">Other</option> |
| 156 |
</optgroup> |
| 157 |
|
| 158 |
<optgroup label="Childcare & Home Services"> |
| 159 |
<option value="daycares">Daycares</option> |
| 160 |
<option value="babysitting">Babysitting</option> |
| 161 |
<option value="nanny_services">Nanny Services</option> |
| 162 |
<option value="cleaners">Cleaners</option> |
| 163 |
<option value="repairs">Repair Services</option> |
| 164 |
<option value="handyman">Handyman</option> |
| 165 |
<option value="other_childcare">Other</option> |
| 166 |
</optgroup> |
| 167 |
|
| 168 |
<optgroup label="Sports & Fitness"> |
| 169 |
<option value="gyms">Gyms</option> |
| 170 |
<option value="fitness_classes">Fitness Classes</option> |
| 171 |
<option value="yoga_studios">Yoga Studios</option> |
| 172 |
<option value="golf_lessons">Golf Lessons</option> |
| 173 |
<option value="sports_equipment_rentals">Sports Equipment Rentals</option> |
| 174 |
<option value="other_sports">Other</option> |
| 175 |
</optgroup> |
| 176 |
|
| 177 |
<optgroup label="Pet Services"> |
| 178 |
<option value="veterinarians">Veterinarians</option> |
| 179 |
<option value="groomers">Pet Groomers</option> |
| 180 |
<option value="pet_sitting">Pet Sitting</option> |
| 181 |
<option value="other_pet">Other</option> |
| 182 |
</optgroup> |
| 183 |
|
| 184 |
<optgroup label="Personal Services"> |
| 185 |
<option value="coaching">Coaching</option> |
| 186 |
<option value="counseling">Counseling</option> |
| 187 |
<option value="spiritual_services">Spiritual Services</option> |
| 188 |
<option value="interior_design">Interior Design</option> |
| 189 |
<option value="other_personal">Other</option> |
| 190 |
</optgroup> |
| 191 |
|
| 192 |
<optgroup label="Other"> |
| 193 |
<option value="other">Other</option> |
| 194 |
</optgroup> |
| 195 |
</select> |
| 196 |
</div> |
| 197 |
<div class="wpbc__field"> |
| 198 |
<label><?php esc_html_e('Your Booking Email Address','booking'); ?></label><br> |
| 199 |
<input type="text" name="wpbc_swp_email" size="40" |
| 200 |
value="<?php echo esc_attr( get_option( 'admin_email' ) ); ?>" |
| 201 |
placeholder="<?php echo esc_attr( __( 'Example', 'booking' ) ) . ': ' . esc_attr( get_option( 'admin_email' ) ); ?>" |
| 202 |
/> |
| 203 |
<span style="font-size:12px;"><?php esc_html_e('You can always change this later','booking'); ?>!</span> |
| 204 |
</div> |
| 205 |
</div> |
| 206 |
<!--div class="wpbc__row"> |
| 207 |
<div class="wpbc__field"> <label>Details:</label><div class="wpbc__spacer" style="width:100%;clear:both;"></div> |
| 208 |
<span class="wpbc_wrap_textarea wpdev-form-control-wrap details4"><textarea name="details4" autocomplete="details"></textarea></span> </div> |
| 209 |
</div--> |
| 210 |
<div class="wpbc__spacer" style="width:100%;clear:both;height:40px;margin-bottom:5px;border-bottom:1px solid #ccc;"></div> |
| 211 |
<div class="wpbc__row wpbc_setup_wizard_page__section_footer"> |
| 212 |
<div class="wpbc__field"> |
| 213 |
<span class="wpdev-list-item"> |
| 214 |
<input type="checkbox" |
| 215 |
style="margin-top: 0px;" |
| 216 |
class="wpdev-validates-as-required wpdev-checkbox" |
| 217 |
id="wpbc_swp_accept_send" |
| 218 |
name="wpbc_swp_accept_send" |
| 219 |
checked="checked" |
| 220 |
value="I accept sending data" |
| 221 |
onclick=" if (jQuery(this ).is( ':checked' )) { jQuery( '#btn__toolbar__buttons_next').text( '<?php esc_attr_e( 'Save and Continue', 'booking' ); ?>' ); } else { jQuery( '#btn__toolbar__buttons_next').text( '<?php esc_attr_e( 'Skip', 'booking' ); ?>' ); } " |
| 222 |
/> |
| 223 |
<label for="wpbc_swp_accept_send" |
| 224 |
class="wpdev-list-item-label" |
| 225 |
style="font-size: 12px;font-weight: 400;"> |
| 226 |
<?php esc_html_e('By checking this box, I agree to share data from this page to personalize my setup experience, receive more relevant content, and help improve WP Booking Calendar for all users.', 'booking'); ?> |
| 227 |
</label> |
| 228 |
</span> |
| 229 |
</div> |
| 230 |
<div class="wpbc__field wpbc_container wpbc_container_booking_form"> |
| 231 |
<a style="margin-left: auto;" |
| 232 |
class="wpbc_button_light button-primary" |
| 233 |
id="btn__toolbar__buttons_next" |
| 234 |
onclick=" wpbc_ajx__setup_wizard_page__send_request_with_params( { |
| 235 |
'current_step': '{{data.steps[ data.current_step ].next}}', |
| 236 |
'do_action': '{{data.steps[ data.current_step ].do_action}}', |
| 237 |
'ui_clicked_element_id': 'btn__toolbar__buttons_next', |
| 238 |
'step_data':{ |
| 239 |
'wpbc_swp_business_name': jQuery( '[name=\'wpbc_swp_business_name\']').val(), |
| 240 |
'wpbc_swp_booking_who_setup': jQuery( '[name=\'wpbc_swp_booking_who_setup\']').val(), |
| 241 |
'wpbc_swp_industry': jQuery( '[name=\'wpbc_swp_industry\']').val(), |
| 242 |
'wpbc_swp_email': jQuery( '[name=\'wpbc_swp_email\']').val(), |
| 243 |
'wpbc_swp_accept_send': jQuery( '[name=\'wpbc_swp_accept_send\']').is( ':checked' ) ? 'On' : 'Off' |
| 244 |
} |
| 245 |
} ); |
| 246 |
wpbc_button_enable_loading_icon( this ); |
| 247 |
wpbc_admin_show_message_processing( '' );" ><span><?php esc_html_e('Save and Continue','booking'); ?> </span><i class="menu_icon icon-1x wpbc_icn_arrow_forward_ios"></i></a> |
| 248 |
</div> |
| 249 |
</div> |
| 250 |
<?php /**/ ?> |
| 251 |
<div class="wpbc__row"> |
| 252 |
<div class="wpbc__field"> |
| 253 |
<p class="wpbc_exit_link_small"> |
| 254 |
<a href="javascript:void(0)" |
| 255 |
onclick=" wpbc_ajx__setup_wizard_page__send_request_with_params( { 'do_action': 'skip_wizard' } ); " |
| 256 |
title="<?php esc_attr_e('Exit and skip the setup wizard','booking'); ?>" |
| 257 |
><?php |
| 258 |
esc_html_e('Exit and skip the setup wizard','booking'); |
| 259 |
?></a> |
| 260 |
<?php /* ?> |
| 261 |
<a href="javascript:void(0)" class="wpbc_button_danger" style="margin: 25px 0 0; font-size: 12px;" |
| 262 |
onclick=" wpbc_ajx__setup_wizard_page__send_request_with_params( { 'do_action': 'make_reset' } ); " |
| 263 |
title="<?php esc_attr_e('Reset the Setup Wizard and start from beginning','booking'); ?>" |
| 264 |
><?php |
| 265 |
esc_html_e('Reset Wizard','booking'); |
| 266 |
?></a> |
| 267 |
<?php */ ?> |
| 268 |
</p> |
| 269 |
</div> |
| 270 |
</div> |
| 271 |
<?php /**/ ?> |
| 272 |
|
| 273 |
|
| 274 |
</div> |
| 275 |
<style type="text/css"> |
| 276 |
.wpbc_ajx_page__container .wpbc_ajx_page__section_footer:not(.wpbc__row){ display: none;} |
| 277 |
</style> |
| 278 |
</div> |
| 279 |
</script><?php |
| 280 |
} |
| 281 |
|
| 282 |
|