33<div >
44 <label >{!! $field [' label' ] ! !} </label >
55 <input type =" text" id =" {{ $field [' name' ] } }" name =" {{ $field [' name' ] } }"
6- value =" {{ old ($field [' name' ]) ? old ($field [' name' ]) : (isset ($field [' value' ]) ? $field [' value' ] : (isset ($field [' default' ]) ? $field [' default' ] : ' ' )) } }"
7- @include (' crud::fields.inc.attributes' )>
8- <input type =" hidden" name =" address_latitude" id =" address-latitude" value =" 0" />
9- <input type =" hidden" name =" address_longitude" id =" address-longitude" value =" 0" />
6+ value =" {{ old ($field [' name' ]) ? old ($field [' name' ]) : (isset ($field [' value' ]) ? $field [' value' ] : (isset ($field [' default' ]) ? $field [' default' ] : ' ' )) } }"
7+ @include (' crud::fields.inc.attributes' )>
8+ <input type =" hidden" name =" address_latitude" id =" address-latitude" value =" {{ $crud -> entry ?-> address_latitude } }" />
9+ <input type =" hidden" name =" address_longitude" id =" address-longitude"
10+ value =" {{ $crud -> entry ?-> address_longitude } }" />
1011 <div id =" address-map-container" style =" width :100% ;height :400px ; " >
1112 <div style =" width : 100% ; height : 100% " id =" address-map" ></div >
1213 </div >
1314
1415 {{-- HINT --}}
1516 @if (isset ($field [' hint' ]) )
16- <p class =" help-block" >{!! $field [' hint' ] ! !} </p >
17+ <p class =" help-block" >{!! $field [' hint' ] ! !} </p >
1718 @endif
1819</div >
1920@include (' crud::fields.inc.wrapper_end' )
2021@if ($crud -> checkIfFieldIsFirstOfItsType ($field , $fields ) )
21- {{-- FIELD EXTRA CSS --}}
22- {{-- push things in the after_styles section --}}
22+ {{-- FIELD EXTRA CSS --}}
23+ {{-- push things in the after_styles section --}}
2324
24- @push (' crud_fields_styles' )
25- <!-- no styles -->
26- @endpush
25+ @push (' crud_fields_styles' )
26+ <!-- no styles -->
27+ @endpush
2728
28- {{-- FIELD EXTRA JS --}}
29- {{-- push things in the after_scripts section --}}
29+ {{-- FIELD EXTRA JS --}}
30+ {{-- push things in the after_scripts section --}}
3031
31- @push (' crud_fields_scripts' )
32- <!-- no scripts -->
33- <script
34- src =" https://maps.googleapis.com/maps/api/js?key={{ env (' GOOGLE_MAPS_API_KEY' ) } } &libraries=places&callback=initialize"
35- async defer ></script >
36- <script >
37- function initialize () {
32+ @push (' crud_fields_scripts' )
33+ <!-- no scripts -->
34+ <script
35+ src =" https://maps.googleapis.com/maps/api/js?key={{ env (' GOOGLE_MAPS_API_KEY' ) } } &libraries=places&callback=initialize"
36+ async defer ></script >
37+ <script >
38+ function initialize () {
3839
3940 $ (' form' ).on (' keyup keypress' , function (e ) {
4041 var keyCode = e .keyCode || e .which ;
@@ -116,6 +117,6 @@ function setLocationCoordinates(key, lat, lng) {
116117 latitudeField .value = lat;
117118 longitudeField .value = lng;
118119 }
119- </script >
120- @endpush
120+ </script >
121+ @endpush
121122@endif
0 commit comments