ofnCancelOrderAlert can accept i18n key to customize message

This commit is contained in:
Jean-Baptiste Bellet
2022-03-25 11:10:54 +01:00
parent b9efda9f64
commit a71e95da27

View File

@@ -194,9 +194,12 @@ ofnAlert = function(message) {
$('#custom-alert').show();
}
ofnCancelOrderAlert = function(callback) {
ofnCancelOrderAlert = function(callback, i18nKey) {
if (i18nKey == undefined) {
i18nKey = "js.admin.orders.cancel_the_order_html";
}
$('#custom-confirm .message').html(
` ${t("js.admin.orders.cancel_the_order_html")}
` ${t(i18nKey)}
<div class="form">
<input type="checkbox" name="send_cancellation_email" value="1" id="send_cancellation_email" />
<label for="send_cancellation_email">${t("js.admin.orders.cancel_the_order_send_cancelation_email")}</label>