You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zncstrap/modules/webadmin/tmpl/settings.tmpl

299 lines
14 KiB

<? I18N znc-webadmin ?>
<? 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"><? FORMAT "Listen Port(s)" ?></a></li>
<li><a href="#settingstab" data-toggle="tab"><? FORMAT "Settings" ?></a></li>
<li><a href="#globalmodtab" data-toggle="tab"><? FORMAT "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>
<th><? FORMAT "Port" ?></th>
<th><? FORMAT "BindHost" ?></th>
<th><? FORMAT "SSL" ?></th>
<th><? FORMAT "IPv4" ?></th>
<th><? FORMAT "IPv6" ?></th>
<th><? FORMAT "IRC" ?></th>
<th><? FORMAT "HTTP" ?></th>
<th><? FORMAT "URIPrefix" ?></th>
<th><? FORMAT "Delete" ?></th>
</tr>
</thead>
<? LOOP ListenLoop ?>
<tr>
<td><? VAR Port ?></td>
<td><? VAR BindHost DEFAULT=** ?></td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" disabled="disabled" id="<? VAR IsSSL ?>" <? IF IsSSL ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsSSL ?>"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" disabled="disabled" id="<? VAR IsIPV4 ?>" <? IF IsIPV4 ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsIPV4 ?>"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="<? VAR IsIPV6 ?>" disabled="disabled" <? IF IsIPV6 ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsIPV6 ?>"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="<? VAR IsIRC ?>" disabled="disabled" <? IF IsIRC ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsIRC ?>"></label>
</div>
</td>
<td>
<div class="checkboxSwitchMini">
<input type="checkbox" id="<? VAR IsHTTP ?>" disabled="disabled" <? IF IsHTTP ?>checked="checked"<? ENDIF ?>/>
<label for="<? VAR IsHTTP ?>"></label>
</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="ssl" type="hidden" value="<? VAR IsSSL ?>"/>
<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="<? FORMAT "Del" ?>"/>
</form>
<? ELSE ?>
<input name="unavailable" type="text" disabled="disabled" title="<? FORMAT "To delete port which you use to access webadmin itself, either connect to webadmin via another port, or do it in IRC (/znc DelPort)" ?>" value="<? FORMAT "Current" ?>" />
<? 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" name="ssl" checked="checked"/>
<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="<? FORMAT "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"><? FORMAT "Skin:" ?></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_" ?><? FORMAT "Default" ?><? ELSE ?><? VAR Name ?><? ENDIF ?></option>
<? ENDLOOP ?>
</select>
</div>
</div>
<div class="form-group">
<label for="inputStatusPrefix" class="col-sm-2 control-label"><? FORMAT "Status Prefix:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStatusPrefix" value="<? VAR StatusPrefix ?>" placeholder="<? FORMAT "The prefix for the status and module queries." ?>"/>
<div class="alert alert-info help-block"><? FORMAT "Default for new users only." ?></div>
</div>
</div>
<div class="form-group">
<label for="inputmaxBufferSize" class="col-sm-2 control-label"><? FORMAT "Maximum Buffer Size:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputmaxBufferSize" name="maxbufsize" value="<? VAR MaxBufferSize ?>" placeholder="<? FORMAT "Sets the global Max Buffer Size a user can have." ?>"/>
</div>
</div>
<div class="form-group">
<label for="inputConnectDelay" class="col-sm-2 control-label"><? FORMAT "Connect Delay:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputConnectDelay" name="connectdelay" value="<? VAR ConnectDelay ?>" placeholder="<? FORMAT "The time between connection attempts to IRC servers, in seconds. This affects the connection between ZNC and the IRC server; not the connection between your IRC client and ZNC." ?>" />
</div>
</div>
<div class="form-group">
<label for="inputServerThrottle" class="col-sm-2 control-label"><? FORMAT "Server Throttle:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputServerThrottle" name="serverthrottle" value="<? VAR ServerThrottle ?>" placeholder="<? FORMAT "The minimal time between two connect attempts to the same hostname, in seconds. Some servers refuse your connection if you reconnect too fast." ?>" />
</div>
</div>
<div class="form-group">
<label for="inputAnonIPLimit" class="col-sm-2 control-label"><? FORMAT "Anonymous Connection Limit per IP:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputAnonIPLimit" name="anoniplimit" value="<? VAR AnonIPLimit ?>" placeholder="<? FORMAT "Limits the number of unidentified connections per IP." ?>" />
</div>
</div>
<div class="form-group">
<label for="inputprotectWeb" class="col-sm-2 control-label"><? FORMAT "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"><? FORMAT "Disallow IP changing during each web session" ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputhideversion" class="col-sm-2 control-label"><? FORMAT "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="hideversion_checkbox"></label>
<div class="alert alert-info help-block"><? FORMAT "Hide version number from non-ZNC users" ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputauthonlyviamodule" class="col-sm-2 control-label"><? FORMAT "Auth Only Via Module:" ?></label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="authonlyviamodule" id="authonlyviamodule_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF AuthOnlyViaModule ?> checked="checked"<? ENDIF ?> />
<label for="authonlyviamodule_checkbox"></label>
<div class="alert alert-info help-block"><? FORMAT "Allow user authentication by external modules only" ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputMOTD" class="col-sm-2 control-label"><? FORMAT "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"><? FORMAT "“Message of the Day”, sent to all ZNC users on connect." ?></div>
</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>
<th></th>
<th><? FORMAT "Name" ?></th>
<th><? FORMAT "Arguments" ?></th>
<th><? FORMAT "Description" ?></th>
<th><? FORMAT "Loaded by networks" ?></th>
<th><? FORMAT "Loaded by users" ?></th>
</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 -->
</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="<? FORMAT "Save" ?>" />
</div>
</div>
</div>
</form>
<? INC Footer.tmpl ?>