From dd95c1ed8af0c285ca52b7eee8fd8b8bf4e5e611 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 7 May 2021 08:48:38 +0200 Subject: [PATCH] set title of modal box from data-modal-title --- views/bootstrap4/styles/application.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index 09b7efa46..0798e8c89 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -281,6 +281,9 @@ $(document).ready( function() { $('body').on('click', '[data-toggle="modal"]', function(ev){ ev.preventDefault(); $($(this).data("target")+' .modal-body').load($(this).data("remote")); + /* Also set the title */ + if($(this).data("modal-title")) + $($(this).data("target")+' .modal-header h3').html($(this).data("modal-title")); }); // $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });