mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #16235 from marcusmoore/chore/migrate-form-open-pt1
Replace Form::open and Form::close pt1
This commit is contained in:
commit
e814cd5a9e
|
@ -11,7 +11,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off']) }}
|
||||
<form method="POST" action="{{ route('account.password.update') }}" accept-charset="UTF-8" class="form-horizontal" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<div class="box box-default">
|
||||
|
@ -63,7 +63,7 @@
|
|||
</div>
|
||||
|
||||
</div> <!-- .box-default -->
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
</div> <!-- .col-md-9 -->
|
||||
</div> <!-- .row-->
|
||||
@stop
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off']) }}
|
||||
<form method="POST" action="{{ route('profile.update') }}" accept-charset="UTF-8" class="form-horizontal" autocomplete="off" enctype="multipart/form-data">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<div class="box box-default">
|
||||
|
@ -187,7 +187,7 @@
|
|||
<button type="submit" class="btn btn-primary"><x-icon type="checkmark" /> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div> <!-- .box-default -->
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
</div> <!-- .col-md-9 -->
|
||||
</div> <!-- .row-->
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
<!-- Horizontal Form -->
|
||||
@if ($field->id)
|
||||
{{ Form::open(['route' => ['fields.update', $field->id], 'class'=>'form-horizontal']) }}
|
||||
<form method="POST" action="{{ route('fields.update', $field->id) }}" accept-charset="UTF-8" class="form-horizontal">
|
||||
{{ method_field('PUT') }}
|
||||
@else
|
||||
{{ Form::open(['route' => 'fields.store', 'class'=>'form-horizontal']) }}
|
||||
<form method="POST" action="{{ route('fields.store') }}" accept-charset="UTF-8" class="form-horizontal">
|
||||
@endif
|
||||
|
||||
@csrf
|
||||
|
@ -269,7 +269,7 @@
|
|||
|
||||
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
|
|
@ -88,11 +88,8 @@
|
|||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
{{ Form::open(['route' =>
|
||||
["fieldsets.associate",$custom_fieldset->id],
|
||||
'class'=>'form-inline',
|
||||
'id' => 'ordering']) }}
|
||||
|
||||
<form method="POST" action="{{ route('fieldsets.associate', $custom_fieldset->id) }}" accept-charset="UTF-8" class="form-inline" id="ordering">
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<label for="field_id" class="sr-only">
|
||||
|
@ -118,7 +115,7 @@
|
|||
<button type="submit" class="btn btn-primary"> {{ trans('general.save') }}</button>
|
||||
</span>
|
||||
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -87,13 +87,15 @@
|
|||
@endcan
|
||||
|
||||
@can('delete', $fieldset)
|
||||
{{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete','style' => 'display:inline-block']) }}
|
||||
<form method="POST" action="{{ route('fieldsets.destroy', $fieldset->id) }}" accept-charset="UTF-8" style="display:inline-block">
|
||||
{{ method_field('DELETE') }}
|
||||
@csrf
|
||||
@if($fieldset->models->count() > 0)
|
||||
<button type="submit" class="btn btn-danger btn-sm disabled" data-tooltip="true" title="{{ trans('general.cannot_be_deleted') }}" disabled><i class="fas fa-trash"></i></button>
|
||||
@else
|
||||
<button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
@endcan
|
||||
</nobr>
|
||||
</td>
|
||||
|
@ -192,7 +194,9 @@
|
|||
</td>
|
||||
<td>
|
||||
<nobr>
|
||||
{{ Form::open(array('route' => array('fields.destroy', $field->id), 'method' => 'delete', 'style' => 'display:inline-block')) }}
|
||||
<form method="POST" action="{{ route('fields.destroy', $field->id) }}" accept-charset="UTF-8" style="display:inline-block">
|
||||
{{ method_field('DELETE') }}
|
||||
@csrf
|
||||
@can('update', $field)
|
||||
<a href="{{ route('fields.edit', $field->id) }}" class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.update') }}">
|
||||
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||
|
@ -214,7 +218,7 @@
|
|||
@endif
|
||||
|
||||
@endcan
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
</nobr>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -129,13 +129,8 @@
|
|||
<div class="tab-pane" id="models">
|
||||
|
||||
<div class="row">
|
||||
{{ Form::open(
|
||||
[
|
||||
'method' => 'POST',
|
||||
'route' => ['models.bulkedit.index'],
|
||||
'class' => 'form-inline',
|
||||
'id' => 'bulkForm']
|
||||
) }}
|
||||
<form method="POST" action="{{ route('models.bulkedit.index') }}" accept-charset="UTF-8" class="form-inline" id="bulkForm">
|
||||
@csrf
|
||||
<div class="col-md-12">
|
||||
<div id="toolbar">
|
||||
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
||||
|
|
|
@ -280,12 +280,12 @@ Route::group(['prefix' => 'account', 'middleware' => ['auth']], function () {
|
|||
|
||||
// Profile
|
||||
Route::get('profile', [ProfileController::class, 'getIndex'])->name('profile');
|
||||
Route::post('profile', [ProfileController::class, 'postIndex']);
|
||||
Route::post('profile', [ProfileController::class, 'postIndex'])->name('profile.update');
|
||||
|
||||
Route::get('menu', [ProfileController::class, 'getMenuState'])->name('account.menuprefs');
|
||||
|
||||
Route::get('password', [ProfileController::class, 'password'])->name('account.password.index');
|
||||
Route::post('password', [ProfileController::class, 'passwordSave']);
|
||||
Route::post('password', [ProfileController::class, 'passwordSave'])->name('account.password.update');
|
||||
|
||||
Route::get('api', [ProfileController::class, 'api'])->name('user.api');
|
||||
|
||||
|
|
Loading…
Reference in a new issue