Skip to content

Commit

Permalink
Revert "Show frontend "required" validation for model and status sele…
Browse files Browse the repository at this point in the history
…cts"

This reverts commit 10a7ae8.
  • Loading branch information
marcusmoore committed Dec 12, 2024
1 parent 10a7ae8 commit 8417fcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions resources/views/partials/forms/edit/model-select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@

{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}

<div
@class([
'col-md-7',
'required' => isset($field_req) || (isset($required) && ($required =='true'))
])
>
<div class="col-md-7">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}"{{ ((isset($field_req)) || ((isset($required) && ($required =='true')))) ? ' required' : '' }}{{ (isset($multiple) && ($multiple=='true')) ? " multiple='multiple'" : '' }}>
@if ($model_id = old($fieldname, ($item->{$fieldname} ?? request($fieldname) ?? '')))
<option value="{{ $model_id }}" selected="selected">
Expand Down
7 changes: 1 addition & 6 deletions resources/views/partials/forms/edit/status.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<!-- Status -->
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
<div
@class([
'col-md-7 col-sm-11',
'required' => (isset($required) && $required)
])
>
<div class="col-md-7 col-sm-11">
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id', 'required' => 'required')) }}
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
Expand Down

0 comments on commit 8417fcb

Please sign in to comment.