summaryrefslogtreecommitdiff
path: root/pages/setup.ecpp
diff options
context:
space:
mode:
Diffstat (limited to 'pages/setup.ecpp')
-rw-r--r--pages/setup.ecpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index d4e46f5..debd97c 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -21,6 +21,8 @@ using namespace std;
string showLogo;
string useAjax;
string showInfoBox;
+ string useStreamdev;
+ string streamdevport;
int authchanged = 0;
</%args>
<%session scope="global">
@@ -57,6 +59,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
if (LiveSetup().GetUseAjax()) {
LiveSetup().SetShowInfoBox(!showInfoBox.empty());
}
+ LiveSetup().SetUseStreamdev(!useStreamdev.empty());
+ LiveSetup().SetStreamdevPort(streamdevport.empty() ? 3000 : lexical_cast<int>(streamdevport));
LiveSetup().SaveSetup();
message = tr("Setup saved.");
}
@@ -77,6 +81,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
showLogo = LiveSetup().GetShowLogo() ? "1" : "";
useAjax = LiveSetup().GetUseAjax() ? "1" : "";
showInfoBox = LiveSetup().GetShowInfoBox() ? "1" : "";
+ useStreamdev = LiveSetup().GetUseStreamdev() ? "1" : "";
+ streamdevport = lexical_cast<std::string, int>(LiveSetup().GetStreamdevPort());
</%cpp>
<& pageelems.doc_type &>
@@ -90,6 +96,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
{
changeduseauth(document.getElementById("useauth"));
changeduseajax(document.getElementById("useAjax"));
+ changedusestreamdev(document.getElementById("useStreamdev"));
if (document.getElementById("message").value != "")
alert(document.getElementById("message").value);
}
@@ -105,6 +112,10 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
{
document.getElementById("ajaxsection").style.display = (selection.checked ? "block" : "none");
}
+ function changedusestreamdev(selection)
+ {
+ document.getElementById("streamdevsection").style.display = (selection.checked ? "block" : "none");
+ }
//--></script>
</head>
<body onload="initform()">
@@ -165,6 +176,20 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</td>
</tr>
<tr>
+ <td class="label leftcol"><div class="withmargin"><$ tr("Allow video streaming") $>:</div></td>
+ <td class="rightcol">
+ <input type="checkbox" name="useStreamdev" id="useStreamdev" value="1" <%cpp> CHECKIF(!useStreamdev.empty()); </%cpp> onclick="changedusestreamdev(this)"/>
+ <div id="streamdevsection" style="display: none">
+ <table border="0" cellpadding="0" cellspacing="0" class="dependent">
+ <tr>
+ <td class="label"><div class="withmargin"><$ tr("streamdev server port") $>:</div></td>
+ <td><input type="text" name="streamdevport" id="streamdevport" value="<$ streamdevport $>" /></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
<td class="label leftcol"><div class="withmargin"><$ tr("additional fixed times in 'What's on?'") $>:</div></td>
<td class="rightcol"><input type="text" name="times" value="<$ times $>" id="times" />
<& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a semicolon")) &></td>