From 20bba135fe3e5c85bd194155feba143634abd1ce Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 10 Dec 2017 01:25:20 +0100 Subject: [PATCH] Show hide or show public surftip button depending on current config status, to show the button to switch the status (hiding button of current status) --- htroot/Surftips.html | 13 ++++++++----- htroot/Surftips.java | 5 +++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/htroot/Surftips.html b/htroot/Surftips.html index 4075cab43..7d225c6d5 100644 --- a/htroot/Surftips.html +++ b/htroot/Surftips.html @@ -55,19 +55,22 @@

- + #(publicSurftips)# + :: + + #(/publicSurftips)#
- #(/surftips)# + #(/surftips)# #%env/templates/footer.template%# diff --git a/htroot/Surftips.java b/htroot/Surftips.java index dad98d129..33b59d197 100644 --- a/htroot/Surftips.java +++ b/htroot/Surftips.java @@ -72,6 +72,7 @@ public class Surftips { publicPage = post.get("publicPage", "0").equals("1"); sb.setConfig("publicSurftips", publicPage); } + prop.put("surftips_publicSurftips", publicPage); if ((publicPage) || (authorizedAccess)) { @@ -79,7 +80,7 @@ public class Surftips { String hash; if ((post != null) && ((hash = post.get("voteNegative", null)) != null)) { if (!sb.verifyAuthentication(header)) { - prop.authenticationRequired(); + prop.authenticationRequired(); return prop; } // make new news message with voting @@ -93,7 +94,7 @@ public class Surftips { } if ((post != null) && ((hash = post.get("votePositive", null)) != null)) { if (!sb.verifyAuthentication(header)) { - prop.authenticationRequired(); + prop.authenticationRequired(); return prop; } // make new news message with voting