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="row">
|
||||||
<div class="col-md-9">
|
<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 -->
|
<!-- CSRF Token -->
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||||
<div class="box box-default">
|
<div class="box box-default">
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- .box-default -->
|
</div> <!-- .box-default -->
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div> <!-- .col-md-9 -->
|
</div> <!-- .col-md-9 -->
|
||||||
</div> <!-- .row-->
|
</div> <!-- .row-->
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<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 -->
|
<!-- CSRF Token -->
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||||
<div class="box box-default">
|
<div class="box box-default">
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
<button type="submit" class="btn btn-primary"><x-icon type="checkmark" /> {{ trans('general.save') }}</button>
|
<button type="submit" class="btn btn-primary"><x-icon type="checkmark" /> {{ trans('general.save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- .box-default -->
|
</div> <!-- .box-default -->
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div> <!-- .col-md-9 -->
|
</div> <!-- .col-md-9 -->
|
||||||
</div> <!-- .row-->
|
</div> <!-- .row-->
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
<!-- Horizontal Form -->
|
<!-- Horizontal Form -->
|
||||||
@if ($field->id)
|
@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') }}
|
{{ method_field('PUT') }}
|
||||||
@else
|
@else
|
||||||
{{ Form::open(['route' => 'fields.store', 'class'=>'form-horizontal']) }}
|
<form method="POST" action="{{ route('fields.store') }}" accept-charset="UTF-8" class="form-horizontal">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@csrf
|
@csrf
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
|
|
|
@ -88,11 +88,8 @@
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="8">
|
<td colspan="8">
|
||||||
{{ Form::open(['route' =>
|
<form method="POST" action="{{ route('fieldsets.associate', $custom_fieldset->id) }}" accept-charset="UTF-8" class="form-inline" id="ordering">
|
||||||
["fieldsets.associate",$custom_fieldset->id],
|
@csrf
|
||||||
'class'=>'form-inline',
|
|
||||||
'id' => 'ordering']) }}
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="field_id" class="sr-only">
|
<label for="field_id" class="sr-only">
|
||||||
|
@ -118,7 +115,7 @@
|
||||||
<button type="submit" class="btn btn-primary"> {{ trans('general.save') }}</button>
|
<button type="submit" class="btn btn-primary"> {{ trans('general.save') }}</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -87,13 +87,15 @@
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('delete', $fieldset)
|
@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)
|
@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>
|
<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
|
@else
|
||||||
<button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
|
<button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
|
||||||
@endif
|
@endif
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
@endcan
|
@endcan
|
||||||
</nobr>
|
</nobr>
|
||||||
</td>
|
</td>
|
||||||
|
@ -192,7 +194,9 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<nobr>
|
<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)
|
@can('update', $field)
|
||||||
<a href="{{ route('fields.edit', $field->id) }}" class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.update') }}">
|
<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>
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||||
|
@ -214,7 +218,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@endcan
|
@endcan
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</nobr>
|
</nobr>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -129,13 +129,8 @@
|
||||||
<div class="tab-pane" id="models">
|
<div class="tab-pane" id="models">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::open(
|
<form method="POST" action="{{ route('models.bulkedit.index') }}" accept-charset="UTF-8" class="form-inline" id="bulkForm">
|
||||||
[
|
@csrf
|
||||||
'method' => 'POST',
|
|
||||||
'route' => ['models.bulkedit.index'],
|
|
||||||
'class' => 'form-inline',
|
|
||||||
'id' => 'bulkForm']
|
|
||||||
) }}
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
||||||
|
|
|
@ -280,12 +280,12 @@ Route::group(['prefix' => 'account', 'middleware' => ['auth']], function () {
|
||||||
|
|
||||||
// Profile
|
// Profile
|
||||||
Route::get('profile', [ProfileController::class, 'getIndex'])->name('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('menu', [ProfileController::class, 'getMenuState'])->name('account.menuprefs');
|
||||||
|
|
||||||
Route::get('password', [ProfileController::class, 'password'])->name('account.password.index');
|
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');
|
Route::get('api', [ProfileController::class, 'api'])->name('user.api');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue