File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
public/packages/backpack/crud/css Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 44*
55*/
66
7- .form-group .required label : not (: empty ): not (.form-check-label )::after {
7+ .form-group .required > label : not (: empty ): not (.form-check-label )::after {
88 content : ' *' ;
99 color : # ff0000 ;
1010}
Original file line number Diff line number Diff line change 88 }
99 // if the field is required in the FormRequest, it should have an asterisk
1010 $required = (isset ($action ) && $crud -> isRequired ($field [' name' ], $action )) ? ' required' : ' ' ;
11-
11+
1212 // if the developer has intentionally set the required attribute on the field
1313 // forget whatever is in the FormRequest, do what the developer wants
14- $required = ( isset ($field [' showAsterisk' ]) ) ? ($field [' showAsterisk' ] ? ' required' : ' ' ) : $required ;
15-
14+ $required = isset ($field [' showAsterisk' ]) ? ($field [' showAsterisk' ] ? ' required' : ' ' ) : $required ;
15+
1616 $field [' wrapper' ][' class' ] = $field [' wrapper' ][' class' ] ?? " form-group col-sm-12" ;
1717 $field [' wrapper' ][' class' ] = $field [' wrapper' ][' class' ]. $required ;
1818 $field [' wrapper' ][' element' ] = $field [' wrapper' ][' element' ] ?? ' div' ;
Original file line number Diff line number Diff line change 5353 $subfield = $crud -> makeSureFieldHasNecessaryAttributes ($subfield );
5454 $fieldViewNamespace = $subfield [' view_namespace' ] ?? ' crud::fields' ;
5555 $fieldViewPath = $fieldViewNamespace . ' .' . $subfield [' type' ];
56- $subfield [' showAsterisk' ] = false ;
5756 @endphp
5857
5958 @include ($fieldViewPath , [' field' => $subfield ] )
Original file line number Diff line number Diff line change 2222
2323 <!-- CRUD FORM CONTENT - crud_fields_styles stack -->
2424 @stack (' crud_fields_styles' )
25+
26+ {{-- Temporary fix on 4.1 --}}
27+ <style >
28+ .form-group.required label :not (:empty ):not (.form-check-label )::after {
29+ content : ' ' ;
30+ }
31+ .form-group.required > label :not (:empty ):not (.form-check-label )::after {
32+ content : ' *' ;
33+ color : #ff0000 ;
34+ }
35+ </style >
2536@endsection
2637
2738@section (' after_scripts' )
You can’t perform that action at this time.
0 commit comments