Mobile Integration: * in footer.php js eingefügt damit das mobile Menu funktioniert * in menu.php bzw. app.css neue Klasse eingefügt mobile-hide um in der mobilen Version Menupünkte zu verstecken Pop Multiple Networks * Pops können nun mehrere Netzgebiete haben * Netzgebiete und Pop ansicht angepasst * (Script muss ausgeführt werden um die PopNetwork Table vom Bestand zu befüllen) DataTables responsible update * Datatables update und responsible addon * Diverse Anpassungen für Responsible in: - Pops, Geräte Hersteller, Geräte Typen, Devices, Benutzer Migrations * PopNetwork * Poprackmodulepatch
189 lines
9.0 KiB
PHP
189 lines
9.0 KiB
PHP
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
|
|
|
if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
|
|
$cancelUrl = self::getUrl("Pop", "Detail", ["id" => $pop->id]);
|
|
$cancelText = "Pop Detail";
|
|
} else if (isset($_GET['returnto'])) {
|
|
$cancelUrl = self::getUrl("Pop");
|
|
$cancelText = "Pops";
|
|
} else {
|
|
$cancelUrl = self::getUrl("Network");
|
|
}
|
|
?>
|
|
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
|
type="text/css"/>
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
|
|
</li>
|
|
<?php if (empty($_GET["returnto"])) {
|
|
?>
|
|
<li class="breadcrumb-item"><a href="<?= self::getUrl("Network") ?>">Netzgebiete</a></li>
|
|
<li class="breadcrumb-item">Pop</li>
|
|
<?php
|
|
} else {
|
|
?>
|
|
|
|
<li class="breadcrumb-item"><a
|
|
href="<?= $cancelUrl ?>"><?= ucfirst($cancelText) ?>
|
|
</a></li>
|
|
<?php
|
|
}
|
|
?>
|
|
<li class="breadcrumb-item active"><?= ($pop->id) ? "bearbeiten" : "Neu" ?></li>
|
|
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title"><?= ($pop->id) ? "POP bearbeiten" : "Neuer POP" ?></h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="header-title mb-2"><?= ($pop->id) ? "POP bearbeiten" : "Neuer POP" ?></h4>
|
|
|
|
<form class="form-horizontal" method="post"
|
|
action="<?= self::getUrl("Pop", "save", ["returnto" => $_GET["returnto"]]) ?>">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
|
|
<input type="hidden" name="id" value="<?= $pop->id ?>"/>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="network_id">Netzgebiet</label>
|
|
<div class="col-lg-10">
|
|
<select class="select2 form-control " multiple="multiple" name="network_id[]"
|
|
id="owner_id">
|
|
<option></option>
|
|
<?php foreach ($networks as $network): ?>
|
|
<option value="<?= $network->id ?>" <?= (in_array($network->id, $popnetwork)) ? "selected='selected'" : "" ?>><?= ($network->name) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="name">Name</label>
|
|
<div class="col-lg-10">
|
|
<input type="text" class="form-control" name="name" id="name"
|
|
value="<?= $pop->name ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="gps_lat">GPS Breite</label>
|
|
<div class="col-lg-10">
|
|
<input type="number" step="any" class="form-control" name="gps_lat" id="name"
|
|
value="<?= $pop->gps_lat ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="gps_long">GPS Länge</label>
|
|
<div class="col-lg-10">
|
|
<input type="number" step="any" class="form-control" name="gps_long" id="name"
|
|
value="<?= $pop->gps_long ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="location">Standortinfo</label>
|
|
<div class="col-lg-10">
|
|
<textarea id="note" class="form-control" name="location"
|
|
rows="5"><?= $pop->location ?></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h2 class="header-title mb-2">Access VLANs</h2>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="vlan_public">Public</label>
|
|
<div class="col-lg-10">
|
|
<input type="number" class="form-control" name="vlan_public" id="vlan_public"
|
|
value="<?= $pop->vlan_public ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="vlan_nat">NAT</label>
|
|
<div class="col-lg-10">
|
|
<input type="number" class="form-control" name="vlan_nat" id="vlan_nat"
|
|
value="<?= $pop->vlan_nat ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="vlan_ipv6">IPv6</label>
|
|
<div class="col-lg-10">
|
|
<input type="number" class="form-control" name="vlan_ipv6" id="vlan_ipv6"
|
|
value="<?= $pop->vlan_ipv6 ?>">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="form-group row">
|
|
<label class="col-lg-2 col-form-label" for="note">Interne Notiz</label>
|
|
<div class="col-lg-10">
|
|
<textarea id="note" class="form-control" name="note"
|
|
rows="5"><?= $pop->note ?></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-lg-2"></label>
|
|
<div class="col-lg-10">
|
|
<button type="submit" class="btn btn-primary">Speichern</button>
|
|
<a href="<?= $cancelUrl ?>">
|
|
<button type="button" class="btn btn-secondary">Abbrechen</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$("#parent_id").select2({
|
|
allowClear: true,
|
|
placeholder: ""
|
|
});
|
|
$("#addresstypes").select2();
|
|
|
|
// disable mousewheel on a input number field when in focus
|
|
$('form').on('focus', 'input[type=number]', function (e) {
|
|
$(this).on('wheel.disableScroll', function (e) {
|
|
e.preventDefault()
|
|
})
|
|
});
|
|
$('form').on('blur', 'input[type=number]', function (e) {
|
|
$(this).off('wheel.disableScroll')
|
|
});
|
|
$(".select2").select2();
|
|
</script>
|
|
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|