From 47a80e5f3693888437a7a75721334c726b62af9e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 9 Jan 2019 23:47:25 +0000 Subject: [PATCH] Improved JavaScript for better handling of non-client users. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/user_add.tpl | 4 +++- WEB-INF/templates/mobile/user_edit.tpl | 4 +++- WEB-INF/templates/user_add.tpl | 4 +++- WEB-INF/templates/user_edit.tpl | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 35fc2a5d..27b17d57 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.36.4702 | Copyright © Anuko | +  Anuko Time Tracker 1.18.36.4703 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/user_add.tpl b/WEB-INF/templates/mobile/user_add.tpl index 71901fb0..d23dcf93 100644 --- a/WEB-INF/templates/mobile/user_add.tpl +++ b/WEB-INF/templates/mobile/user_add.tpl @@ -40,8 +40,10 @@ function handleClientControl() { var isClient = roles[i][1]; if (isClient == 1) clientControl.style.visibility = "visible"; - else + else { + clientControl.value = ''; clientControl.style.visibility = "hidden"; + } break; } } diff --git a/WEB-INF/templates/mobile/user_edit.tpl b/WEB-INF/templates/mobile/user_edit.tpl index 0d7f47e6..9929e727 100644 --- a/WEB-INF/templates/mobile/user_edit.tpl +++ b/WEB-INF/templates/mobile/user_edit.tpl @@ -62,8 +62,10 @@ function handleClientControl() { var isClient = roles[i][1]; if (isClient == 1) clientControl.style.visibility = "visible"; - else + else { + clientControl.value = ''; clientControl.style.visibility = "hidden"; + } break; } } diff --git a/WEB-INF/templates/user_add.tpl b/WEB-INF/templates/user_add.tpl index 39575db0..0741dc3e 100644 --- a/WEB-INF/templates/user_add.tpl +++ b/WEB-INF/templates/user_add.tpl @@ -40,8 +40,10 @@ function handleClientControl() { var isClient = roles[i][1]; if (isClient == 1) clientControl.style.visibility = "visible"; - else + else { + clientControl.value = ''; clientControl.style.visibility = "hidden"; + } break; } } diff --git a/WEB-INF/templates/user_edit.tpl b/WEB-INF/templates/user_edit.tpl index 7475c6ef..32947545 100644 --- a/WEB-INF/templates/user_edit.tpl +++ b/WEB-INF/templates/user_edit.tpl @@ -62,8 +62,10 @@ function handleClientControl() { var isClient = roles[i][1]; if (isClient == 1) clientControl.style.visibility = "visible"; - else + else { + clientControl.value = ''; clientControl.style.visibility = "hidden"; + } break; } } -- 2.20.1