412 lines
19 KiB
Cheetah
412 lines
19 KiB
Cheetah
<? INC Header.tmpl ?>
|
|
<form class="form-horizontal" action="<? IF Edit ?>edituser<? ELSE ?>adduser<? ENDIF ?>" method="post">
|
|
<? INC _csrf_check.tmpl ?>
|
|
<input type="hidden" name="submitted" value="1" />
|
|
|
|
<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="#authtab" data-toggle="tab">Authentication</a></li>
|
|
<li><a href="#ircinformationtab" data-toggle="tab">IRC Information</a></li>
|
|
<li class="hidden-xs"><a href="#networkstab" data-toggle="tab">Networks</a></li>
|
|
<li class="hidden-xs"><a href="#modulestab" data-toggle="tab">Modules</a></li>
|
|
<li class="hidden-xs hidden-sm"><a href="#defaultsettingstab" data-toggle="tab">Default Settings</a></li>
|
|
<li class="hidden-xs hidden-sm"><a href="#flagstab" data-toggle="tab">Flags</a></li>
|
|
<li class="hidden-xs hidden-sm"><a href="#zncbehavetab" data-toggle="tab">ZNC Behavior</a></li>
|
|
<li class="hidden-xs hidden-sm"><a href="#othermodtab" data-toggle="tab">Other Modules</a></li>
|
|
<li class="dropdown hidden-lg hidden-md">
|
|
<a href="#" data-toggle="dropdown">More <span class="caret"></span></a>
|
|
<ul class="dropdown-menu" role="menu">
|
|
<li class="hidden-sm"><a href="#networkstab" data-toggle="tab">Networks</a></li>
|
|
<li class="hidden-sm"><a href="#modulestab" data-toggle="tab">Modules</a></li>
|
|
<li><a href="#defaultsettingstab" data-toggle="tab">Default Settings</a></li>
|
|
<li><a href="#flagstab" data-toggle="tab">Flags</a></li>
|
|
<li><a href="#zncbehavetab" data-toggle="tab">ZNC Behavior</a></li>
|
|
<li><a href="#othermodtab" data-toggle="tab">Other Modules</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
<div class="tab-content">
|
|
<!--Authentication -->
|
|
<div class="tab-pane fade in active" id="authtab">
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="inputUsername" class="col-sm-2 control-label">Username:</label>
|
|
<div class="col-sm-10">
|
|
<? IF Clone ?>
|
|
<input type="hidden" class="form-control" id="inputUsername" name="clone" value="<? VAR CloneUsername ?>" autocomplete="off" />
|
|
<? ENDIF ?>
|
|
|
|
<? IF Edit ?>
|
|
<input type="hidden" class="form-control" id="inputUsername" name="user" value="<? VAR Username ?>" autocomplete="off" />
|
|
<input type="text" class="form-control" id="inputUsername" name="newuser" value="<? VAR Username ?>" disabled="disabled" />
|
|
<? ELSE ?>
|
|
<input type="text" class="form-control" id="inputUsername" name="user" value="<? VAR Username ?>" placeholder="Enter a username" autocomplete="off" />
|
|
<? ENDIF ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputPassword" class="col-sm-2 control-label">Password:</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="Enter a secure password" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputPassword2" class="col-sm-2 control-label">Confirm Password:</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" class="form-control" id="inputPassword2" name="password2" placeholder="Re-type the password">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="inputAllowedIP" class="col-sm-2 control-label">Allowed IPs:</label>
|
|
<div class="col-sm-10">
|
|
<textarea class="form-control class="form-control" data-provide="markdown" id="inputAllowedIP" name="allowedips" cols="70" rows="5"><? LOOP AllowedHostLoop ?><? VAR Host ?><? ENDLOOP ?></textarea>
|
|
<div class="alert alert-info help-block">Leave empty to allow connections from all IPs. Otherwise, one entry per line, wildcards * and ? are available.</div>
|
|
</div>
|
|
</div>
|
|
</div><!-- Authentication -->
|
|
|
|
<!-- IRC Information -->
|
|
<div class="tab-pane fade" id="ircinformationtab">
|
|
<? IF !Edit ?>
|
|
<div class="alert alert-info">Nick, AltNick, Ident, RealName and QuitMsg can be left empty to use default values.</div>
|
|
<? ENDIF ?>
|
|
|
|
<div class="form-group">
|
|
<label for="inputNickname" class="col-sm-2 control-label">Nickname:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputNickname" name="nick" value="<? VAR Nick ?>" maxlength="30" placeholder="This will be your nickname on IRC.">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputaltNickname" class="col-sm-2 control-label">Alt. Nickname</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputaltNickname" name="altnick" value="<? VAR AltNick ?>" maxlength="128" placeholder="If the nickname above is not available anymore, then this will be your nickname on IRC.">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputIdent" class="col-sm-2 control-label">Ident:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputIdent" name="ident" value="<? VAR Ident ?>" maxlength="128" placeholder="The Ident identifies you as one specific user of your host.">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputStatusPrefix" class="col-sm-2 control-label">StatusPrefix:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputStatusPrefix" name="statusprefix" value="<? VAR StatusPrefix ?>" maxlength="5" placeholder="This defines the prefix for the status and module queries.">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputRealname" class="col-sm-2 control-label">Realname:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputRealname" name="realname" value="<? VAR RealName ?>" maxlength="256" placeholder="The real name of the user.">
|
|
</div>
|
|
</div>
|
|
|
|
<? IF BindHostEdit ?>
|
|
<div class="form-group">
|
|
<label for="inputBindHost" class="col-sm-2 control-label">BindHost:</label>
|
|
<div class="col-sm-10">
|
|
<? IF BindHostLoop ?>
|
|
<select class="form-control" id="inputBindHost" name="bindhost">
|
|
<option>Default</option>
|
|
<? LOOP BindHostLoop ?><option value="<? VAR BindHost ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? VAR BindHost ?></option><? ENDLOOP ?>
|
|
</select>
|
|
<? ELSE ?>
|
|
<input class="form-control" type="text" name="bindhost" value="<? VAR BindHost ?>"/>
|
|
<? ENDIF ?>
|
|
</div>
|
|
</div>
|
|
<? ENDIF ?>
|
|
|
|
<div class="form-group">
|
|
<label for="inputDCCBindHost" class="col-sm-2 control-label">DCCBindHost:</label>
|
|
<div class="col-sm-10">
|
|
<? IF DCCBindHostLoop ?>
|
|
<select class="form-control" id="inputDCCBindHost" name="dccbindhost">
|
|
<option>Default</option>
|
|
<? LOOP DCCBindHostLoop ?><option value="<? VAR BindHost ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? VAR BindHost ?></option><? ENDLOOP ?>
|
|
</select>
|
|
<? ELSE ?>
|
|
<input type="text" class="form-control" name="dccbindhost" value="<? VAR DCCBindHost ?>"/>
|
|
<? ENDIF ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputQuit" class="col-sm-2 control-label">Quit Message:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputQuit" name="quitmsg" value="<? VAR QuitMsg ?>" maxlength="256" placeholder="You may define a Message shown, when you quit IRC.">
|
|
</div>
|
|
</div>
|
|
</div> <!-- IRC Information -->
|
|
|
|
<!-- Networks -->
|
|
<div class="tab-pane fade" id="networkstab">
|
|
<? IF Edit ?>
|
|
<table class="table table-bordered table-hover table-striped">
|
|
<thead>
|
|
<tr>
|
|
<td><a href="addnetwork?user=<? VAR Username ESC=URL ?>" class="btn btn-default btn-xs">Add</a></td>
|
|
<? IF NetworkLoop ?>
|
|
<td>Name</td>
|
|
<td>Clients</td>
|
|
<td>Current Server</td>
|
|
<td>IRC Nick</td>
|
|
<? ELSE ?>
|
|
<td><- Add a network (opens in same page)</td>
|
|
<? ENDIF ?>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<? LOOP NetworkLoop SORTASC=Name ?>
|
|
<tr>
|
|
<td>
|
|
<input type="hidden" name="network" value="<? VAR Name ?>" />
|
|
<a href="editnetwork?user=<? VAR Username ESC=URL ?>&network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Edit</a> <a href="delnetwork?user=<? VAR Username ESC=URL ?>&name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs">Delete</a>
|
|
</td>
|
|
<td><? VAR Name ?></td>
|
|
<td><? VAR Clients ?></td>
|
|
<td><? VAR Server DEFAULT="-N/A-" ?></td>
|
|
<td><? VAR IRCNick ?></td>
|
|
</tr>
|
|
<? ENDLOOP ?>
|
|
</tbody>
|
|
</table>
|
|
<? ELSE ?>
|
|
<span class="info">You will be able to add + modify networks here after you <? IF Clone ?>have cloned<? ELSE ?>created<? ENDIF ?> the user.</span><br />
|
|
<? ENDIF ?>
|
|
</div><!-- Networks -->
|
|
|
|
<!-- Modules -->
|
|
<div class="tab-pane fade" id="modulestab">
|
|
<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>
|
|
<td>
|
|
<div class="switch">
|
|
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" value="<? 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>
|
|
<? IF Disabled ?>
|
|
<? VAR Args ?>
|
|
<? ELSE ?>
|
|
<input class="third form-control" type="text" 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 ?> />
|
|
<? ENDIF ?>
|
|
</td>
|
|
<td><? VAR Description ?></td>
|
|
<td>
|
|
<? IF CanBeLoadedGlobally ?>
|
|
<div class="checkboxSwitchMini">
|
|
<input type="checkbox" name="loaded_globally" id="loaded_globally_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedGloabally?> checked="checked" <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
|
|
<label for="loaded_globally_<? VAR Name ?>"></label>
|
|
</div>
|
|
<? ENDIF ?>
|
|
</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>
|
|
</tr>
|
|
<? ENDLOOP ?>
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- Modules -->
|
|
|
|
<!-- Default Settings -->
|
|
<div class="tab-pane fade" id="defaultsettingstab">
|
|
<div class="form-group">
|
|
<label for="inputModes" class="col-sm-2 control-label">Channel Modes:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputModes" name="chanmodes" value="<? VAR DefaultChanModes ?>" maxlength="32" placeholder="These are the default modes ZNC will set when you join an empty channel.">
|
|
<div class="alert alert-info help-block">Empty = use standard value</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputBufferSize" class="col-sm-2 control-label">Buffer Size:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputBufferSize" name="bufsize" value="<? VAR BufferCount ?>" min="0" placeholder="This is the amount of lines that the playback buffer will store before dropping off the oldest line. The buffers are stored in the memory by default." />
|
|
<div class="alert alert-info help-block">Empty = use standard value</div>
|
|
</div>
|
|
</div>
|
|
</div> <!-- Default Settings -->
|
|
|
|
<!-- Flags -->
|
|
<div class="tab-pane fade" id="flagstab">
|
|
<div class="row">
|
|
<div class="col-md-6 col-md-offset-3">
|
|
<table class="table table-bordered table-hover table-striped">
|
|
<thead>
|
|
<tr>
|
|
<td>Status</td>
|
|
<td>Flag Title</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<? LOOP OptionLoop ?>
|
|
<tr>
|
|
<td>
|
|
<div class="switch">
|
|
<input type="checkbox" name="<? VAR Name ?>" id="opt_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="1"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
|
|
<label for="opt_<? VAR Name ?>"></label>
|
|
</div>
|
|
</td>
|
|
<td><b><? VAR DisplayName ?></b></td>
|
|
</tr>
|
|
<? ENDLOOP ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div> <!-- Flags -->
|
|
|
|
<!-- ZNC Behavior -->
|
|
<div class="tab-pane fade" id="zncbehavetab">
|
|
<div class="alert alert-info help-block">Any of the following text boxes can be left empty to use their default value.</div>
|
|
<div class="form-group">
|
|
<label for="inputtimeFormat" class="col-sm-2 control-label">Timestamp Format:</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="inputtimeFormat" name="timestampformat" value="<? VAR TimestampFormat ?>" placeholder="The format for the timestamps used in buffers, for example [%H:%M:%S]." />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputTimezone" class="col-sm-2 control-label">Timezone:</label>
|
|
<div class="col-sm-10">
|
|
<input class="form-control" id="inputTimezone" name="timezone" value="<? VAR Timezone ?>" placeholder="Select your timezone.">
|
|
<div class="alert alert-info help-block">E.g. <b>Europe/Berlin</b> or <b>GMT-6</b></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="inputClientencode" class="col-sm-2 control-label">Client encoding:</label>
|
|
<div class="col-sm-10">
|
|
<? INC encoding_settings.tmpl ?>
|
|
<span class="help-block">Character encoding used between IRC client and ZNC. After changing this, reconnect client to ZNC</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="inputJoinTries" class="col-sm-2 control-label">Join Tries:</label>
|
|
<div class="col-sm-10">
|
|
<input class="form-control" type="number" id="inputJoinTries" name="jointries" value="<? VAR JoinTries ?>" min="0" placeholder="This defines how often ZNC tries to join, if the first join failed, e.g. due to channel mode +i/+k or if you're banned."/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputMaxJoins" class="col-sm-2 control-label">Max Joins:</label>
|
|
<div class="col-sm-10">
|
|
<input class="form-control" type="number" id="inputMaxJoins" name="maxjoins" value="<? VAR MaxJoins ?>" min="0" placeholder="How many channels are joined in one JOIN command. 0 is unlimited (default). Set to small positive value if you get disconnected with `Max SendQ Exceeded'"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputmaxIRCnet" class="col-sm-2 control-label">Max IRC Networks Number:</label>
|
|
<div class="col-sm-10">
|
|
<input class="form-control" type="number" id="inputmaxIRCnet" name="maxnetworks" value="<? VAR MaxNetworks ?>" min="0" placeholder="Maximum number of IRC networks allowed for this user." <? IF !ImAdmin ?>disabled="disabled"<? ENDIF ?> />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputmaxQueryBuffers" class="col-sm-2 control-label">Max Query Buffers:</label>
|
|
<div class="col-sm-10">
|
|
<input class="form-control" type="number" id="inputmaxQueryBuffers" name="maxquerybuffers" value="<? VAR MaxQueryBuffers ?>" class="third" min="0" placeholder="Maximum number of query buffers. 0 is unlimited."/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="inputCTCPreplies" class="col-sm-2 control-label">CTCP Replies:</label>
|
|
<div class="col-sm-10">
|
|
<textarea class="form-control" id="inputCTCPreplies" name="ctcpreplies" cols="70" rows="3"><? LOOP CTCPLoop ?><? VAR CTCP ?><? ENDLOOP ?></textarea>
|
|
<div class="alert alert-info help-block">One reply per line. Example: TIME Buy a watch!</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="input..." class="col-sm-2 control-label">Skin(s):</label>
|
|
<div class="col-sm-10">
|
|
<? IF SkinLoop ROWS > 1 ?>
|
|
<select class="form-control" name="skin">
|
|
<option value="">- Global -</option>
|
|
<? LOOP SkinLoop ?>
|
|
<option value="<? VAR Name ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? IF Name == "_default_" ?>Default<? ELSE ?><? VAR Name ?><? ENDIF ?></option>
|
|
<? ENDLOOP ?>
|
|
</select>
|
|
<? ELSE ?>
|
|
<p>No other skins found!</p>
|
|
<? ENDIF ?>
|
|
</div>
|
|
</div>
|
|
</div><!-- ZNC Behavior -->
|
|
|
|
<!-- Other Modules -->
|
|
<div class="tab-pane fade" id="othermodtab">
|
|
<? LOOP EmbeddedModuleLoop ?>
|
|
<? IF Embed ?>
|
|
<div class="form-group">
|
|
<label for="input<? VAR ModName ?>" class="col-sm-2 control-label"><? VAR ModName ?>:</label>
|
|
<div class="col-sm-10">
|
|
<? INC *Embed ?>
|
|
</div>
|
|
</div>
|
|
<? ENDIF ?>
|
|
<? ENDLOOP ?>
|
|
</div><!-- Other Modules -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel-footer text-right">
|
|
<? IF ImAdmin ?>
|
|
<input class="btn btn-danger" type="reset" value="Reset">
|
|
<input class="btn btn-success" type="submit" name="submit_return" value="<? IF Edit ?>Save<? ELSE ?><? IF Clone ?>Clone<? ELSE ?>Create<? ENDIF ?><? ENDIF ?>" />
|
|
<input class="btn btn-default" type="submit" name="submit_continue" value="<? IF Edit ?>Save and continue<? ELSE ?><? IF Clone ?>Clone<? ELSE ?>Create<? ENDIF ?><? ENDIF ?>" />
|
|
<? ELSE ?>
|
|
<input class="btn btn-danger" type="reset" value="Reset">
|
|
<input class="btn btn-success" type="submit" value="<? IF Edit ?>Save<? ELSE ?><? IF Clone ?>Clone<? ELSE ?>Create<? ENDIF ?><? ENDIF ?>" />
|
|
<? ENDIF ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<? INC Footer.tmpl ?> |