diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 3000ec7f14..56da1d19b9 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -702,44 +702,6 @@ class SettingsController extends Controller return redirect()->back()->withInput()->withErrors($setting->getErrors()); } - /** - * Return a form to allow a super admin to update settings. - * - * @author [A. Gianotto] [] - * - * @since [v1.0] - */ - public function getBarcodes() : View - { - $setting = Setting::getSettings(); - $is_gd_installed = extension_loaded('gd'); - - return view('settings.barcodes', compact('setting'))->with('is_gd_installed', $is_gd_installed); - } - - /** - * Saves settings from form. - * - * @author [A. Gianotto] [] - * - * @since [v1.0] - */ - public function postBarcodes(Request $request) : RedirectResponse - { - if (is_null($setting = Setting::getSettings())) { - return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); - } - - - - if ($setting->save()) { - return redirect()->route('settings.index') - ->with('success', trans('admin/settings/message.update.success')); - } - - return redirect()->back()->withInput()->withErrors($setting->getErrors()); - } - /** * Return a form to allow a super admin to update settings. * @@ -813,8 +775,6 @@ class SettingsController extends Controller //QR-Code $setting->qr_text = $request->input('qr_text'); - - if ($request->filled('labels_display_name')) { $setting->labels_display_name = 1; } else { diff --git a/resources/views/settings/barcodes.blade.php b/resources/views/settings/barcodes.blade.php deleted file mode 100644 index 970f1d4f99..0000000000 --- a/resources/views/settings/barcodes.blade.php +++ /dev/null @@ -1,213 +0,0 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') - {{ trans('admin/settings/general.barcode_title') }} - @parent -@stop - -@section('header_right') - {{ trans('general.back') }} -@stop - - -{{-- Page content --}} -@section('content') - - - - - {{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form' ]) }} - - {{csrf_field()}} - -
-
- - -
-
-

- - {{ trans('admin/settings/general.barcodes') }} -

-
-
- - -
- - @if ($is_gd_installed) - -
-
- -
-
- - -
-
- {{ Form::label('barcode_type', trans('admin/settings/general.barcode_type')) }} -
-
- {!! Form::barcode_types('barcode_type', old('barcode_type', $setting->barcode_type), 'select2 col-md-4') !!} - {!! $errors->first('barcode_type', '') !!} -
-
- - -
- -
- -
-
- - -
-
- {{ Form::label('alt_barcode', trans('admin/settings/general.alt_barcode_type')) }} -
-
- {!! Form::alt_barcode_types('alt_barcode', old('alt_barcode', $setting->alt_barcode), 'select2 col-md-4') !!} - {!! $errors->first('barcode_type', '') !!} -
-
- @else - - {{ trans('admin/settings/general.php_gd_warning') }} -
- {{ trans('admin/settings/general.php_gd_info') }} -
- @endif - - -
-
- {{ Form::label('qr_text', trans('admin/settings/general.qr_text')) }} -
-
- @if ($setting->qr_code == 1) - {{ Form::text('qr_text', old('qr_text', $setting->qr_text), array('class' => 'form-control','placeholder' => 'Property of Your Company', - 'rel' => 'txtTooltip', - 'title' =>'Extra text that you would like to display on your labels. ', - 'data-toggle' =>'tooltip', - 'data-placement'=>'top')) }} - {!! $errors->first('qr_text', '') !!} - @else - {{ Form::text('qr_text', old('qr_text', $setting->qr_text), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Property of Your Company')) }} -

{{ trans('admin/settings/general.qr_help') }}

- @endif -
-
- - -
-
- {{ Form::label('purge_barcodes', 'Purge Barcodes') }} -
- -
-
-
-
-

{{ trans('admin/settings/general.barcodes_help') }}

-
- -
- - -
- -
- -
-
-
- - {{Form::close()}} - -@stop - -@push('js') - - - -@endpush diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 8834b21d90..bf22638adf 100755 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -187,22 +187,6 @@ -
-
-
-
- - -

- {{ trans('admin/settings/general.barcodes') }} -
-
-

{!! trans('admin/settings/general.barcodes_help_overview') !!}

-
-
-
- -
diff --git a/routes/web.php b/routes/web.php index a05b7aba63..c7fecb86a0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -201,10 +201,7 @@ Route::group(['prefix' => 'admin', 'middleware' => ['auth', 'authorize:superuser Route::get('asset_tags', [SettingsController::class, 'getAssetTags'])->name('settings.asset_tags.index'); Route::post('asset_tags', [SettingsController::class, 'postAssetTags'])->name('settings.asset_tags.save'); - Route::get('barcodes', [SettingsController::class, 'getBarcodes'])->name('settings.barcodes.index'); - Route::post('barcodes', [SettingsController::class, 'postBarcodes'])->name('settings.barcodes.save'); - - Route::get('labels', [SettingsController::class, 'getLabels', 'getBarcodes'])->name('settings.labels.index'); + Route::get('labels', [SettingsController::class, 'getLabels'])->name('settings.labels.index'); Route::post('labels', [SettingsController::class, 'postLabels'])->name('settings.labels.save'); Route::get('ldap', [SettingsController::class, 'getLdapSettings'])->name('settings.ldap.index');