mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Fixed back button
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
64082ada1e
commit
243ab51def
|
@ -1,6 +1,6 @@
|
||||||
<!-- begin redirect submit options -->
|
<!-- begin redirect submit options -->
|
||||||
@props([
|
@props([
|
||||||
'route' => 'hardware.index',
|
'index_route',
|
||||||
'button_label',
|
'button_label',
|
||||||
'disabled_select' => false,
|
'disabled_select' => false,
|
||||||
'options' => [],
|
'options' => [],
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<a class="btn btn-link" href="{{ route($route) }}">{{ trans('button.cancel') }}</a>
|
<a class="btn btn-link" href="{{ $index_route ? route($index_route) : url()->previous() }}">{{ trans('button.cancel') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-9 text-right">
|
<div class="col-md-9 text-right">
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
</div> <!--/.box-body-->
|
</div> <!--/.box-body-->
|
||||||
|
|
||||||
<x-redirect_submit_options
|
<x-redirect_submit_options
|
||||||
route="hardware.index"
|
index_route="hardware.index"
|
||||||
:button_label="trans('general.checkout')"
|
:button_label="trans('general.checkout')"
|
||||||
:disabled_select="!$asset->model"
|
:disabled_select="!$asset->model"
|
||||||
:options="[
|
:options="[
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
</div> <!--/.box-body-->
|
</div> <!--/.box-body-->
|
||||||
|
|
||||||
<x-redirect_submit_options
|
<x-redirect_submit_options
|
||||||
route="hardware.index"
|
index_route="hardware.index"
|
||||||
:button_label="trans('general.checkout')"
|
:button_label="trans('general.checkout')"
|
||||||
:disabled_select="!$asset->model"
|
:disabled_select="!$asset->model"
|
||||||
:options="[
|
:options="[
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
'createText' => trans('admin/hardware/form.create'),
|
'createText' => trans('admin/hardware/form.create'),
|
||||||
'updateText' => trans('admin/hardware/form.update'),
|
'updateText' => trans('admin/hardware/form.update'),
|
||||||
'topSubmit' => true,
|
'topSubmit' => true,
|
||||||
|
'index_route' => 'hardware.index',
|
||||||
'helpText' => trans('help.assets'),
|
'helpText' => trans('help.assets'),
|
||||||
'helpPosition' => 'right',
|
'helpPosition' => 'right',
|
||||||
'formAction' => ($item->id) ? route('hardware.update', ['hardware' => $item->id]) : route('hardware.store'),
|
'formAction' => ($item->id) ? route('hardware.update', ['hardware' => $item->id]) : route('hardware.store'),
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
@yield('inputFields')
|
@yield('inputFields')
|
||||||
<x-redirect_submit_options
|
<x-redirect_submit_options
|
||||||
route="hardware.index"
|
:index_route="$index_route ?? null"
|
||||||
:button_label="trans('general.save')"
|
:button_label="trans('general.save')"
|
||||||
:options="$options ?? []"
|
:options="$options ?? []"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue