@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $data_child = $data_child->orderby($form['table'].'.id', 'desc')->get(); |
42 | - foreach($data_child as $d): |
|
42 | + foreach ($data_child as $d): |
|
43 | 43 | ?> |
44 | 44 | <tr> |
45 | 45 | @foreach($form['columns'] as $col) |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | </tr> |
90 | 90 | |
91 | - <?php endforeach;?> |
|
91 | + <?php endforeach; ?> |
|
92 | 92 | |
93 | 93 | @if(count($data_child)==0) |
94 | 94 | <tr class="trNull"> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } else { |
26 | 26 | $val = $label = $d; |
27 | 27 | } |
28 | - $checked = ( ($value && in_array($val, $value)) || (CRUDBooster::isCreate() && ($k==0 && $form['validation'])) ) ? "checked" : ""; |
|
28 | + $checked = (($value && in_array($val, $value)) || (CRUDBooster::isCreate() && ($k == 0 && $form['validation']))) ? "checked" : ""; |
|
29 | 29 | ?> |
30 | 30 | <div class=" {{$disabled}}"> |
31 | 31 | <label class='radio-inline'> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | foreach ($selects_data as $d) { |
73 | 73 | $val = $d->{$select_field_alias}; |
74 | - if ($val == '' || ! $d->id) continue; |
|
74 | + if ($val == '' || !$d->id) continue; |
|
75 | 75 | |
76 | 76 | $checked = ($value == $d->id) ? "checked" : ""; |
77 | 77 |
@@ -164,9 +164,9 @@ |
||
164 | 164 | } |
165 | 165 | $result = $result->orderby($select_title, 'asc')->get(); |
166 | 166 | |
167 | - if($form['datatable_orig'] != ''){ |
|
167 | + if ($form['datatable_orig'] != '') { |
|
168 | 168 | $params = explode("|", $form['datatable_orig']); |
169 | - if(!isset($params[2])) $params[2] = "id"; |
|
169 | + if (!isset($params[2])) $params[2] = "id"; |
|
170 | 170 | $value = DB::table($params[0])->where($params[2], $id)->first()->{$params[1]}; |
171 | 171 | $value = explode(",", $value); |
172 | 172 | } else { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $datatable = $form['datatable']; |
3 | -if ($datatable && ! $form['relationship_table']) { |
|
3 | +if ($datatable && !$form['relationship_table']) { |
|
4 | 4 | $datatable = explode(',', $datatable); |
5 | 5 | $table = $datatable[0]; |
6 | 6 | $field = $datatable[1]; |
@@ -10,9 +10,9 @@ discard block |
||
10 | 10 | if ($datatable && $form['relationship_table']) { |
11 | 11 | $datatable_table = explode(',', $datatable)[0]; |
12 | 12 | $datatable_field = explode(',', $datatable)[1]; |
13 | - if($form['datatable_orig'] != ''){ |
|
13 | + if ($form['datatable_orig'] != '') { |
|
14 | 14 | $params = explode("|", $form['datatable_orig']); |
15 | - if(!isset($params[2])) $params[2] = "id"; |
|
15 | + if (!isset($params[2])) $params[2] = "id"; |
|
16 | 16 | $values = explode(",", DB::table($params[0])->where($params[2], $id)->first()->{$params[1]}); |
17 | 17 | $tableData = DB::table($datatable_table)->whereIn("id", $values)->select($datatable_field)->pluck($datatable_field)->toArray(); |
18 | 18 | } else { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php $default = ! empty($form['default']) ? $form['default'] : trans('crudbooster.text_prefix_option')." ".$form['label'];?> |
|
1 | +<?php $default = !empty($form['default']) ? $form['default'] : trans('crudbooster.text_prefix_option')." ".$form['label']; ?> |
|
2 | 2 | @if($form['parent_select']) |
3 | 3 | <?php |
4 | 4 | $parent_select = (count(explode(",", $form['parent_select'])) > 1) ? explode(",", $form['parent_select']) : $form['parent_select']; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <select class='form-control' id="{{$name}}" data-value='{{$value}}' {{$required}} {!!$placeholder!!} {{$readonly}} {{$disabled}} name="{{$name}}"> |
70 | 70 | <option value=''>{{$default}}</option> |
71 | 71 | <?php |
72 | - if (! $form['parent_select']) { |
|
72 | + if (!$form['parent_select']) { |
|
73 | 73 | if (@$form['dataquery']): |
74 | 74 | |
75 | 75 | $query = DB::select(DB::raw($form['dataquery'])); |
@@ -102,7 +102,7 @@ |
||
102 | 102 | geocoder = new google.maps.Geocoder(); |
103 | 103 | var map = new google.maps.Map(document.getElementById('map-{{$name}}'), { |
104 | 104 | @if($row->{$form['latitude']} && $row->{$form['longitude']}) |
105 | - center: {lat: <?php echo $row->{$form['latitude']} ?: 0;?>, lng: <?php echo $row->{$form['longitude']} ?: 0;?> }, |
|
105 | + center: {lat: <?php echo $row->{$form['latitude']} ?: 0; ?>, lng: <?php echo $row->{$form['longitude']} ?: 0; ?> }, |
|
106 | 106 | @endif |
107 | 107 | zoom: 12 |
108 | 108 | }); |
@@ -41,13 +41,13 @@ |
||
41 | 41 | function initMap{{$name}}() { |
42 | 42 | @if($row->{$form['latitude']} && $row->{$form['longitude']}) |
43 | 43 | var map = new google.maps.Map(document.getElementById('map-{{$name}}'), { |
44 | - center: {lat: <?php echo $row->{$form['latitude']} ?: 0;?>, lng: <?php echo $row->{$form['longitude']} ?: 0;?> }, |
|
44 | + center: {lat: <?php echo $row->{$form['latitude']} ?: 0; ?>, lng: <?php echo $row->{$form['longitude']} ?: 0; ?> }, |
|
45 | 45 | zoom: 12 |
46 | 46 | }); |
47 | 47 | var infoWindow = new google.maps.InfoWindow(); |
48 | 48 | |
49 | 49 | var marker = new google.maps.Marker({ |
50 | - position: {lat: <?php echo $row->{$form['latitude']} ?: 0;?>, lng: <?php echo $row->{$form['longitude']} ?: 0;?> }, |
|
50 | + position: {lat: <?php echo $row->{$form['latitude']} ?: 0; ?>, lng: <?php echo $row->{$form['longitude']} ?: 0; ?> }, |
|
51 | 51 | map: map, |
52 | 52 | title: '{{$value}}' |
53 | 53 | }); |
@@ -8,11 +8,11 @@ |
||
8 | 8 | <div class="{{$col_width?:'col-sm-10'}}"> |
9 | 9 | @if($value) |
10 | 10 | <?php |
11 | - if(Storage::exists($value) || file_exists($value)): |
|
11 | + if (Storage::exists($value) || file_exists($value)): |
|
12 | 12 | $url = asset($value); |
13 | 13 | $ext = pathinfo($url, PATHINFO_EXTENSION); |
14 | 14 | $images_type = array('jpg', 'png', 'gif', 'jpeg', 'bmp', 'tiff'); |
15 | - if(in_array(strtolower($ext), $images_type)): |
|
15 | + if (in_array(strtolower($ext), $images_type)): |
|
16 | 16 | ?> |
17 | 17 | <p><a data-lightbox='roadtrip' href='{{$url}}'><img style='max-width:160px' title="Image For {{$form['label']}}" src='{{$url}}'/></a></p> |
18 | 18 | <?php else:?> |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | $ext = pathinfo($value, PATHINFO_EXTENSION); |
3 | 3 | $images_type = array('jpg', 'png', 'gif', 'jpeg', 'bmp', 'tiff'); |
4 | -if(Storage::exists($value) || file_exists($value)): |
|
5 | -if(in_array(strtolower($ext), $images_type)):?> |
|
4 | +if (Storage::exists($value) || file_exists($value)): |
|
5 | +if (in_array(strtolower($ext), $images_type)):?> |
|
6 | 6 | <a data-lightbox='roadtrip' href='{{asset($value)}}'><img style='max-width:150px' title="Image For {{$form['label']}}" src='{{asset($value)}}'/></a> |
7 | 7 | <?php else:?> |
8 | 8 | <a href='{{asset($value)}}?download=1' target="_blank">{{trans("crudbooster.button_download_file")}}: {{basename($value)}} <i class="fa fa-download"></i></a> |
9 | -<?php endif;?> |
|
10 | -<?php endif;?> |
|
9 | +<?php endif; ?> |
|
10 | +<?php endif; ?> |