delete nas

This commit is contained in:
Ibnu Maksum
2023-10-02 17:11:02 +07:00
parent d002ed2286
commit 3b87630986
8 changed files with 256 additions and 92 deletions

View File

@ -57,7 +57,15 @@
<td>{$ds['time_limit']} {$ds['time_unit']}</td>
<td>{$ds['data_limit']} {$ds['data_unit']}</td>
<td>{$ds['validity']} {$ds['validity_unit']}</td>
<td>{$ds['routers']}</td>
<td>
{if $ds['is_radius']==1}
<span class="label label-primary">RADIUS</span>
{else}
{if $ds['routers']!=''}
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
{/if}
{/if}
</td>
<td>{$ds['pool_expired']}</td>
<td>
<a href="{$_url}services/edit/{$ds['id']}"

74
ui/ui/radius-nas-edit.tpl Normal file
View File

@ -0,0 +1,74 @@
{include file="sections/header.tpl"}
<!-- routers-add -->
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">Radius - Edit NAS</div>
<div class="panel-body">
<form class="form-horizontal" method="post" role="form" action="{$_url}radius/nas-edit-post/{$d['id']}">
<div class="form-group">
<label class="col-md-2 control-label">{$_L['Router_Name']}</label>
<div class="col-md-6">
<input type="text" required class="form-control" id="shortname" name="shortname" value="{$d['shortname']}" maxlength="32">
<p class="help-block">{Lang::T('Name of Area that router operated')}</p>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{$_L['IP_Address']}</label>
<div class="col-md-6">
<input type="text" placeholder="192.168.88.1" value="{$d['nasname']}" required class="form-control" id="nasname"
name="nasname" maxlength="128">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Secret</label>
<div class="col-md-6">
<input type="password" class="form-control" id="secret" name="secret" required value="{$d['secret']}"
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'" maxlength="60">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Ports</label>
<div class="col-md-2">
<input type="text" class="form-control" id="ports" name="ports" placeholder="null" value="{$d['ports']}">
</div>
<label class="col-md-2 control-label">Type</label>
<div class="col-md-2">
<input type="text" class="form-control" id="type" name="type" value="other" value="{$d['type']}" required
placeholder="other">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Server</label>
<div class="col-md-2">
<input type="text" class="form-control" id="server" name="server" value="{$d['server']}" placeholder="null">
</div>
<label class="col-md-2 control-label">Community</label>
<div class="col-md-2">
<input type="text" class="form-control" id="community" name="community" value="{$d['community']}" placeholder="null">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{$_L['Description']}</label>
<div class="col-md-6">
<textarea class="form-control" id="description" name="description"> {htmlentities($d['description'])}</textarea>
<p class="help-block">{Lang::T('Explain Coverage of router')}</p>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-primary waves-effect waves-light"
type="submit">{$_L['Save']}</button>
Or <a href="{$_url}radius/nas-list">{$_L['Cancel']}</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}

View File

@ -14,7 +14,7 @@
<div class="input-group-addon">
<span class="fa fa-search"></span>
</div>
<input type="text" name="name" class="form-control"
<input type="text" name="name" class="form-control" value="{$name}"
placeholder="{$_L['Search_by_Name']}...">
<div class="input-group-btn">
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
@ -31,7 +31,7 @@
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>Name</th>
<th>IP</th>
<th>Type</th>
@ -42,10 +42,9 @@
</tr>
</thead>
<tbody>
{$no = 1}
{foreach $nas as $ds}
<tr>
<td align="center">{$no++}</td>
<td align="center">{$ds['id']}</td>
<td>{$ds['shortname']}</td>
<td>{$ds['nasname']}</td>
<td>{$ds['type']}</td>

View File

@ -163,10 +163,6 @@
href="{$_url}services/hotspot">{$_L['Hotspot_Plans']}</a></li>
<li {if $_routes[1] eq 'pppoe'}class="active" {/if}><a
href="{$_url}services/pppoe">{$_L['PPPOE_Plans']}</a></li>
{if $_c['radius_enable'] == 'yes'}
<li {if $_routes[1] eq 'radius'}class="active" {/if}><a
href="{$_url}services/radius">{Lang::T('Radius Plans')}</a></li>
{/if}
<li {if $_routes[1] eq 'list'}class="active" {/if}><a
href="{$_url}bandwidth/list">{$_L['Bandwidth_Plans']}</a></li>
<li {if $_routes[1] eq 'balance'}class="active" {/if}><a