From c664b0a4bf3f5ac1f17c0196f40a53327f8f82db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 6 May 2023 21:43:23 +0200 Subject: [PATCH] RVRNEXT-38 make it possible to show fa-icons in confirmation modals --- public/static/js/rvr.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/static/js/rvr.js b/public/static/js/rvr.js index b895c0e..7a1a5c8 100644 --- a/public/static/js/rvr.js +++ b/public/static/js/rvr.js @@ -97,7 +97,7 @@ var RVR = { RVR.showModalWithContent('Confirmation', this.dataset.confirmation, [ { type: 'button', - text: self.textContent, + html: this.dataset.confirmationButton ? this.dataset.confirmationButton : this.innerHTML, classNames: ['red'], onclick: function() { var event = new Event('submit', {'bubbles': true, 'cancelable': true}); @@ -147,7 +147,11 @@ var RVR = { button.classList.add('marginTop'); button.classList.add('marginRight'); - button.textContent = extraButton.text; + if (typeof extraButton.html !== 'undefined') { + button.innerHTML = extraButton.html; + } else { + button.textContent = extraButton.text; + } if (extraButton.type === 'a') { button.href = extraButton.href;