Commit d6224ad4 authored by droces's avatar droces

moved 'show_thank_you_dialog()' into own function

parent ea363583
......@@ -163,6 +163,8 @@ Drupal.behaviors.abookings = {
});
refresh_main_info();
// show_thank_you_dialog('test', booking_info_container);
}
};
......@@ -512,26 +514,7 @@ function save_booking(data_object, type, success_callbacks, always_callbacks) {
booking_info_container.find('.message_container')
.find('[class*="messages"]').remove();
var message_text = '<div><p>Thank you for booking with us! '
+ 'We have sent you an email with your provisional booking information.</p>'
+ '<p>Your reference number is <strong>' + data.nid + '</strong></p></div>';
var message = $(message_text)
.appendTo(booking_info_container.find('.message_container'))
.dialog({
title: 'Booking successful',
dialogClass: 'no-close',
modal: true,
show: 300,
width: 450,
buttons: [
{
text: "Okay",
click: function() {
$( this ).dialog( "close" );
}
}
]
});
show_thank_you_dialog(data.nid, booking_info_container);
Drupal.abookings.invoke_callbacks(success_callbacks);
});
......@@ -545,6 +528,30 @@ function save_booking(data_object, type, success_callbacks, always_callbacks) {
}
function show_thank_you_dialog(nid, container) {
var message_text = '<div><p>Thank you for booking with us! '
+ 'We have sent you an email with your provisional booking information.</p>'
+ '<p>Your reference number is <strong>' + nid + '</strong></p></div>';
var message = $(message_text)
.appendTo(container.find('.message_container'))
.dialog({
title: 'Booking successful',
dialogClass: 'no-close',
modal: true,
show: 300,
width: 450,
buttons: [
{
text: "Okay",
click: function() {
$( this ).dialog( "close" );
}
}
]
});
}
function get_addons_sum(type) {
var sum = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment