Pass variable to edit-form to determine whether we should have a top submit button

This is just so very short forms don’t look too silly
This commit is contained in:
snipe 2018-10-04 21:19:25 -07:00
parent 408f9978e9
commit 6489081cd6
5 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,7 @@
@extends('layouts/edit-form', [
'createText' => trans('admin/hardware/form.create'),
'updateText' => trans('admin/hardware/form.update'),
'topSubmit' => true,
'helpText' => trans('help.assets'),
'helpPosition' => 'right',
'formAction' => ($item) ? route('hardware.update', ['hardware' => $item->id]) : route('hardware.store'),

View file

@ -41,9 +41,11 @@
{{ $item->display_name }}
@endif
</h3>
@if (isset($topSubmit))
<div class="box-tools pull-right">
@include('partials.forms.edit.submit-button')
</div>
@endif
</div><!-- /.box-header -->
<div class="box-body">

View file

@ -1,6 +1,7 @@
@extends('layouts/edit-form', [
'createText' => trans('admin/licenses/form.create'),
'updateText' => trans('admin/licenses/form.update'),
'topSubmit' => true,
'formAction' => ($item) ? route('licenses.update', ['license' => $item->id]) : route('license.store'),
])

View file

@ -1,7 +1,8 @@
@extends('layouts/edit-form', [
'createText' => trans('admin/locations/table.create') ,
'updateText' => trans('admin/locations/table.update'),
'helpTitle' => trans('admin/locations/table.about_locations_title'),
'topSubmit' => true,
'helpPosition' => 'right',
'helpText' => trans('admin/locations/table.about_locations'),
'formAction' => ($item) ? route('locations.update', ['location' => $item->id]) : route('locations.store'),
])

View file

@ -1,7 +1,8 @@
@extends('layouts/edit-form', [
'createText' => trans('admin/models/table.create') ,
'updateText' => trans('admin/models/table.update'),
'helpTitle' => trans('admin/models/general.about_models_title'),
'topSubmit' => true,
'helpPosition' => 'right',
'helpText' => trans('admin/models/general.about_models_text'),
'formAction' => ($item) ? route('models.update', ['model' => $item->id]) : route('models.store'),
])