{INCLUDE header.html}
{INCLUDE chanserv/chanlist.html}
		<div class="panel-heading">Channel Mode List</div>
		<div class="panel-body">
			{FOR M IN MESSAGES}
			<div class="alert alert-info">
				{M}<br>
			</div>
			{END FOR}

			{IF EQ MODE YES}
				{FOR LM IN LISTMODES}
						<td><a href="/chanserv/modes?channel={ESCAPED_CHANNEL}&m={LM}" class="btn btn-sm btn-primary {IF EQ LM ESCAPED_MODE}disabled{END IF}">+{LM}</a></td>
				{END FOR}
				<br>

				{IF EXISTS MASKS}
				<table id="tableNSAccess" class="table table-hover">
					<thead>
						<tr>
							<th>Mask</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
					{FOR MASK IN MASKS}
						<tr>
							<td style="font-weight: bold;">{MASK}</td>
							<td><a href="/chanserv/modes?channel={ESCAPED_CHANNEL}&m={ESCAPED_MODE}&mask={MASK}&del=1" class="btn btn-sm btn-danger">Delete</a></td>
						</tr>
					{END FOR}
					</tbody>
				</table>
				{ELSE}
				<em>Nothing to display.</em>
				{END IF}

				<hr>

				<h4>Set a new mode</h4>
				<form class="form-horizontal" method="post" action="/chanserv/modes?channel={ESCAPED_CHANNEL}&m={ESCAPED_MODE}">
					<div class="form-group">
						<label class="control-label col-lg-2" for="mask">Mask:</label>
						<div class="col-lg-6">
							<input class="form-control" type="text" name="mask" id="mask" placeholder="Mask must be in the form nick!user@host">
						</div>
					</div>
					<div class="form-group">
						<div class="col-lg-offset-2 col-lg-6">
							<button type="submit" class="btn btn-primary">Send</button>
						</div>
					</div>
				</form>
			{END IF}
		</div>
{INCLUDE footer.html}
