Fixed::When guest enters invalid order refund reason in order detail page, after clicking the submit button it become disabled and guest can not submit the reason again
This commit is contained in:
@@ -204,6 +204,8 @@ class OrderDetailControllerCore extends FrontController
|
||||
$hasError = 0;
|
||||
if (!$refundReason = Tools::getValue('cancellation_reason')) {
|
||||
$hasError = 1;
|
||||
} elseif (!Validate::isCleanHtml($refundReason)) {
|
||||
$hasError = 1;
|
||||
}
|
||||
if ($bookingRefunds = Tools::getValue('bookings_to_refund')) {
|
||||
if (!count($bookingRefunds = Tools::jsonDecode($bookingRefunds, true))) {
|
||||
|
||||
@@ -236,12 +236,14 @@ $(document).ready(function(){
|
||||
|
||||
showOrder(1, $("input[name=id_order]").val(), historyUrl)
|
||||
} else {
|
||||
showErrorMessage(refund_request_sending_error);
|
||||
showErrorMessage(refund_request_sending_error);
|
||||
$('#submit_refund_reason').attr('disabled', false);
|
||||
}
|
||||
$(".loading_overlay").hide();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
showErrorMessage(textStatus);
|
||||
$('#submit_refund_reason').attr('disabled', false);
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user