Do not display empty customer information in the booking confirmation step.
This commit is contained in:
parent
1655b0df2d
commit
f67097932f
1 changed files with 23 additions and 22 deletions
|
@ -626,6 +626,7 @@ App.Pages.Booking = (function () {
|
||||||
// Customer Details
|
// Customer Details
|
||||||
const firstName = App.Utils.String.escapeHtml($firstName.val());
|
const firstName = App.Utils.String.escapeHtml($firstName.val());
|
||||||
const lastName = App.Utils.String.escapeHtml($lastName.val());
|
const lastName = App.Utils.String.escapeHtml($lastName.val());
|
||||||
|
const fullName = firstName + ' ' + lastName;
|
||||||
const phoneNumber = App.Utils.String.escapeHtml($phoneNumber.val());
|
const phoneNumber = App.Utils.String.escapeHtml($phoneNumber.val());
|
||||||
const email = App.Utils.String.escapeHtml($email.val());
|
const email = App.Utils.String.escapeHtml($email.val());
|
||||||
const address = App.Utils.String.escapeHtml($address.val());
|
const address = App.Utils.String.escapeHtml($address.val());
|
||||||
|
@ -641,30 +642,30 @@ App.Pages.Booking = (function () {
|
||||||
}),
|
}),
|
||||||
$('<p/>', {
|
$('<p/>', {
|
||||||
'html': [
|
'html': [
|
||||||
$('<span/>', {
|
fullName ? $('<span/>', {
|
||||||
'text': lang('customer') + ': ' + firstName + ' ' + lastName
|
'text': lang('customer') + ': ' + fullName
|
||||||
}),
|
}) : null,
|
||||||
$('<br/>'),
|
fullName ? $('<br/>') : null,
|
||||||
$('<span/>', {
|
phoneNumber ? $('<span/>', {
|
||||||
'text': lang('phone_number') + ': ' + phoneNumber
|
'text': lang('phone_number') + ': ' + phoneNumber
|
||||||
}),
|
}) : null,
|
||||||
$('<br/>'),
|
phoneNumber ? $('<br/>') : null,
|
||||||
$('<span/>', {
|
email ? $('<span/>', {
|
||||||
'text': lang('email') + ': ' + email
|
'text': lang('email') + ': ' + email
|
||||||
}),
|
}) : null,
|
||||||
$('<br/>'),
|
email ? $('<br/>') : null,
|
||||||
$('<span/>', {
|
address ? $('<span/>', {
|
||||||
'text': address ? lang('address') + ': ' + address : ''
|
'text': lang('address') + ': ' + address
|
||||||
}),
|
}) : null,
|
||||||
$('<br/>'),
|
address ? $('<br/>') : null,
|
||||||
$('<span/>', {
|
city ? $('<span/>', {
|
||||||
'text': city ? lang('city') + ': ' + city : ''
|
'text': lang('city') + ': ' + city,
|
||||||
}),
|
}) : null,
|
||||||
$('<br/>'),
|
city ? $('<br/>') : null,
|
||||||
$('<span/>', {
|
zipCode ? $('<span/>', {
|
||||||
'text': zipCode ? lang('zip_code') + ': ' + zipCode : ''
|
'text': lang('zip_code') + ': ' + zipCode
|
||||||
}),
|
}) : null,
|
||||||
$('<br/>')
|
zipCode ? $('<br/>') : null
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue