From 64b3f5b906062618f6c8f4e4b6436b5e76635a0f Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Thu, 28 May 2020 13:21:00 +0200 Subject: [PATCH] tpl: warn the user if the current credentials are not enough --- default.tpl | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/default.tpl b/default.tpl index b838a32..621a2b9 100644 --- a/default.tpl +++ b/default.tpl @@ -849,14 +849,20 @@ function selectionMask() { function showLogin(options) { if (!HFS.sid) // the session was just deleted return location.reload() // but it's necessary for login - var d = dialog('\ -
\ - Username\ -
\ -
Password\ -
\ -

\ -
', options) + var d = dialog(` +
+ {.!Username.} +
+
{.!Password.} +
+

+
`, options) + + if (HFS.user) + d.find('form').prepend(`
+ The current account (${HFS.user}) has no access to this resource. +
Please enter different credentials. +
`) d.find('form').submit(function(){ var vals = d.find('[name]').get().map(x=> x.value.trim())