diff --git a/EnotaryoPH/EnotaryoPH.Web/Assets/js/Components/Dialog/_Dialog.js b/EnotaryoPH/EnotaryoPH.Web/Assets/js/Components/Dialog/_Dialog.js index 06c9cc8..d843460 100644 --- a/EnotaryoPH/EnotaryoPH.Web/Assets/js/Components/Dialog/_Dialog.js +++ b/EnotaryoPH/EnotaryoPH.Web/Assets/js/Components/Dialog/_Dialog.js @@ -1,5 +1,5 @@ jfa.components.dialog = (function () { - function _confirm({ message, title, callbackyes, callbackno }) { + function _confirm({ message, title, callbackyes, callbackno, yesLabel, noLabel }) { const dialogTemplate = jfa.page.getDialogTemplate().content; let spanTitle = dialogTemplate.querySelector(".modal__title__text"); @@ -12,6 +12,9 @@ const modal = bootstrap.Modal.getOrCreateInstance(dialog); let buttonNo = dialogTemplate.querySelector(".modal__footer__button-no"); + if (noLabel) { + buttonNo.textContent = noLabel; + } buttonNo.addEventListener("click", function () { buttonNo.blur(); modal.hide(); @@ -19,6 +22,9 @@ }); let buttonYes = dialogTemplate.querySelector(".modal__footer__button-yes"); + if (yesLabel) { + buttonYes.textContent = yesLabel; + } buttonYes.addEventListener("click", function () { buttonYes.blur(); modal.hide();