diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl
index 5ea003e5ec1..33d8a2f9632 100644
--- a/templates/admin/notice.tmpl
+++ b/templates/admin/notice.tmpl
@@ -62,10 +62,7 @@
{{template "admin/layout_footer" .}}
diff --git a/web_src/js/features/admin/common.js b/web_src/js/features/admin/common.js
index f388b1122ec..b35502d52f9 100644
--- a/web_src/js/features/admin/common.js
+++ b/web_src/js/features/admin/common.js
@@ -207,13 +207,13 @@ export function initAdminCommon() {
// Notice
if (document.querySelector('.admin.notice')) {
- const $detailModal = document.getElementById('detail-modal');
+ const detailModal = document.getElementById('detail-modal');
// Attach view detail modals
$('.view-detail').on('click', function () {
- $detailModal.find('.content pre').text($(this).parents('tr').find('.notice-description').text());
- $detailModal.find('.sub.header').text(this.closest('tr')?.querySelector('relative-time')?.getAttribute('title'));
- $detailModal.modal('show');
+ const description = this.closest('tr').querySelector('.notice-description').textContent;
+ detailModal.querySelector('.content pre').textContent = description;
+ $(detailModal).modal('show');
return false;
});