Merge pull request #12844 from snipe/fixes/small_blade_parial_fixes

Small blade parial fixes
This commit is contained in:
snipe 2023-04-15 21:04:35 -07:00 committed by GitHub
commit 2eeb7ddf58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ (Helper::checkIfRequired($item, $fieldname)) ? ' required' : '' }}"> <div class="col-md-7{{ (isset($item) && (Helper::checkIfRequired($item, $fieldname))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}> <select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
@if ($category_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : '')) @if ($category_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option"> <option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option">

View file

@ -3,7 +3,7 @@
<div class="form-group {{ $errors->has('qty') ? ' has-error' : '' }}"> <div class="form-group {{ $errors->has('qty') ? ' has-error' : '' }}">
<label for="qty" class="col-md-3 control-label">{{ trans('general.quantity') }}</label> <label for="qty" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'qty')) ? ' required' : '' }}"> <div class="col-md-7{{ (Helper::checkIfRequired($item, 'qty')) ? ' required' : '' }}">
<div class="col-md-2" style="padding-left:0px"> <div class="col-md-3" style="padding-left:0px">
<input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" {!! (Helper::checkIfRequired($item, 'qty')) ? ' data-validation="required" required' : '' !!}/> <input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" {!! (Helper::checkIfRequired($item, 'qty')) ? ' data-validation="required" required' : '' !!}/>
</div> </div>
{!! $errors->first('qty', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!} {!! $errors->first('qty', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}

View file

@ -2,7 +2,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ (Helper::checkIfRequired($item, $fieldname)) ? ' required' : '' }}"> <div class="col-md-7{{ (isset($item) && (Helper::checkIfRequired($item, $fieldname))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="suppliers" data-placeholder="{{ trans('general.select_supplier') }}" name="{{ $fieldname }}" style="width: 100%" id="supplier_select" aria-label="{{ $fieldname }}"> <select class="js-data-ajax" data-endpoint="suppliers" data-placeholder="{{ trans('general.select_supplier') }}" name="{{ $fieldname }}" style="width: 100%" id="supplier_select" aria-label="{{ $fieldname }}">
@if ($supplier_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : '')) @if ($supplier_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $supplier_id }}" selected="selected" role="option" aria-selected="true" role="option"> <option value="{{ $supplier_id }}" selected="selected" role="option" aria-selected="true" role="option">