zncstrap/modules/webadmin/tmpl/settings.tmpl

293 lines
12 KiB
Cheetah
Raw Normal View History

2014-02-11 05:44:19 +01:00
<? INC Header.tmpl ?>
<div class="container col-md-10 col-md-offset-1">
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#listenporttab" data-toggle="tab">Listen Port(s)</a></li>
<li><a href="#settingstab" data-toggle="tab">Settings</a></li>
<li><a href="#globalmodtab" data-toggle="tab">Global Modules</a></li>
</ul>
</div>
<div class="panel-body">
<div class="tab-content">
<!--Listen Port -->
<div class="tab-pane fade in active" id="listenporttab">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Port</td>
<td>BindHost</td>
<td>SSL</td>
<td>IPv4</td>
<td>IPv6</td>
<td>IRC</td>
<td>Web</td>
<td>URIPrefix</td>
</tr>
</thead>
<? LOOP ListenLoop ?>
2014-02-11 05:44:19 +01:00
<tr>
<td><? VAR Port ?></td>
<td><? VAR BindHost DEFAULT=** ?></td>
2014-02-11 05:44:19 +01:00
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" disabled="disabled" id="<? VAR IsSSL ?>" <? IF IsSSL ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsSSL ?>"></label>
2014-02-11 05:44:19 +01:00
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" disabled="disabled" id="<? VAR IsIPV4 ?>" <? IF IsIPV4 ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsIPV4 ?>"></label>
2014-02-11 05:44:19 +01:00
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="<? VAR IsIPV6 ?>" disabled="disabled" <? IF IsIPV6 ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsIPV6 ?>"></label>
2014-02-11 05:44:19 +01:00
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="<? VAR IsIRC ?>" disabled="disabled" <? IF IsIRC ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsIRC ?>"></label>
2014-02-11 05:44:19 +01:00
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="<? VAR IsWeb ?>" disabled="disabled" <? IF IsWeb ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsWeb ?>"></label>
2014-02-11 05:44:19 +01:00
</div>
</td>
<td><? VAR URIPrefix ?></td>
<td>
<? IF SuggestDeletion ?>
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>del_listener" method="post">
<? INC _csrf_check.tmpl ?>
<input name="host" type="hidden" value="<? VAR BindHost ?>"/>
<input name="port" type="hidden" value="<? VAR Port ?>"/>
<input name="ipv4" type="hidden" value="<? VAR IsIPV4 ?>"/>
<input name="ipv6" type="hidden" value="<? VAR IsIPV6 ?>"/>
<input type="submit" class="btn btn-danger btn-xs" value="Del"/>
</form>
<? ENDIF ?>
</td>
</tr>
<? ENDLOOP ?>
<tr>
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>add_listener" method="post">
<? INC _csrf_check.tmpl ?>
<td>
<input type="number" class="form-control" name="port" min="1" max="65535" class="number" maxlength="5" placeholder="Port 1 to 65535"/>
</td>
<td>
<input type="text" class="form-control" name="host" value="*"/>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="ssl"/>
<label for="ssl"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="ipv4" name="ipv4" checked="checked"/>
<label for="ipv4"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="ipv6" name="ipv6" checked="checked"/>
<label for="ipv6"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="irc" name="irc" checked="checked"/>
<label for="irc"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="web" name="web" checked="checked"/>
<label for="web"></label>
</div>
</td>
<td><input type="text" class="form-control" name="uriprefix" value="/"></td>
<td><input type="submit" class="btn btn-primary btn-xs" value="Add"/></td>
</form>
</tr>
</table>
</div><!--Listen Port -->
<!-- Settings -->
<div class="tab-pane fade" id="settingstab">
<form class="form-horizontal" action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>settings" method="post">
<? INC _csrf_check.tmpl ?>
<input type="hidden" name="submitted" value="1" />
<div class="form-group">
<label for="inputSkins" class="col-sm-2 control-label">Skin(s):</label>
<div class="col-sm-10">
<select class="form-control" id="inputSkins" name="skin">
<? LOOP SkinLoop ?>
<option value="<? VAR Name ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? IF Name == "_default_" ?>Default<? ELSE ?><? VAR Name ?><? ENDIF ?></option>
<? ENDLOOP ?>
</select>
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputStatusPrefix" class="col-sm-2 control-label">Status Prefix:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStatusPrefix" value="<? VAR StatusPrefix ?>" placeholder="The prefix for the status and module queries."/>
<div class="alert alert-info help-block">Default for new users only.</div>
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputmaxBufferSize" class="col-sm-2 control-label">Maximum Buffer Size:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputmaxBufferSize" name="maxbufsize" value="<? VAR MaxBufferSize ?>" placeholder="Sets the global Max Buffer Size a user can have."/>
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputConnectDelay" class="col-sm-2 control-label">Connect Delay:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputConnectDelay" name="connectdelay" value="<? VAR ConnectDelay ?>" placeholder="The time every connection will be delayed, in seconds. Some servers refuse your connection if you reconnect too fast. This affects the connection between ZNC and the IRC server; not the connection between your IRC client and ZNC. "/>
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputServerThrottle" class="col-sm-2 control-label">Server Throttle:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputServerThrottle" name="serverthrottle" value="<? VAR ServerThrottle ?>" placeholder="The time between two connect attempts to the same hostname." />
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputAnonIPLimit" class="col-sm-2 control-label">Anonymous IP Limit:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputAnonIPLimit" name="anoniplimit" value="<? VAR AnonIPLimit ?>" placeholder="Limits the number of unidentified connections per IP." />
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputprotectWeb" class="col-sm-2 control-label">Protect Web Sessions:</label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="protectwebsessions" id="protectwebsessions_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF ProtectWebSessions ?> checked="checked"<? ENDIF ?> />
<label for="protectwebsessions_checkbox"></label>
<div class="alert alert-info help-block">Disallow IP changing during each web session</div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputprotectWeb" class="col-sm-2 control-label">Hide ZNC Version:</label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="hideversion" id="hideversion_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF HideVersion ?> checked="checked"<? ENDIF ?> />
<label for="protectwebsessions_checkbox"></label>
<div class="alert alert-info help-block">Hide version number from non-ZNC users</div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputMOTD" class="col-sm-2 control-label">MOTD:</label>
<div class="col-sm-10">
<textarea class="form-control" id="inputMOTD" name="motd" rows="5" class="monospace"><? LOOP MOTDLoop ?><? VAR Line ?>
<? ENDLOOP ?>
</textarea>
<div class="alert alert-info help-block">"Message of the Day", sent to all ZNC users on connect.</div>
</div>
</div>
2014-02-11 05:44:19 +01:00
<div class="form-group">
<label for="inputBindHosts" class="col-sm-2 control-label">BindHosts:</label>
<div class="col-sm-10">
<textarea type="text" class="form-control" id="inputBindHosts" name="bindhosts" rows="5">
<? LOOP BindHostLoop ?>
<? VAR BindHost ?>
<? ENDLOOP ?>
</textarea>
<div class="alert alert-info help-block">One host name or IP entry per line.</div>
2014-02-11 05:44:19 +01:00
</div>
</div>
</div><!-- Settings -->
<!-- Global Module Settings -->
<div class="tab-pane fade" id="globalmodtab">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Status</td>
<td>Name</td>
<td>Arguments</td>
<td>Description</td>
<td>Global</td>
<td>Networks</td>
</tr>
</thead>
<tbody>
<? LOOP ModuleLoop ?>
<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
<td>
<div class="switch">
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
<label for="lm_<? VAR Name ?>"></label>
</div>
</td>
<td>
<label for="lm_<? VAR Name ?>">
<? IF Wiki ?><a href="http://wiki.znc.in/<? VAR Wiki ?>" target="_blank"><? VAR Name ?></a>
<? ELSE ?> <? VAR Name ?> <? ENDIF ?></label>
</td>
<td class="mod_args">
<input type="text" class="form-control" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>"
<? IF !HasArgs ?> disabled="disabled"<? ENDIF ?>
<? IF ArgsHelpText ?> data-toggle="tooltip" data-placement="top" data-original-title="<? VAR ArgsHelpText ?>"<? ENDIF ?> />
</td>
<td class="mod_descr"><? VAR Description ?></td>
<td>
<? IF CanBeLoadedByNetwork ?>
<div class="checkboxSwitchMini">
<input type="checkbox" name="loaded_by_network" id="loaded_by_net_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByAllNetworks ?> checked="checked" <? ENDIF ?> class="sr-only" disabled="disabled" />
<? ENDIF ?>
<label for="loaded_by_net_<? VAR Name ?>"></label>
</div>
<? IF LoadedBySomeNetworks && !LoadedByAllNetworks ?>
<script type="text/javascript">document.getElementById("loaded_by_net_<? VAR Name ?>").indeterminate = true;</script>
<? ENDIF ?>
</td>
<td>
<? IF CanBeLoadedByUser ?>
<div class="checkboxSwitchMini">
<input type="checkbox" name="loaded_by_user" id="loaded_by_user_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByAllNetworks ?> checked="checked" <? ENDIF ?> class="sr-only" disabled="disabled" />
<? ENDIF ?>
<label for="loaded_by_user_<? VAR Name ?>"></label>
</div>
<? IF LoadedBySomeUsers && !LoadedByAllUsers ?>
<script type="text/javascript">document.getElementById("loaded_by_user_<? VAR Name ?>").indeterminate = true;</script>
<? ENDIF ?>
</td>
</tr>
<? ENDLOOP ?>
</tbody>
</table>
</div><!-- Global Module Settings -->
2014-02-11 05:44:19 +01:00
</div>
</div>
<div class="panel-footer text-right">
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success" type="submit" value="Save" />
</div>
2014-02-11 05:44:19 +01:00
</div>
</div>
</form>
2014-02-11 05:44:19 +01:00
<? INC Footer.tmpl ?>