Skip to content

A free open source IT asset/license management system

Rip out jquery for location parent

snipe778787db3c69
diff --git a/resources/views/locations/edit.blade.php b/resources/views/locations/edit.blade.php
index 0c93c83a81..10d0f59bb0 100755
--- a/resources/views/locations/edit.blade.php
+++ b/resources/views/locations/edit.blade.php
@@ -65,50 +65,3 @@
@include ('partials.forms.edit.image-upload')
@stop
-@if (!$item->id)
-@section('moar_scripts')
-<script nonce="{{ csrf_token() }}">
-
- var $eventSelect = $(".parent");
- $eventSelect.on("change", function () { parent_details($eventSelect.val()); });
- $(function() {
- var parent_loc = $(".parent option:selected").val();
- if(parent_loc!=''){
- parent_details(parent_loc);
- }
- });
-
- function parent_details(id) {
-
- if (id) {
-//start ajax request
-$.ajax({
- type: 'GET',
- url: "{{url('/') }}/api/locations/"+id+"/check",
-//force to handle it as text
-dataType: "text",
-success: function(data) {
- var json = $.parseJSON(data);
- $("#city").val(json.city);
- $("#address").val(json.address);
- $("#address2").val(json.address2);
- $("#state").val(json.state);
- $("#zip").val(json.zip);
- $(".country").select2("val",json.country);
-}
-});
-} else {
- $("#city").val('');
- $("#address").val('');
- $("#address2").val('');
- $("#state").val('');
- $("#zip").val('');
- $(".country").select2("val",'');
-}
-
-
-
-};
-</script>
-@stop
-@endif