Book Spa Services Now in Austin TX (2024)

"); } if(data.indexOf('Please choose') > 0) { $("#results").html("

" + data + "

"); } //enable all input options //$("#filter_options :input").attr("disabled", false); $(".loading").hide(); if (typeof after_load_appts == 'function') { after_load_appts(); } //now bind all the book buttons $(".bookit").off('click').on('click', function() { var day = $(this).attr("date"); var id = $(this).attr("id"); var staff_id = $(this).attr("staff"); if($("#select_" + id).hasClass("input-box")) { var time = $("#select_" + id).attr("time"); var display_time = $("#select_" + id).val(); } else { //get it from the select option var time = $("#select_" + id).val(); var display_time = $("#select_" + id + " option:selected").text(); } var date = $("#select_" + id).attr("date"); var first_name = $("#first_" + id).text(); var last_name = $("#last_" + id).text(); var appt = $("#choose_subgroup option:selected").text(); var appt_id = $("#choose_subgroup option:selected").val(); var length = $("#choose_subgroup option:selected").attr("length"); var location = $('#choose_location option:selected').val(); var type = $('#choose_group option:selected').val(); if(location == undefined || location == 'undefined') { location = 1; } //custom work for "with" being "in" or anything else instead var with_word = 'with'; if (typeof replace_with_word == 'function') { with_word = replace_with_word(); } $(".booking_info").html('

' + appt + '

on ' + day + " at " + display_time + '

' + with_word + ' ' + first_name + ' ' + last_name + '

'); fire_confirm_modal(); $("#book_appt_button").off('click').on("click", function() { $("#loading_book").show(); var url = "/apps/mindbody/bookappt.php?book_appt_ajax=true&staff_id=" + staff_id + "&date=" + date + "&time="+ time + "&session=" + appt_id + "&location=" + location + "&type=" + type + "&length=" +length; $.getJSON(url, "", function(json) { if(json.status == 'login') { if(useMindBodySSO) { var loginPage = window.origin + '/apps/mindbody/login'; window.location.assign(loginPage); return; } //store the URL without the ajax part $("#appt_to_book").val("/apps/mindbody/bookappt.php?staff_id=" + staff_id + "&date=" + date + "&time="+ time + "&session=" + appt_id + "&location=" + location + "&type=" + type + "&length=" +length); $("#hidden_day").val(day); $("#hidden_time").val(display_time); $("#hidden_sess_name").val(appt); $("#hidden_first_name").val(first_name); $("#hidden_last_name").val(last_name); $("#loading_book").hide(); $('#book_modal').modal('hide'); $(".modal-title").show(); $('#login_modal').modal({ height: 200 }); } else if(json.status == 'paymentneeded') { var url = json.url; window.location.replace(url); } else if(json.status == 'success') { booking_success(day, display_time, appt, first_name, last_name); } else { booking_error(json.message); } }); return false; }); }); if(urlParams.has('callback')) { var staffMemberId = urlParams.get('staff_id'); var date = urlParams.get('date'); var time = urlParams.get('time'); var jquerySelector = 'input[type=submit][staff=' + staffMemberId + '][rawDate=' + date + ']'; var submitAppointment = $(jquerySelector); var appointmentContainer = submitAppointment.parent().parent(); var timeInput = appointmentContainer.find('select'); timeInput.val(time); submitAppointment.trigger('click'); } }, 'error': function(data) { alert("error!"); } }); }); $("#choose_location").change(function() { $('#results').html(''); $('#choose_group').val('0'); $('#choose_subgroup').val('0'); //$('#staff_member_dropdown').find('option:gt(0)').remove(); }); $("#login_button").click(function() { login_and_after(); }); $("#password_appt").keypress(function(e) { if(e.which == 13) { login_and_after(); } }); if(useMindBodySSO) { if(urlParams.has('callback')) { loadUserSelection(urlParams); } } }); //end ready function function loadUserSelection(urlParams) { $('#choose_location').val(urlParams.get('location')); $('#choose_group').val(urlParams.get('type')).trigger('change'); var date = new Date(urlParams.get('date') * 1000); $('#appts_v2_datepicker').datepicker().val((date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear()).trigger('change'); }; function clearQueryString() { var uri = window.location.toString(); if (uri.indexOf("?") > 0) { var clean_uri = uri.substring(0, uri.indexOf("?")); window.history.replaceState({}, document.title, clean_uri); } }; function login_and_after() { $("#loading_login").show(); var email = $("#email_appt").val(); var pass = $("#password_appt").val(); var url = "/apps/mindbody/validate_login.php"; var data = {email: email, password: pass, login_ajax: "yes"}; $.ajax({ 'type': "POST", 'url': url, 'data': data, 'success': function(data) { if(data.status == 'success') { $('#login_modal').modal('hide'); //check for login element form on the page, and replace it if it is there!! if($("#mb_loginelement_loginsignup").length != 0) { $("#mb_loginelement_loginsignup").replaceWith('

Welcome, ' + data.name + '!


logout'); } var newurl = $("#appt_to_book").val(); //add the ajax part since we need it here newurl += "&book_appt_ajax=true"; $("#loading_book").hide(); //here, bring back the old modal and put the loading image over the button!! fire_confirm_modal(); } else { $("#loading_login").hide(); $("#login_error").text(data.message); } } }); } function booking_error(message) { //remove loading, show error $("#loading_book").hide(); //error here $('#book_modal').modal('hide'); //error growler le_show_error('

' + message + '

', 'Error', 5000); $(".modal-title").hide(); $("#book_appt_button").hide(); $("#book_go_back_button").hide(); $("#button_confirm").show(); } function booking_success(day, display_time, sess_name, first_name, last_name) { //clear out any errors $("#error_book").empty(); //remove loading, close modals $("#loading_book").hide(); $('#book_modal').modal('hide'); //custom work for "with" being "in" or anything else instead var with_word = 'with'; if (typeof replace_with_word == 'function') { with_word = replace_with_word(); } //do success growler here le_show_message('

You are booked on ' + day + ' at ' + display_time + ' for ' + sess_name + ' ' + with_word + ' ' + first_name + ' ' + last_name + '.

', 'Success', 5000); //replace cancel and book buttons with a big OK confirmation. $("#book_appt_button").hide(); $("#book_go_back_button").hide(); $("#button_confirm").show(); } function fire_confirm_modal() { //clear out any errors $("#error_book").empty(); //make sure the correct buttons for the confirm modal are showing! $("#book_appt_button").show(); $("#book_go_back_button").show(); $("#button_confirm").hide(); $(".modal-title").show(); $('#book_modal').modal({ height: 150 }); } function put_back_loader() { $("#results").html('

'); }

Please sign in to your account.


Forgot your password?
Need an account? Sign up here!

You are Booking:

Choose a type of appointment:

What are you looking for?

Choose a start date

Choose a staff member

Book Spa Services Now in Austin TX (2024)

References

Top Articles
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5825

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.