mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Move network edit modal data processing to AJAX
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<div class="modal" id="editNetworkModal<?php echo $network_id; ?>" tabindex="-1">
|
||||
<div class="modal" id="editNetworkModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-network-wired"></i> <?php echo $network_name; ?></h5>
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-network-wired"></i><span id="edit_network_name_header"></span></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="network_id" value="<?php echo $network_id; ?>">
|
||||
<input type="hidden" name="network_id" id="edit_network_id" value="">
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Network name (VLAN, WAN, LAN2 etc)" value="<?php echo $network_name; ?>" required>
|
||||
<input type="text" class="form-control" id="edit_network_name" name="name" placeholder="Network name (VLAN, WAN, LAN2 etc)" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="vlan" placeholder="ex. 20" value="<?php echo $network_vlan; ?>" data-inputmask="'mask': '9999'">
|
||||
<input type="number" class="form-control" id="edit_network_vlan" name="vlan" placeholder="ex. 20" data-inputmask="'mask': '9999'">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-network-wired"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="network" placeholder="Network ex 192.168.1.0/24" value="<?php echo $network; ?>" required>
|
||||
<input type="text" class="form-control" id="edit_network_cidr" name="network" placeholder="Network ex 192.168.1.0/24" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-route"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="gateway" placeholder="ex 192.168.1.1" value="<?php echo $network_gateway; ?>" data-inputmask="'alias': 'ip'" data-mask required>
|
||||
<input type="text" class="form-control" id="edit_network_gw" name="gateway" placeholder="ex 192.168.1.1" data-inputmask="'alias': 'ip'" data-mask required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-server"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="dhcp_range" placeholder="ex 192.168.1.11-199" value="<?php echo $network_dhcp_range; ?>">
|
||||
<input type="text" class="form-control" id="edit_network_dhcp" name="dhcp_range" placeholder="ex 192.168.1.11-199">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,20 +67,8 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="location">
|
||||
<select class="form-control select2" id="edit_network_location" name="location">
|
||||
<option value="">- Location -</option>
|
||||
<?php
|
||||
|
||||
$sql_locations = mysqli_query($mysqli,"SELECT * FROM locations WHERE (location_archived_at > '$network_created_at' OR location_archived_at IS NULL) AND location_client_id = $client_id ORDER BY location_name ASC");
|
||||
while($row = mysqli_fetch_array($sql_locations)){
|
||||
$location_id_select = $row['location_id'];
|
||||
$location_name_select = $row['location_name'];
|
||||
?>
|
||||
<option <?php if($network_location_id == $location_id_select){ echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user