Changeset 3440632
- Timestamp:
- 01/15/2026 09:44:44 PM (3 months ago)
- Location:
- box-tracker
- Files:
-
- 14 edited
- 1 copied
-
tags/2.4.1 (copied) (copied from box-tracker/trunk)
-
tags/2.4.1/box-tracker-online.php (modified) (1 diff)
-
tags/2.4.1/includes/base/ajax-control.php (modified) (8 diffs)
-
tags/2.4.1/includes/base/server-calls.php (modified) (1 diff)
-
tags/2.4.1/javascript/front-house-script.js (modified) (5 diffs)
-
tags/2.4.1/readme.txt (modified) (1 diff)
-
tags/2.4.1/templates/front-house-step-four-template.php (modified) (1 diff)
-
tags/2.4.1/templates/front-house-step-two-template.php (modified) (1 diff)
-
trunk/box-tracker-online.php (modified) (1 diff)
-
trunk/includes/base/ajax-control.php (modified) (8 diffs)
-
trunk/includes/base/server-calls.php (modified) (1 diff)
-
trunk/javascript/front-house-script.js (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/templates/front-house-step-four-template.php (modified) (1 diff)
-
trunk/templates/front-house-step-two-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box-tracker/tags/2.4.1/box-tracker-online.php
r3425645 r3440632 8 8 Plugin URI: https://www.dumpster.software/api/word-press-plugin.html 9 9 Description: The Box Tracker plugin facilitates online ordering for waste haulers. Depending on configuration, orders will result either in service requests on the customer screen or fully booked work orders on dispatch. Using the Web API tab on Box Tracker's Preferences app, you can prevent over booking, control which days of the week online orders will be accepted, and prevent same day ordering. For more information about Box Tracker or this plugin please contact support at 603 546 6751 option 2 or support@cairnapps.com 10 Version: 2.4. 010 Version: 2.4.1 11 11 Author: Cairn Applications Inc 12 12 Author URI: https://www.cloud-computing.rocks/ -
box-tracker/tags/2.4.1/includes/base/ajax-control.php
r3425645 r3440632 360 360 361 361 //terms and conditions 362 $termsUrl = wp_http_validate_url($b0xT_pricing_query->termsUrl) ? $b0xT_pricing_query->termsUrl : ""; 363 $apiUseTerms = is_numeric($b0xT_pricing_query->apiUseTerms) ? $b0xT_pricing_query->apiUseTerms : 0; 362 $b0xT_termsUrl = wp_http_validate_url($b0xT_pricing_query->termsUrl) ? $b0xT_pricing_query->termsUrl : ""; 363 $b0xT_apiUseTerms = is_numeric($b0xT_pricing_query->apiUseTerms) ? $b0xT_pricing_query->apiUseTerms : 0; 364 365 //pick up date 366 $b0xT_use_pick_up_date = is_numeric($b0xT_pricing_query->usePickUpDate) ? $b0xT_pricing_query->usePickUpDate : 0; 364 367 365 368 //add some variables to sessions for other forms, all sanitized … … 388 391 'b0xT_availability_table_show_view' => $b0xT_availability_table_show_view, 389 392 'b0xT_pricingquery_response' => $b0xT_pricing_query, 390 'b0xT_termsURL' => $termsUrl, 391 'b0xT_apiUseTerms' => $apiUseTerms, 393 'b0xT_termsURL' => $b0xT_termsUrl, 394 'b0xT_apiUseTerms' => $b0xT_apiUseTerms, 395 'b0xT_use_pick_up_date' => $b0xT_use_pick_up_date, 392 396 'debug' => '' 393 397 ); … … 472 476 $b0xT_date_requested = sanitize_text_field($_POST['b0xT_date_requested']); 473 477 $b0xT_date_requested_formated = date_format(date_create($b0xT_date_requested), "Y-m-d"); 478 $b0xT_pick_up_date_formated = null; 474 479 475 480 if($b0xT_service_type == "") { … … 483 488 if($b0xT_date_requested == "") { 484 489 $b0xT_field_errors['b0xT_date_requested'] = 'Please enter job request date'; 490 } 491 492 if(isset($_POST['b0xT_pick_up_date'])) { 493 $b0xT_pick_up_date = sanitize_text_field($_POST['b0xT_pick_up_date']); 494 if($b0xT_pick_up_date == "") { 495 $b0xT_field_errors['b0xT_pick_up_date'] = 'Please enter job pick up date'; 496 } else { 497 $b0xT_pick_up_date_formated = date_format(date_create($b0xT_pick_up_date), "Y-m-d"); 498 499 if(strtotime($b0xT_date_requested_formated) > strtotime($b0xT_pick_up_date_formated)) { 500 $b0xT_field_errors['b0xT_pick_up_date'] = 'Please fix! pick up date cant be greater than delivery date'; 501 } 502 } 485 503 } 486 504 … … 663 681 if(!isset($b0xT_selected_price_sheet)) { 664 682 wp_send_json($this->b0xT_response('error', 'No pricing information available please contact our office.', '')); 683 } 684 685 if(!($b0xT_pick_up_date_formated == null)) { 686 $b0xT_handshake = $this->b0xT_server_calls->b0xT_handshake(); //b0xT_handshake() sanitizes values 687 if($b0xT_handshake && $b0xT_handshake->status == '200') { 688 689 $b0xT_extra_days = $this->b0xT_server_calls->b0xT_calculate_extra_days($b0xT_handshake->key, $b0xT_selected_price_sheet['b0xT_price_sheet_id'], $b0xT_job_zipcode, $b0xT_container_size, $b0xT_date_requested_formated, $b0xT_pick_up_date_formated); //b0xT_handshake() sanitizes values 690 691 if($b0xT_extra_days && $b0xT_extra_days->status == '200') { 692 $b0xT_selected_price_sheet['b0xT_total_amount'] = $b0xT_extra_days->Total; 693 $b0xT_selected_price_sheet['b0xT_sub_total'] = $b0xT_extra_days->SubTotal; 694 $b0xT_selected_price_sheet['b0xT_taxes'] = $b0xT_extra_days->Taxes; 695 } else { 696 $b0xT_message = 'Status: '.$b0xT_extra_days->status.'<br>Error: '.$b0xT_extra_days->errorString; 697 wp_send_json($this->b0xT_response('error', $b0xT_message, '')); 698 } 699 } else { 700 $b0xT_message = 'Status: '.$b0xT_handshake->status.'<br>Error: '.$b0xT_handshake->errorString; 701 wp_send_json($this->b0xT_response('error', $b0xT_message, '')); 702 } 665 703 } 666 704 … … 685 723 $_SESSION['b0xT_ssession']['priceSheetID'] = $b0xT_price_sheets_id; 686 724 $_SESSION['b0xT_ssession']['priceSheetArray'] = $b0xT_selected_price_sheet; 725 726 if(!($b0xT_pick_up_date_formated == null)) { 727 $_SESSION['b0xT_ssession']['pick_up_date'] = $b0xT_pick_up_date_formated; 728 } else { 729 if(isset($_SESSION['b0xT_ssession']['pick_up_date'])) { 730 unset($_SESSION['b0xT_ssession']['pick_up_date']); 731 } 732 } 687 733 688 734 $b0xT_billing_field_data = array( … … 911 957 ); 912 958 959 if(isset($_SESSION['b0xT_ssession']['pick_up_date'])) { 960 $b0xT_review_data['b0xT_review_pick_up_date'] = sanitize_text_field($_SESSION['b0xT_ssession']['pick_up_date']); 961 } 962 913 963 wp_send_json($this->b0xT_response('success', 'review phase', $b0xT_review_data)); 914 964 } … … 961 1011 ); 962 1012 1013 if(isset($_SESSION['b0xT_ssession']['pick_up_date'])) { 1014 $b0xT_user_order_data['pickUpDate'] = sanitize_text_field($_SESSION['b0xT_ssession']['pick_up_date']); 1015 } 1016 963 1017 $b0xT_user_card_data = array(); 964 1018 -
box-tracker/tags/2.4.1/includes/base/server-calls.php
r3333091 r3440632 29 29 $b0xT_user_credentials_query_string = http_build_query($b0xT_user_credentials); 30 30 $b0xT_response = wp_remote_post($this->b0xT_boxT_url, array('body' => $b0xT_user_credentials_query_string)); 31 return $this->b0xT_sanitize_reponse(json_decode($b0xT_response['body'])); 32 } 33 /** 34 * get prices for display 35 * 36 * @param string $b0xT_key 37 * @param string $b0xT_delivery_date 38 * @param string $b0xT_pick_up_date 39 * @param string $b0xT_asset_class 40 * @param string $user_zipcode 41 * @return array 42 */ 43 function b0xT_calculate_extra_days($b0xT_key, $b0xT_price_sheets_id, $b0xT_user_zipcode, $b0xT_asset_class, $b0xT_delivery_date, $b0xT_pick_up_date) { 44 $b0xT_username = sanitize_text_field(get_option('b0xT_username')); 45 $b0xT_key = sanitize_text_field($b0xT_key); 46 $b0xT_price_sheets_id = sanitize_text_field($b0xT_price_sheets_id); 47 $b0xT_user_zipcode = sanitize_text_field($b0xT_user_zipcode); 48 $b0xT_asset_class = sanitize_text_field($b0xT_asset_class); 49 $b0xT_delivery_date = sanitize_text_field($b0xT_delivery_date); 50 $b0xT_pick_up_date = sanitize_text_field($b0xT_pick_up_date); 51 52 $b0xT_user_pricingquery = array( 53 'command' => 'cmdBoxTWebAPIPricingSheet', 54 'username' => $b0xT_username, 55 'key' => $b0xT_key, 56 'zipPostalCode' => $b0xT_user_zipcode, 57 'priceSheetID' => $b0xT_price_sheets_id, 58 'assetClass' => $b0xT_asset_class, 59 'dateRequested' => $b0xT_delivery_date, 60 'pickUpDate' => $b0xT_pick_up_date 61 ); 62 63 $b0xT_user_pricingquery_query_string = http_build_query($b0xT_user_pricingquery); 64 $b0xT_response = wp_remote_post($this->b0xT_boxT_url, array('body' => $b0xT_user_pricingquery_query_string)); 31 65 return $this->b0xT_sanitize_reponse(json_decode($b0xT_response['body'])); 32 66 } -
box-tracker/tags/2.4.1/javascript/front-house-script.js
r3425645 r3440632 64 64 $('#b0xT_pricingquery_response_show').html(JSON.stringify(response.data.b0xT_pricingquery_response)); 65 65 $("#b0xT_date_requested").datepicker({ dateFormat: 'M dd,yy', minDate: response.data.b0xT_date_diff, maxDate : response.data.b0xT_date_last}); 66 67 var b0xT_display_pick_date = function(b0xT_argDisplay) { 68 $("#b0xT_pick_up_date_place_hold").css('display', b0xT_argDisplay); 69 }; 70 71 if((response.data.b0xT_use_pick_up_date * 1) == 1) { 72 if($("#b0xT_pick_up_date").length > 0) { 73 //Do nothing if exist already!! 74 } else { 75 $("#b0xT_pick_up_date_place_hold").html('<label>Pick Up Date:<span style="color: red">*</span></label><input type="text" id="b0xT_pick_up_date" class="b0xT_form-input " name="b0xT_pick_up_date" value=""/>'); 76 77 $("#b0xT_pick_up_date" ).change(function(b0xT_E) { 78 $('.b0xT-error-msg').remove(); 79 b0xT_E.preventDefault(); 80 b0xT_availability_search_ajax_call($('input[name=b0xT_pick_up_date]').val()); 81 82 if($("#b0xT_date_requested" ).length > 0) { //validate both 83 b0xT_availability_search_ajax_call($('input[name=b0xT_date_requested]').val()); 84 } 85 }); 86 } 87 88 b0xT_display_pick_date('block'); 89 var b0xT_pick_up_date_pre_value = $('#b0xT_pick_up_date').val(); 90 $('#b0xT_pick_up_date').val(response.data.b0xT_date_requested); 91 if(b0xT_pick_up_date_pre_value) { $('#b0xT_pick_up_date').val(b0xT_pick_up_date_pre_value); }; 92 $("#b0xT_pick_up_date").datepicker({ dateFormat: 'M dd,yy', minDate: response.data.b0xT_date_diff, maxDate : response.data.b0xT_date_last}); 93 } else { 94 $("#b0xT_pick_up_date_place_hold").empty(); 95 b0xT_display_pick_date('none'); 96 } 97 66 98 b0xT_show_steps(b0xT_show_this); 67 68 99 b0xT_set_terms_behaviors(response.data.b0xT_termsURL, response.data.b0xT_apiUseTerms); 69 100 } else{ … … 153 184 'b0xT_step': b0xT_current_step 154 185 }; 186 187 if($("#b0xT_pick_up_date").length > 0) { 188 formData['b0xT_pick_up_date'] = $('input[name=b0xT_pick_up_date]').val(); 189 } 155 190 156 191 $(".b0xT_loader").show(); … … 296 331 297 332 //delivery date 298 $('#b0xT_review_step_delivery_date').html(response.data.b0xT_review_date_requested); 333 $('#b0xT_review_step_delivery_date').html('<div><strong>Delivery: </strong>'+response.data.b0xT_review_date_requested+'</div>'); 334 335 //pick up date 336 if(response.data.b0xT_review_pick_up_date) { 337 $('#b0xT_review_step_delivery_date').html('<div><strong>Delivery: </strong>'+response.data.b0xT_review_date_requested+'</div>'+'<div><strong>Pick Up: </strong>'+response.data.b0xT_review_pick_up_date+'</div>'); 338 } 299 339 300 340 //pricing … … 394 434 $('.b0xT-error-msg').remove(); 395 435 b0xT_E.preventDefault(); 436 b0xT_availability_search_ajax_call($('input[name=b0xT_date_requested]').val()); 437 438 if($("#b0xT_pick_up_date" ).length > 0) { //validate both 439 b0xT_availability_search_ajax_call($('input[name=b0xT_pick_up_date]').val()); 440 } 441 }); 442 443 function b0xT_availability_search_ajax_call(b0xT_date_value) { 396 444 var formData = { 397 445 'action': 'b0xT_availability_search', 398 'b0xT_date_requested': $('input[name=b0xT_date_requested]').val(),446 'b0xT_date_requested': b0xT_date_value, 399 447 'b0xT_nonce': b0xT_config.ajax_nonce 400 448 }; … … 416 464 } 417 465 }); 418 }); 466 } 467 419 468 420 469 function b0xT_clean_phone() { -
box-tracker/tags/2.4.1/readme.txt
r3425645 r3440632 4 4 Requires PHP: 5.6.4 5 5 Tested up to: 6.8 6 Stable tag: 2.4. 06 Stable tag: 2.4.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
box-tracker/tags/2.4.1/templates/front-house-step-four-template.php
r3354881 r3440632 19 19 <div class="b0xT_column-16"> 20 20 <div class="b0xT_field-row"> 21 <label><strong> Delivery Date:</strong></label>21 <label><strong>Service Date(s):</strong></label> 22 22 </div> 23 23 </div> -
box-tracker/tags/2.4.1/templates/front-house-step-two-template.php
r2616677 r3440632 8 8 <label>Date Requested:<span style="color: red">*</span></label> 9 9 <input type="text" id="b0xT_date_requested" class="b0xT_form-input " name="b0xT_date_requested" value=""/> 10 </div> 11 <div class="b0xT_field-row" id="b0xT_pick_up_date_place_hold" style="display: none"> 12 10 13 </div> 11 14 </div> -
box-tracker/trunk/box-tracker-online.php
r3425645 r3440632 8 8 Plugin URI: https://www.dumpster.software/api/word-press-plugin.html 9 9 Description: The Box Tracker plugin facilitates online ordering for waste haulers. Depending on configuration, orders will result either in service requests on the customer screen or fully booked work orders on dispatch. Using the Web API tab on Box Tracker's Preferences app, you can prevent over booking, control which days of the week online orders will be accepted, and prevent same day ordering. For more information about Box Tracker or this plugin please contact support at 603 546 6751 option 2 or support@cairnapps.com 10 Version: 2.4. 010 Version: 2.4.1 11 11 Author: Cairn Applications Inc 12 12 Author URI: https://www.cloud-computing.rocks/ -
box-tracker/trunk/includes/base/ajax-control.php
r3425645 r3440632 360 360 361 361 //terms and conditions 362 $termsUrl = wp_http_validate_url($b0xT_pricing_query->termsUrl) ? $b0xT_pricing_query->termsUrl : ""; 363 $apiUseTerms = is_numeric($b0xT_pricing_query->apiUseTerms) ? $b0xT_pricing_query->apiUseTerms : 0; 362 $b0xT_termsUrl = wp_http_validate_url($b0xT_pricing_query->termsUrl) ? $b0xT_pricing_query->termsUrl : ""; 363 $b0xT_apiUseTerms = is_numeric($b0xT_pricing_query->apiUseTerms) ? $b0xT_pricing_query->apiUseTerms : 0; 364 365 //pick up date 366 $b0xT_use_pick_up_date = is_numeric($b0xT_pricing_query->usePickUpDate) ? $b0xT_pricing_query->usePickUpDate : 0; 364 367 365 368 //add some variables to sessions for other forms, all sanitized … … 388 391 'b0xT_availability_table_show_view' => $b0xT_availability_table_show_view, 389 392 'b0xT_pricingquery_response' => $b0xT_pricing_query, 390 'b0xT_termsURL' => $termsUrl, 391 'b0xT_apiUseTerms' => $apiUseTerms, 393 'b0xT_termsURL' => $b0xT_termsUrl, 394 'b0xT_apiUseTerms' => $b0xT_apiUseTerms, 395 'b0xT_use_pick_up_date' => $b0xT_use_pick_up_date, 392 396 'debug' => '' 393 397 ); … … 472 476 $b0xT_date_requested = sanitize_text_field($_POST['b0xT_date_requested']); 473 477 $b0xT_date_requested_formated = date_format(date_create($b0xT_date_requested), "Y-m-d"); 478 $b0xT_pick_up_date_formated = null; 474 479 475 480 if($b0xT_service_type == "") { … … 483 488 if($b0xT_date_requested == "") { 484 489 $b0xT_field_errors['b0xT_date_requested'] = 'Please enter job request date'; 490 } 491 492 if(isset($_POST['b0xT_pick_up_date'])) { 493 $b0xT_pick_up_date = sanitize_text_field($_POST['b0xT_pick_up_date']); 494 if($b0xT_pick_up_date == "") { 495 $b0xT_field_errors['b0xT_pick_up_date'] = 'Please enter job pick up date'; 496 } else { 497 $b0xT_pick_up_date_formated = date_format(date_create($b0xT_pick_up_date), "Y-m-d"); 498 499 if(strtotime($b0xT_date_requested_formated) > strtotime($b0xT_pick_up_date_formated)) { 500 $b0xT_field_errors['b0xT_pick_up_date'] = 'Please fix! pick up date cant be greater than delivery date'; 501 } 502 } 485 503 } 486 504 … … 663 681 if(!isset($b0xT_selected_price_sheet)) { 664 682 wp_send_json($this->b0xT_response('error', 'No pricing information available please contact our office.', '')); 683 } 684 685 if(!($b0xT_pick_up_date_formated == null)) { 686 $b0xT_handshake = $this->b0xT_server_calls->b0xT_handshake(); //b0xT_handshake() sanitizes values 687 if($b0xT_handshake && $b0xT_handshake->status == '200') { 688 689 $b0xT_extra_days = $this->b0xT_server_calls->b0xT_calculate_extra_days($b0xT_handshake->key, $b0xT_selected_price_sheet['b0xT_price_sheet_id'], $b0xT_job_zipcode, $b0xT_container_size, $b0xT_date_requested_formated, $b0xT_pick_up_date_formated); //b0xT_handshake() sanitizes values 690 691 if($b0xT_extra_days && $b0xT_extra_days->status == '200') { 692 $b0xT_selected_price_sheet['b0xT_total_amount'] = $b0xT_extra_days->Total; 693 $b0xT_selected_price_sheet['b0xT_sub_total'] = $b0xT_extra_days->SubTotal; 694 $b0xT_selected_price_sheet['b0xT_taxes'] = $b0xT_extra_days->Taxes; 695 } else { 696 $b0xT_message = 'Status: '.$b0xT_extra_days->status.'<br>Error: '.$b0xT_extra_days->errorString; 697 wp_send_json($this->b0xT_response('error', $b0xT_message, '')); 698 } 699 } else { 700 $b0xT_message = 'Status: '.$b0xT_handshake->status.'<br>Error: '.$b0xT_handshake->errorString; 701 wp_send_json($this->b0xT_response('error', $b0xT_message, '')); 702 } 665 703 } 666 704 … … 685 723 $_SESSION['b0xT_ssession']['priceSheetID'] = $b0xT_price_sheets_id; 686 724 $_SESSION['b0xT_ssession']['priceSheetArray'] = $b0xT_selected_price_sheet; 725 726 if(!($b0xT_pick_up_date_formated == null)) { 727 $_SESSION['b0xT_ssession']['pick_up_date'] = $b0xT_pick_up_date_formated; 728 } else { 729 if(isset($_SESSION['b0xT_ssession']['pick_up_date'])) { 730 unset($_SESSION['b0xT_ssession']['pick_up_date']); 731 } 732 } 687 733 688 734 $b0xT_billing_field_data = array( … … 911 957 ); 912 958 959 if(isset($_SESSION['b0xT_ssession']['pick_up_date'])) { 960 $b0xT_review_data['b0xT_review_pick_up_date'] = sanitize_text_field($_SESSION['b0xT_ssession']['pick_up_date']); 961 } 962 913 963 wp_send_json($this->b0xT_response('success', 'review phase', $b0xT_review_data)); 914 964 } … … 961 1011 ); 962 1012 1013 if(isset($_SESSION['b0xT_ssession']['pick_up_date'])) { 1014 $b0xT_user_order_data['pickUpDate'] = sanitize_text_field($_SESSION['b0xT_ssession']['pick_up_date']); 1015 } 1016 963 1017 $b0xT_user_card_data = array(); 964 1018 -
box-tracker/trunk/includes/base/server-calls.php
r3333091 r3440632 29 29 $b0xT_user_credentials_query_string = http_build_query($b0xT_user_credentials); 30 30 $b0xT_response = wp_remote_post($this->b0xT_boxT_url, array('body' => $b0xT_user_credentials_query_string)); 31 return $this->b0xT_sanitize_reponse(json_decode($b0xT_response['body'])); 32 } 33 /** 34 * get prices for display 35 * 36 * @param string $b0xT_key 37 * @param string $b0xT_delivery_date 38 * @param string $b0xT_pick_up_date 39 * @param string $b0xT_asset_class 40 * @param string $user_zipcode 41 * @return array 42 */ 43 function b0xT_calculate_extra_days($b0xT_key, $b0xT_price_sheets_id, $b0xT_user_zipcode, $b0xT_asset_class, $b0xT_delivery_date, $b0xT_pick_up_date) { 44 $b0xT_username = sanitize_text_field(get_option('b0xT_username')); 45 $b0xT_key = sanitize_text_field($b0xT_key); 46 $b0xT_price_sheets_id = sanitize_text_field($b0xT_price_sheets_id); 47 $b0xT_user_zipcode = sanitize_text_field($b0xT_user_zipcode); 48 $b0xT_asset_class = sanitize_text_field($b0xT_asset_class); 49 $b0xT_delivery_date = sanitize_text_field($b0xT_delivery_date); 50 $b0xT_pick_up_date = sanitize_text_field($b0xT_pick_up_date); 51 52 $b0xT_user_pricingquery = array( 53 'command' => 'cmdBoxTWebAPIPricingSheet', 54 'username' => $b0xT_username, 55 'key' => $b0xT_key, 56 'zipPostalCode' => $b0xT_user_zipcode, 57 'priceSheetID' => $b0xT_price_sheets_id, 58 'assetClass' => $b0xT_asset_class, 59 'dateRequested' => $b0xT_delivery_date, 60 'pickUpDate' => $b0xT_pick_up_date 61 ); 62 63 $b0xT_user_pricingquery_query_string = http_build_query($b0xT_user_pricingquery); 64 $b0xT_response = wp_remote_post($this->b0xT_boxT_url, array('body' => $b0xT_user_pricingquery_query_string)); 31 65 return $this->b0xT_sanitize_reponse(json_decode($b0xT_response['body'])); 32 66 } -
box-tracker/trunk/javascript/front-house-script.js
r3425645 r3440632 64 64 $('#b0xT_pricingquery_response_show').html(JSON.stringify(response.data.b0xT_pricingquery_response)); 65 65 $("#b0xT_date_requested").datepicker({ dateFormat: 'M dd,yy', minDate: response.data.b0xT_date_diff, maxDate : response.data.b0xT_date_last}); 66 67 var b0xT_display_pick_date = function(b0xT_argDisplay) { 68 $("#b0xT_pick_up_date_place_hold").css('display', b0xT_argDisplay); 69 }; 70 71 if((response.data.b0xT_use_pick_up_date * 1) == 1) { 72 if($("#b0xT_pick_up_date").length > 0) { 73 //Do nothing if exist already!! 74 } else { 75 $("#b0xT_pick_up_date_place_hold").html('<label>Pick Up Date:<span style="color: red">*</span></label><input type="text" id="b0xT_pick_up_date" class="b0xT_form-input " name="b0xT_pick_up_date" value=""/>'); 76 77 $("#b0xT_pick_up_date" ).change(function(b0xT_E) { 78 $('.b0xT-error-msg').remove(); 79 b0xT_E.preventDefault(); 80 b0xT_availability_search_ajax_call($('input[name=b0xT_pick_up_date]').val()); 81 82 if($("#b0xT_date_requested" ).length > 0) { //validate both 83 b0xT_availability_search_ajax_call($('input[name=b0xT_date_requested]').val()); 84 } 85 }); 86 } 87 88 b0xT_display_pick_date('block'); 89 var b0xT_pick_up_date_pre_value = $('#b0xT_pick_up_date').val(); 90 $('#b0xT_pick_up_date').val(response.data.b0xT_date_requested); 91 if(b0xT_pick_up_date_pre_value) { $('#b0xT_pick_up_date').val(b0xT_pick_up_date_pre_value); }; 92 $("#b0xT_pick_up_date").datepicker({ dateFormat: 'M dd,yy', minDate: response.data.b0xT_date_diff, maxDate : response.data.b0xT_date_last}); 93 } else { 94 $("#b0xT_pick_up_date_place_hold").empty(); 95 b0xT_display_pick_date('none'); 96 } 97 66 98 b0xT_show_steps(b0xT_show_this); 67 68 99 b0xT_set_terms_behaviors(response.data.b0xT_termsURL, response.data.b0xT_apiUseTerms); 69 100 } else{ … … 153 184 'b0xT_step': b0xT_current_step 154 185 }; 186 187 if($("#b0xT_pick_up_date").length > 0) { 188 formData['b0xT_pick_up_date'] = $('input[name=b0xT_pick_up_date]').val(); 189 } 155 190 156 191 $(".b0xT_loader").show(); … … 296 331 297 332 //delivery date 298 $('#b0xT_review_step_delivery_date').html(response.data.b0xT_review_date_requested); 333 $('#b0xT_review_step_delivery_date').html('<div><strong>Delivery: </strong>'+response.data.b0xT_review_date_requested+'</div>'); 334 335 //pick up date 336 if(response.data.b0xT_review_pick_up_date) { 337 $('#b0xT_review_step_delivery_date').html('<div><strong>Delivery: </strong>'+response.data.b0xT_review_date_requested+'</div>'+'<div><strong>Pick Up: </strong>'+response.data.b0xT_review_pick_up_date+'</div>'); 338 } 299 339 300 340 //pricing … … 394 434 $('.b0xT-error-msg').remove(); 395 435 b0xT_E.preventDefault(); 436 b0xT_availability_search_ajax_call($('input[name=b0xT_date_requested]').val()); 437 438 if($("#b0xT_pick_up_date" ).length > 0) { //validate both 439 b0xT_availability_search_ajax_call($('input[name=b0xT_pick_up_date]').val()); 440 } 441 }); 442 443 function b0xT_availability_search_ajax_call(b0xT_date_value) { 396 444 var formData = { 397 445 'action': 'b0xT_availability_search', 398 'b0xT_date_requested': $('input[name=b0xT_date_requested]').val(),446 'b0xT_date_requested': b0xT_date_value, 399 447 'b0xT_nonce': b0xT_config.ajax_nonce 400 448 }; … … 416 464 } 417 465 }); 418 }); 466 } 467 419 468 420 469 function b0xT_clean_phone() { -
box-tracker/trunk/readme.txt
r3425645 r3440632 4 4 Requires PHP: 5.6.4 5 5 Tested up to: 6.8 6 Stable tag: 2.4. 06 Stable tag: 2.4.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
box-tracker/trunk/templates/front-house-step-four-template.php
r3354881 r3440632 19 19 <div class="b0xT_column-16"> 20 20 <div class="b0xT_field-row"> 21 <label><strong> Delivery Date:</strong></label>21 <label><strong>Service Date(s):</strong></label> 22 22 </div> 23 23 </div> -
box-tracker/trunk/templates/front-house-step-two-template.php
r2616677 r3440632 8 8 <label>Date Requested:<span style="color: red">*</span></label> 9 9 <input type="text" id="b0xT_date_requested" class="b0xT_form-input " name="b0xT_date_requested" value=""/> 10 </div> 11 <div class="b0xT_field-row" id="b0xT_pick_up_date_place_hold" style="display: none"> 12 10 13 </div> 11 14 </div>
Note: See TracChangeset
for help on using the changeset viewer.