From d5edddba36f1544584c5b54e32542c0202f189c0 Mon Sep 17 00:00:00 2001 From: wangjiacai Date: Sat, 1 Apr 2023 23:24:21 +0800 Subject: [PATCH] admin cannot operate himself --- project/templates/base.html | 4 ++-- project/templates/manage.html | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/project/templates/base.html b/project/templates/base.html index 3a80e0b..727f618 100644 --- a/project/templates/base.html +++ b/project/templates/base.html @@ -49,9 +49,9 @@ {% else%} var navbar_hide_element = ["navbar-profile", "navbar-logout"]; {% endif %} - navbar_hide_element.forEach((elem) => { + navbar_hide_element.forEach(element => { try { - document.getElementById(elem).style.display = "none"; + document.getElementById(element).style.display = "none"; } catch (error) { } }) diff --git a/project/templates/manage.html b/project/templates/manage.html index 5ba3cc0..0368d06 100644 --- a/project/templates/manage.html +++ b/project/templates/manage.html @@ -31,7 +31,7 @@ - + {% endfor %} @@ -46,4 +46,16 @@ {% endif %} {% endwith %} + + + {% endblock %} \ No newline at end of file