Skip to content

Commit

Permalink
Merge pull request #14983 from snipe/fixes/use_more_modern_request_sy…
Browse files Browse the repository at this point in the history
…ntax_in_blades

Use more modern reference for input text
  • Loading branch information
snipe authored Jul 2, 2024
2 parents f027fd5 + d687b20 commit f22e99a
Show file tree
Hide file tree
Showing 38 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion resources/views/accessories/checkin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<div class="col-md-7">
<div class="input-group col-md-5 required" style="padding-left: 0px;">
<div class="input-group date" data-date-clear-btn="true" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkin_at" id="checkin_at" value="{{ Request::old('checkin_at', date('Y-m-d')) }}">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkin_at" id="checkin_at" value="{{ old('checkin_at', date('Y-m-d')) }}">
<span class="input-group-addon"><i class="fas fa-calendar"></i></span>
</div>
{!! $errors->first('checkin_at', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/custom_fields/fields/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<!-- Encrypted -->
<div class="col-md-9 col-md-offset-3" id="encryption_section">
<label class="form-control">
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted"{{ (Request::old('field_encrypted') || $field->field_encrypted) ? ' checked="checked"' : '' }}>
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted"{{ (old('field_encrypted') || $field->field_encrypted) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.encrypt_field') }}
</label>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/depreciations/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</label>
<div class="col-md-7 col-sm-12 {{ (Helper::checkIfRequired($item, 'months')) ? ' required' : '' }}">
<div class="col-md-7" style="padding-left:0px">
<input class="form-control" type="text" name="months" id="months" value="{{ Request::old('months', $item->months) }}" style="width: 80px;"{!! (\App\Helpers\Helper::checkIfRequired($item, 'months')) ? ' required' : '' !!} />
<input class="form-control" type="text" name="months" id="months" value="{{ old('months', $item->months) }}" style="width: 80px;"{!! (\App\Helpers\Helper::checkIfRequired($item, 'months')) ? ' required' : '' !!} />
{!! $errors->first('months', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
Expand All @@ -29,7 +29,7 @@
{{ trans('admin/depreciations/general.depreciation_min') }}
</label>
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" name="depreciation_min" id="depreciation_min" value="{{ Request::old('depreciation_min', $item->depreciation_min) }}" style="width: 80px; margin-left:15px" />
<input class="form-control" name="depreciation_min" id="depreciation_min" value="{{ old('depreciation_min', $item->depreciation_min) }}" style="width: 80px; margin-left:15px" />
</div>
{!! $errors->first('depreciation_min', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/hardware/audit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

<div class="col-md-8 col-md-offset-3">
<label class="form-control">
<input type="checkbox" value="1" name="update_location" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
<input type="checkbox" value="1" name="update_location" {{ old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
</label>
<p class="help-block">{!! trans('help.audit_help') !!}</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/hardware/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
@if ($item->model && $item->model->fieldset)
<?php $model = $item->model; ?>
@endif
@if (Request::old('model_id'))
@if (old('model_id'))
@php
$model = \App\Models\AssetModel::find(old('model_id'));
@endphp
Expand Down
10 changes: 5 additions & 5 deletions resources/views/hardware/history.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<div class="form-group">
<div class="col-sm-10 col-md-offset-2">
<label class="form-control">
{{ Form::checkbox('match_firstnamelastname', '1', Request::old('match_firstnamelastname')) }}
{{ Form::checkbox('match_firstnamelastname', '1', old('match_firstnamelastname')) }}
<!-- enclosing span needed for the checkbox CSS to work properly, since there's HTML in the label text -->
<span>
{!! trans('admin/hardware/general.csv_import_match_f-l') !!}
Expand All @@ -100,7 +100,7 @@
<div class="form-group">
<div class="col-sm-10 col-md-offset-2">
<label class="form-control">
{{ Form::checkbox('match_flastname', '1', Request::old('match_flastname')) }}
{{ Form::checkbox('match_flastname', '1', old('match_flastname')) }}
<!-- enclosing span needed for the checkbox CSS to work properly, since there's HTML in the label text -->
<span>
{!! trans('admin/hardware/general.csv_import_match_initial_last') !!}
Expand All @@ -113,7 +113,7 @@
<div class="form-group">
<div class="col-sm-10 col-md-offset-2">
<label class="form-control">
{{ Form::checkbox('match_firstname', '1', Request::old('match_firstname')) }}
{{ Form::checkbox('match_firstname', '1', old('match_firstname')) }}
<!-- enclosing span needed for the checkbox CSS to work properly, since there's HTML in the label text -->
<span>
{!! trans('admin/hardware/general.csv_import_match_first') !!}
Expand All @@ -126,7 +126,7 @@
<div class="form-group">
<div class="col-sm-10 col-md-offset-2">
<label class="form-control">
{{ Form::checkbox('match_email', '1', Request::old('match_email')) }}
{{ Form::checkbox('match_email', '1', old('match_email')) }}
<!-- enclosing span needed for the checkbox CSS to work properly, since there's HTML in the label text -->
<span>
{!! trans('admin/hardware/general.csv_import_match_email') !!}
Expand All @@ -139,7 +139,7 @@
<div class="form-group">
<div class="col-sm-10 col-md-offset-2">
<label class="form-control">
{{ Form::checkbox('match_username', '1', Request::old('match_username')) }}
{{ Form::checkbox('match_username', '1', old('match_username')) }}
<!-- enclosing span needed for the checkbox CSS to work properly, since there's HTML in the label text -->
<span>
{!! trans('admin/hardware/general.csv_import_match_username') !!}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/hardware/quickscan-checkin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{{ Form::label('asset_tag', trans('general.asset_tag'), array('class' => 'col-md-3 control-label', 'id' => 'checkin_tag')) }}
<div class="col-md-9">
<div class="input-group date col-md-5" data-date-format="yyyy-mm-dd">
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ Request::old('asset_tag') }}">
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ old('asset_tag') }}">

</div>
{!! $errors->first('asset_tag', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/hardware/quickscan.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{ Form::label('asset_tag', trans('general.asset_tag'), array('class' => 'col-md-3 control-label', 'id' => 'audit_tag')) }}
<div class="col-md-9">
<div class="input-group date col-md-5" data-date-format="yyyy-mm-dd">
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ Request::old('asset_tag') }}">
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ old('asset_tag') }}">

</div>
{!! $errors->first('asset_tag', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
Expand Down
4 changes: 2 additions & 2 deletions resources/views/kits/accessory-edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<label for="quantity" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7 required">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" />
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" />
</div>
{!! $errors->first('quantity', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
</div>

<input type="hidden" name="pivot_id" value="{{$item->id}}">
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" /> --}}
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" /> --}}

@stop
6 changes: 3 additions & 3 deletions resources/views/kits/checkout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</label>
<div class="col-md-8">
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ Request::old('checkout_at') }}">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ old('checkout_at') }}">
<span class="input-group-addon"><i class="fas fa-calendar"></i></span>
</div>
{!! $errors->first('checkout_at', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
Expand All @@ -46,7 +46,7 @@
</label>
<div class="col-md-8">
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-start-date="0d">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Request::old('expected_checkin') }}">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ old('expected_checkin') }}">
<span class="input-group-addon"><i class="fas fa-calendar"></i></span>
</div>
{!! $errors->first('expected_checkin', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
Expand All @@ -60,7 +60,7 @@
{{ trans('general.notes') }}
</label>
<div class="col-md-8">
<textarea class="col-md-6 form-control" id="note" name="note">{{ Request::old('note') }}</textarea>
<textarea class="col-md-6 form-control" id="note" name="note">{{ old('note') }}</textarea>
{!! $errors->first('note', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/kits/consumable-edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<label for="quantity" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7 required">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" />
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" />
</div>
{!! $errors->first('quantity', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
</div>

<input type="hidden" name="pivot_id" value="{{$item->id}}">
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" /> --}}
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" /> --}}

@stop
4 changes: 2 additions & 2 deletions resources/views/kits/license-edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<label for="quantity" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7 required">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" />
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" />
</div>
{!! $errors->first('quantity', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
</div>

<input type="hidden" name="pivot_id" value="{{$item->id}}">
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" /> --}}
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" /> --}}

@stop
4 changes: 2 additions & 2 deletions resources/views/kits/model-edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<label for="quantity" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7 required">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" />
<input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" />
</div>
{!! $errors->first('quantity', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
</div>

<input type="hidden" name="pivot_id" value="{{$item->id}}">
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ Request::old('quantity', $item->quantity) }}" /> --}}
{{-- <input class="form-control" type="text" name="quantity" id="quantity" value="{{ old('quantity', $item->quantity) }}" /> --}}

@stop
2 changes: 1 addition & 1 deletion resources/views/licenses/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<label for="seats" class="col-md-3 control-label">{{ trans('admin/licenses/form.seats') }}</label>
<div class="col-md-7 col-sm-12 required">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="seats" id="seats" value="{{ Request::old('seats', $item->seats) }}" />
<input class="form-control" type="text" name="seats" id="seats" value="{{ old('seats', $item->seats) }}" />
</div>
</div>
{!! $errors->first('seats', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/modals/location.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12 country"><label for="modal-country">{{ trans('general.country') }}:</label></div>
<div class="col-md-8 col-xs-12">{!! Form::countries('country', Request::old('country'), 'select2 country',"modal-country") !!}</div>
<div class="col-md-8 col-xs-12">{!! Form::countries('country', old('country'), 'select2 country',"modal-country") !!}</div>
</div>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/modals/model.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-fieldset_id">{{ trans('admin/models/general.fieldset') }}:</label></div>
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),Request::old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:350px')) }}</div>
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:350px')) }}</div>
</div>
</div>
<div class="modal-footer">
Expand Down
Loading

0 comments on commit f22e99a

Please sign in to comment.