diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/login.ecpp | 2 | ||||
-rw-r--r-- | pages/setup.ecpp | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/pages/login.ecpp b/pages/login.ecpp index 7462a59..20624a8 100644 --- a/pages/login.ecpp +++ b/pages/login.ecpp @@ -28,7 +28,7 @@ if (action == "login") { logged_in = false; } -if (logged_in || !LiveSetup().UseAuth()) return reply.redirect("whats_on.html"); +if (logged_in || !LiveSetup().UseAuth()) return reply.redirect(LiveSetup().GetStartScreenLink()); }> <& pageelems.doc_type &> diff --git a/pages/setup.ecpp b/pages/setup.ecpp index a95f55d..1650211 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -12,6 +12,7 @@ using namespace std; string login; string pass; string times; + string startscreen; </%args> <%session scope="global"> bool logged_in(false); @@ -21,6 +22,8 @@ bool logged_in(false); if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); }> <%cpp> +#define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" ); + if ( request.getMethod() == "POST") { LiveSetup().SetLastChannel(lastchannel != "" ? lexical_cast< int >(lastchannel):0); LiveSetup().SetUseAuth(useauth); @@ -30,6 +33,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); LiveSetup().SetAdminPassword(pass); } LiveSetup().SetTimes(times); + LiveSetup().SetStartScreen(startscreen); LiveSetup().SaveSetup(); } pageTitle = tr("Setup"); @@ -42,6 +46,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); login = LiveSetup().GetAdminLogin(); useauth = LiveSetup().UseAuth(); times = LiveSetup().GetTimes(); + startscreen = LiveSetup().GetStartScreen(); </%cpp> <& pageelems.doc_type &> @@ -106,6 +111,18 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); </tr> <tr> <td class="border" style="border-left: 1px solid black"></td> + <td class="label"><$ tr("Start page") $>:</td> + <td><select name="startscreen" size="1" id="startscreen"> + <option value="whatsonnow" <{ SELECTIF(startscreen == "whatsonnow") }>><$ tr("What's on now?") $></option> + <option value="whatsonnext" <{ SELECTIF(startscreen == "whatsonnext") }>><$ tr("What's on next?") $></option> + <option value="schedule" <{ SELECTIF(startscreen == "schedule") }>><$ tr("Schedule") $></option> + <option value="recordings" <{ SELECTIF(startscreen == "recordings") }>><$ tr("Recordings") $></option> + <option value="timers" <{ SELECTIF(startscreen == "timers") }>><$ tr("Timers") $></option> + </select></td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + <tr> + <td class="border" style="border-left: 1px solid black"></td> <td class="buttonpanel" colspan="2"> <button class="green" type="submit" name="save" onclick="return checksearch();"><$ tr("Save") $></button> </td> |