mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
ofnCancelOrderAlert can accept i18n key to customize message
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user