From d0ec6ac5a5e8858d423923778fdd5667297f63c2 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 23 May 2007 17:33:08 +0000 Subject: - show auth part only when enabled - common method Setup::SaveSetup to store setup values from osd and web frontend --- pages/setup.ecpp | 54 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 20 deletions(-) (limited to 'pages') diff --git a/pages/setup.ecpp b/pages/setup.ecpp index e69ef66..012d798 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -10,7 +10,6 @@ using namespace std; bool useauth = 0; string login; string pass; - int passLength = 0; <%session scope="global"> bool logged_in(false); @@ -23,14 +22,18 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); if ( request.getMethod() == "POST") { LiveSetup().SetLastChannel(lastchannel); LiveSetup().SetUseAuth(useauth); - LiveSetup().SetAdminLogin(login); - LiveSetup().SetAdminPassword(pass); - return reply.redirect("setup.html"); + if (useauth) { + LiveSetup().SetAdminLogin(login); + if (pass != "") + LiveSetup().SetAdminPassword(pass); + } + LiveSetup().SaveSetup(); } pageTitle = tr("Setup"); lastchannel = LiveSetup().GetLastChannel(); login = LiveSetup().GetAdminLogin(); useauth = LiveSetup().UseAuth(); + <& pageelems.doc_type &> @@ -39,8 +42,18 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> + - + <& pageelems.logo &> <& menu active=("setup") &>
@@ -48,7 +61,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - + @@ -58,22 +71,23 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - - - - - - - - - - - - - + -
<$ tr("Setup") $>
<$ tr("Last channel to display") $>:
<$ tr("Use authentication") $>:/>
<$ tr("Admin login") $>:
<$ tr("Admin password") $>: + onclick="changeduseauth(this)"/> + +
-- cgit v1.2.3