honoring config option force_ip_to_sysname in bill creation and editing (#10382)

* honoring config option `force_ip_to_sysname` in bill creation and editing

* refactored variable name to match it in edit.inc.php

* forgot one variable

* and one more :S

* Update new_bill.inc.php

* Update edit.inc.php

* Update new_bill.inc.php

* Update edit.inc.php

* Update edit.inc.php

* Update edit.inc.php

Co-authored-by: Neil Lathwood <gh+n@laf.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Tom van Leeuwen
2020-04-12 02:10:45 +02:00
committed by GitHub
parent 909035b180
commit 4a6a0af489
2 changed files with 9 additions and 20 deletions

View File

@@ -41,16 +41,10 @@ if (Auth::user()->hasGlobalAdmin()) {
<div class="form-group">
<label class="col-sm-4 control-label" for="device">Device</label>
<div class="col-sm-8">
<select class="form-control input-sm" id="device" name="device" onchange="getInterfaceList(this)">
<option value=''>Select a device</option>
<?php
$devices = dbFetchRows('SELECT * FROM `devices` ORDER BY hostname');
foreach ($devices as $device) {
$selected = $device['device_id'] == $port_device_id ? " selected" : "";
echo "<option value='${device['device_id']}' $selected>" . format_hostname($device) . "</option>\n";
}
?>
</select>
<select class="form-control input-sm" id="device" name="device" onchange="getInterfaceList(this)"></select>
<script type="text/javascript">
init_select2('#device', 'device', {}, <?php echo "{id: $port_device_id, text: '" . format_hostname($device) . "'}"; ?>);
</script>
</div>
</div>
<div class="form-group">