Skip to content

Commit b8b9462

Browse files
Terzi Eduardendihunter
authored andcommitted
Field improvements, bug fixes
1 parent bb064f5 commit b8b9462

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1036
-926
lines changed

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^7.2",
28-
"mockery/mockery": "^1.1"
28+
"mockery/mockery": "^1.1",
29+
"laravel/framework": "^8.20",
30+
"laravel/laravel": "^8.5"
2931
},
3032
"autoload": {
3133
"psr-4": {

publishes/mix/resources/js/components/fields/DateTimePicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@
5454
this.value = this.defaultValue || null;
5555
}
5656
}
57-
</script>
57+
</script>

publishes/views/auth/login.blade.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
</div>
3939
</div>
4040
<div class="form-group">
41-
<div class="pull-right">
42-
<a href="#">Forgot password?</a>
43-
</div>
4441
<div class="pull-left">
4542
<input name="remember_me" type="hidden" value="0"/>
4643
<input type="checkbox" name="remember_me" value="1"/> {{ trans('administrator::buttons.remember_me') }}

publishes/views/components/index/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="panel">
22
<div class="panel-body">
3-
<form method="post" id="collection" action="{{ route('scaffold.batch', ['module' => $resource->url()]) }}">
3+
<form method="post" id="collection" target="_self" action="{{ route('scaffold.batch', ['module' => $resource->url()]) }}">
44
<?php echo Form::hidden('batch_action', null, ['id' => 'batch_action']); ?>
55
<?php echo Form::token(); ?>
66

publishes/views/components/table/row.blade.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
@endcomponent
1212
@else
1313
<tr>
14-
<td style="width: 20%; min-width: 200px;">
15-
{!! $label ?? '' !!}
16-
@if (isset($description) && !empty($description))
17-
<p class="small">{!! $description !!}</p>
18-
@endif
19-
</td>
20-
<td>{!! $input ?? '' !!}</td>
14+
@if(!empty($label))
15+
<td style="width: 20%; min-width: 200px;">
16+
{!! $label ?? '' !!}
17+
@if (isset($description) && !empty($description))
18+
<p class="small">{!! $description !!}</p>
19+
@endif
20+
</td>
21+
@endif
22+
<td {!! (!empty($label) ? '' : 'colspan="2"') !!}>{!! $input ?? '' !!}</td>
2123
</tr>
2224
@endif

publishes/views/fields/belongs_to/edit.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
@if ($searchable && $searchIn)
66
<instant-search
7-
name="{{ $field->name() }}"
8-
data-url="/cms/search/?searchable={{ $searchIn }}&field={{ $searchBy }}"
9-
default-value="{{ (int) optional($field->value())->getKey() }}"
7+
name="{{ $field->name() }}"
8+
data-url="{{ $searchUrl }}"
9+
default-value="{{ optional($field->value())->getKey() }}"
1010
></instant-search>
1111
@endif
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
{!! Form::select($field->name(), $options, $field->value(), $attributes) !!}
1+
@if ('datalist' === $field->type)
2+
{!! Form::text($field->name(), $field->value(), ['id' => $field->id(), 'class' => 'form-control', 'list' => "scaffold_{$field->id()}"]) !!}
3+
{!! Form::datalist("scaffold_{$field->id()}", $field->options) !!}
4+
@else
5+
{{ Form::select($field->name(), $field->options ?? [], $field->value(), ['class' => 'form-control', 'multiple' => $field->isArray] + $field->getAttributes()) }}
6+
@endif
7+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<span {!! ($color ? "class=\"label\" style=\"background-color: $color\"" : "" ) !!} >
2-
{{ ($field->value() ? \Illuminate\Support\Arr::get($options, $field->value()) : '---') }}
2+
{{ ($field->value() ? \Illuminate\Support\Arr::get($field->options, $field->value()) : '---') }}
33
</span>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
asfa
1+
<span class="warning">Not implemented</span>

publishes/views/fields/has_many/index.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<span class="label label-success">
33
@if ($url)
44
<a href="{{ $url }}" style="color: white;">
5-
<i class="fa fa-{{ $icon }}"></i>&nbsp;{{ $count }}
5+
<i class="fa fa-{{ $field->icon }}"></i>&nbsp;{{ $count }}
66
</a>
77
@else
8-
<i class="fa fa-{{ $icon }}"></i>&nbsp;{{ $count }}
8+
<i class="fa fa-{{ $field->icon }}"></i>&nbsp;{{ $count }}
99
@endif
1010
</span>
11-
@endif
11+
@endif

0 commit comments

Comments
 (0)