2021-10-08 01:18:39 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<label for="reference" class="col-sm-2 col-form-label text-right">Product</label>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="input-group">
|
|
|
|
<select class="form-control" id="product_id" name="product_id">
|
|
|
|
<option value=""> </option>
|
|
|
|
@php
|
|
|
|
$po = $selected = NULL;
|
|
|
|
@endphp
|
2023-05-05 06:29:08 +00:00
|
|
|
@foreach (\App\Models\Product::active()->get()->filter(function($item) { return get_class($item->type) === \App\Models\Product\Broadband::class; })->sortBy('name') as $o)
|
2021-10-08 01:18:39 +00:00
|
|
|
@php
|
|
|
|
if ($o->id == old('product_id')) {
|
|
|
|
$selected = 'selected';
|
|
|
|
$po = $o;
|
|
|
|
} else {
|
|
|
|
$selected = NULL;
|
|
|
|
}
|
|
|
|
@endphp
|
|
|
|
<option value="{{ $o->id }}" {{ $selected }}>{{ $o->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="offset-2 col-10">
|
|
|
|
<strong>NOTE</strong>: A plan setup fee is normally not applicable to Broadband changes, but a plan change fee normally is.
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-08-01 07:34:31 +00:00
|
|
|
|
2021-10-08 01:18:39 +00:00
|
|
|
@section('page-scripts')
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('select[name=product_id]').change(function() {
|
|
|
|
// If we select a blank, then dont continue
|
|
|
|
if (this.value == 0)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Send the request and update sub category dropdown
|
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
dataType: "html",
|
|
|
|
cache: true,
|
|
|
|
url: '{{ url('product_info') }}'+'/'+$(this).val(),
|
|
|
|
timeout: 5000,
|
|
|
|
error: function(x) {
|
|
|
|
alert("Failed to submit");
|
|
|
|
},
|
|
|
|
success: function(data) {
|
|
|
|
$("div[id=product_info]").empty().append(data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|