Fixed and improved subnet add/edit

This commit is contained in:
2023-03-15 07:43:46 +01:00
parent 303c22160d
commit 05e85db3a7
3 changed files with 69 additions and 20 deletions

View File

@@ -39,14 +39,29 @@
</tr>
<tr>
<td class="label">
{$lang_subnet_dhcp}
{$lang_proto_vers}
</td>
<td class="value">
<input type="text" name="subnet_dhcp_start"> -
<input type="text" name="subnet_dhcp_end">
<input type="text" name="subnet_proto_vers" size="2">
</td>
</tr>
<tr>
<td class="label">
{$lang_subnet_dhcp}
</td>
<td class="value">
<input type="text" name="subnet_dhcp_start" size="15"> -
<input type="text" name="subnet_dhcp_end" size="15">
</td>
</tr>
<tr>
<td class="label">
NTP Server
</td>
<td class="value">
<input type="text" name="ntp_server" size="45">
</td>
</tr><tr>
<td class="label">
{$lang_subnet_info}
</td>

View File

@@ -1,15 +1,25 @@
<form method="POST" action="subnet.php">
{if $action eq constant('ACT_EDIT')}
<input type="hidden" name="id" value="{$subnet->id}">
{/if}
<table class="title">
<tr>
<td class="header">
<img class="icon" src="images/plugin.png" alt="" />
{if $action eq constant('ACT_ADD')}
{$lang_subnet_add}
{else}
{$lang_subnet_edit} : {$subnet->address}/{$subnet->mask}
{/if}
</td>
<td align="right">
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"{if $suser_tooltips} title="{$lang_cancel}"{/if}></a>
<input type="image" src="images/save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
{if $action eq constant('ACT_ADD')}
<input type="image" name="submit[insert]" src="images/save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
{else}
<input type="image" name="submit[update]" src="images/save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
{/if}
</td>
</tr>
</table>
@@ -28,7 +38,7 @@
{$lang_subnet_subnetaddress}
</td>
<td class="value">
<input type="text" name="subnet_address" value="{$subnet->address}">
<input type="text" name="subnet_address" value="{$subnet->address}" autofocus>
</td>
</tr>
<tr>
@@ -36,7 +46,7 @@
{$lang_subnet_mask}
</td>
<td class="value">
<input type="text" name="subnet_mask" size="2" value="{$subnet->mask}">
<input type="text" name="subnet_mask" size="2" value="{$subnet->mask}">&nbsp;(8-30)
</td>
</tr>
<tr>
@@ -81,4 +91,25 @@
</tr>
</table>
{if $action eq constant('ACT_ADD')}
<table class="info">
<tr>
<td class="header">
{$lang_vlan}
</td>
<td class="header_right">
&nbsp;
</td>
</tr>
<tr>
<td class="label">
{$lang_vlan}
</td>
<td class="value">
{html_options name=vlan_id options=$vlan_options}
</td>
</tr>
</table>
{/if}
</form>