Skip to content

Commit

Permalink
Merge pull request #5327 from makss/bootstrap5_class_form-select
Browse files Browse the repository at this point in the history
Added bootstrap5 class form-select
  • Loading branch information
pxpm authored Jan 19, 2024
2 parents 5044460 + c1a359c commit 87905eb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/resources/views/crud/fields/enum.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
@include('crud::fields.inc.translatable_icon')
<select
name="{{ $field['name'] }}"
@include('crud::fields.inc.attributes')
@include('crud::fields.inc.attributes', ['default_class' => 'form-control form-select'])
>

@if ($entity_model::isColumnNullable($field['name']))
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/crud/fields/select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@if(isset($field['prefix'])) <span class="input-group-text">{!! $field['prefix'] !!}</span> @endif
<select
name="{{ $field['name'] }}"
@include('crud::fields.inc.attributes')
@include('crud::fields.inc.attributes', ['default_class' => 'form-control form-select'])
>

@if ($field['allows_null'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@if($field['multiple'])<input type="hidden" name="{{ $field['name'] }}" value="" @if(in_array('disabled', $field['attributes'] ?? [])) disabled @endif />@endif
<select
name="{{ $field['name'] }}@if ($field['multiple'])[]@endif"
@include('crud::fields.inc.attributes')
@include('crud::fields.inc.attributes', ['default_class' => 'form-control form-select'])
@if ($field['multiple'])multiple bp-field-main-input @endif
>

Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/crud/fields/select_grouped.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@if(isset($field['prefix'])) <div class="input-group-prepend"><span class="input-group-text">{!! $field['prefix'] !!}</span></div> @endif
<select
name="{{ $field['name'] }}"
@include('crud::fields.inc.attributes', ['default_class' => 'form-control'])
@include('crud::fields.inc.attributes', ['default_class' => 'form-control form-select'])
>

@if ($field['allows_null'])
Expand Down
3 changes: 1 addition & 2 deletions src/resources/views/crud/fields/select_multiple.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
{{-- To make sure a value gets submitted even if the "select multiple" is empty, we need a hidden input --}}
<input type="hidden" name="{{ $field['name'] }}" value="" @if(in_array('disabled', $field['attributes'] ?? [])) disabled @endif />
<select
class="form-control"
name="{{ $field['name'] }}[]"
@include('crud::fields.inc.attributes')
@include('crud::fields.inc.attributes', ['default_class' => 'form-control form-select'])
bp-field-main-input
multiple>

Expand Down

0 comments on commit 87905eb

Please sign in to comment.