Fix allocation behavior, closes #712

This commit is contained in:
Dane Everitt 2018-01-08 22:12:19 -06:00
parent 036bea2b94
commit 22511c8e24
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 34 additions and 5 deletions

View file

@ -90,7 +90,7 @@
<label for="pAllocationIP" class="control-label">IP Address</label>
<div>
<select class="form-control" name="allocation_ip" id="pAllocationIP" multiple>
@foreach($node->allocations->unique('ip')->values()->all() as $allocation)
@foreach($allocations as $allocation)
<option value="{{ $allocation->ip }}">{{ $allocation->ip }}</option>
@endforeach
</select>
@ -132,7 +132,7 @@
<div class="row">
<div class="col-md-12">
<select class="form-control" name="ip">
@foreach($node->allocations->unique('ip')->values()->all() as $allocation)
@foreach($allocations as $allocation)
<option value="{{ $allocation->ip }}">{{ $allocation->ip }}</option>
@endforeach
</select>
@ -156,10 +156,12 @@
$('#pAllocationIP').select2({
tags: true,
maximumSelectionLength: 1,
selectOnClose: true,
tokenSeparators: [',', ' '],
});
$('#pAllocationPorts').select2({
tags: true,
selectOnClose: true,
tokenSeparators: [',', ' '],
});
$('button[data-action="deallocate"]').click(function (event) {