mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix new bill search input (#11524)
* Work around select2 in a modal * Update select2
This commit is contained in:
@@ -6,7 +6,11 @@ var ajax = new Array();
|
||||
function getInterfaceList(sel)
|
||||
{
|
||||
var deviceId = sel.options[sel.selectedIndex].value;
|
||||
document.getElementById('port_id').options.length = 0; // Empty city select box
|
||||
// Empty city select box
|
||||
var el = document.getElementById('port_id');
|
||||
if (el !== null) {
|
||||
el.options.length = 0;
|
||||
}
|
||||
if (deviceId.length>0) {
|
||||
var index = ajax.length;
|
||||
ajax[index] = new sack();
|
||||
|
@@ -43,7 +43,7 @@ if (Auth::user()->hasGlobalAdmin()) {
|
||||
<div class="col-sm-8">
|
||||
<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) . "'}"; ?>);
|
||||
init_select2('#device', 'device', {}, <?php echo "{id: $port_device_id, text: '" . format_hostname($device) . "'}"; ?>, '', {dropdownParent: $('#create-bill .modal-content')});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user