diff --git a/app/Http/Controllers/Api/SettingsController.php b/app/Http/Controllers/Api/SettingsController.php index d0ff4fb182..00bb8bf406 100644 --- a/app/Http/Controllers/Api/SettingsController.php +++ b/app/Http/Controllers/Api/SettingsController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers\Api; use Illuminate\Http\Request; use App\Http\Controllers\Controller; +use App\Models\Ldap; class SettingsController extends Controller { @@ -73,4 +74,28 @@ class SettingsController extends Controller { // } + + public function getLdapTest() + { + \Log::debug('Preparing to test LDAP connection'); + + try { + $connection = Ldap::connectToLdap(); + try { + \Log::debug('attempting to bind to LDAP for LDAP test'); + Ldap::bindAdminToLdap($connection); + return response()->json(['message' => 'It worked!'], 200); + } catch (\Exception $e) { + \Log::debug('Bind failed'); + return response()->json(['message' => $e->getMessage()], 400); + //return response()->json(['message' => $e->getMessage()], 500); + } + } catch (\Exception $e) { + \Log::debug('Connection failed'); + return response()->json(['message' => $e->getMessage()], 600); + } + + + } + } diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 9e19063463..0bc33037c1 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -274,7 +274,7 @@ class SettingsController extends Controller * @since [v1.0] * @return View */ - public function getIndex() + public function index() { $settings = Setting::all(); return view('settings/index', compact('settings')); @@ -282,7 +282,7 @@ class SettingsController extends Controller /** - * Return a form to allow a super admin to update settings. + * Return the admin settings page * * @author [A. Gianotto] [] * @since [v1.0] @@ -291,32 +291,167 @@ class SettingsController extends Controller public function getEdit() { $setting = Setting::first(); - $is_gd_installed = extension_loaded('gd'); - - return view('settings/edit', compact('setting'))->with('is_gd_installed', $is_gd_installed); + return view('settings/general', compact('setting')); } /** - * Validate and process settings edit form. - * - * @author [A. Gianotto] [] - * @since [v1.0] - * @return Redirect - */ - public function postEdit(ImageUploadRequest $request) + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getSettings() + { + $setting = Setting::first(); + return view('settings/general', compact('setting')); + } + + + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postSettings(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } + + $setting->full_multiple_companies_support = $request->input('full_multiple_companies_support', '0'); + $setting->load_remote = $request->input('load_remote', '0'); + $setting->email_domain = $request->input('email_domain'); + $setting->email_format = $request->input('email_format'); + $setting->username_format = $request->input('username_format'); + $setting->require_accept_signature = $request->input('require_accept_signature'); + $setting->login_note = $request->input('login_note'); + $setting->default_eula_text = $request->input('default_eula_text'); + + if (Input::get('per_page')!='') { + $setting->per_page = $request->input('per_page'); + } else { + $setting->per_page = 200; + } + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getBranding() + { + $setting = Setting::first(); + return view('settings.branding', compact('setting')); + } + + + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postBranding(ImageUploadRequest $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } + + $setting->brand = $request->input('brand', '1'); + $setting->header_color = $request->input('header_color'); + + + // Only allow the site name and CSS to be changed if lock_passwords is false + // Because public demos make people act like dicks + if (!config('app.lock_passwords')) { + $setting->site_name = $request->input('site_name'); + $setting->custom_css = $request->input('custom_css'); + } + + + // If the user wants to clear the logo, reset the brand type + if ($request->input('clear_logo')=='1') { + $setting->logo = null; + $setting->brand = 1; + + // If they are uploading an image, validate it and upload it + } elseif ($request->hasFile('image')) { + + if (!config('app.lock_passwords')) { + $image = $request->file('image'); + $file_name = "logo.".$image->getClientOriginalExtension(); + $path = public_path('uploads'); + if ($image->getClientOriginalExtension()!='svg') { + Image::make($image->getRealPath())->resize(null, 40, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + })->save($path.'/'.$file_name); + } else { + $image->move($path, $file_name); + } + $setting->logo = $file_name; + } + } + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getSecurity() + { + $setting = Setting::first(); + return view('settings.security', compact('setting')); + } + + + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postSecurity(Request $request) { - // Check if the asset exists if (is_null($setting = Setting::first())) { - // Redirect to the asset management page with error return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); } if (!config('app.lock_passwords')) { - $setting->site_name = $request->input('site_name'); - $setting->custom_css = $request->input('custom_css'); if ($request->input('two_factor_enabled')=='') { $setting->two_factor_enabled = null; @@ -326,30 +461,260 @@ class SettingsController extends Controller } - if (Input::get('per_page')!='') { - $setting->per_page = $request->input('per_page'); - } else { - $setting->per_page = 200; + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getLocalization() + { + $setting = Setting::first(); + return view('settings.localization', compact('setting')); + } + + + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postLocalization(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); } $setting->locale = $request->input('locale', 'en'); - $setting->qr_code = $request->input('qr_code', '0'); - $setting->full_multiple_companies_support = $request->input('full_multiple_companies_support', '0'); - $setting->alt_barcode = $request->input('alt_barcode'); - $setting->alt_barcode_enabled = $request->input('alt_barcode_enabled', '0'); - $setting->barcode_type = $request->input('barcode_type'); - $setting->load_remote = $request->input('load_remote', '0'); $setting->default_currency = $request->input('default_currency', '$'); - $setting->qr_text = $request->input('qr_text'); + $setting->date_display_format = $request->input('date_display_format'); + $setting->time_display_format = $request->input('time_display_format'); + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getAlerts() + { + $setting = Setting::first(); + return view('settings.alerts', compact('setting')); + } + + + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postAlerts(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } + + $alert_email = rtrim($request->input('alert_email'), ','); + $alert_email = trim($alert_email); + + $setting->alert_email = e($alert_email); + $setting->alerts_enabled = $request->input('alerts_enabled', '0'); + $setting->alert_interval = $request->input('alert_interval'); + $setting->alert_threshold = $request->input('alert_threshold'); + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getSlack() + { + $setting = Setting::first(); + return view('settings.slack', compact('setting')); + } + + + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postSlack(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } + + $setting->slack_endpoint = $request->input('slack_endpoint'); + $setting->slack_channel = $request->input('slack_channel'); + $setting->slack_botname = $request->input('slack_botname'); + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getAssetTags() + { + $setting = Setting::first(); + return view('settings.asset_tags', compact('setting')); + } + + + /** + * Saves settings from form + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function postAssetTags(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } + $setting->auto_increment_prefix = $request->input('auto_increment_prefix'); $setting->auto_increment_assets = $request->input('auto_increment_assets', '0'); $setting->zerofill_count = $request->input('zerofill_count'); - $setting->alert_interval = $request->input('alert_interval'); - $setting->alert_threshold = $request->input('alert_threshold'); - $setting->email_domain = $request->input('email_domain'); - $setting->email_format = $request->input('email_format'); - $setting->username_format = $request->input('username_format'); - $setting->require_accept_signature = $request->input('require_accept_signature'); + $setting->next_auto_tag_base = $request->input('next_auto_tag_base'); + + 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. + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @return View + */ + public function getBarcodes() + { + $setting = Setting::first(); + $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] + * @return View + */ + public function postBarcodes(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } + + $setting->qr_code = $request->input('qr_code', '0'); + $setting->alt_barcode = $request->input('alt_barcode'); + $setting->alt_barcode_enabled = $request->input('alt_barcode_enabled', '0'); + $setting->barcode_type = $request->input('barcode_type'); + $setting->qr_text = $request->input('qr_text'); + + + 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. + * + * @author [A. Gianotto] [] + * @since [v4.0] + * @return View + */ + public function getLabels() + { + $setting = Setting::first(); + return view('settings.labels', compact('setting')); + } + + + /** + * Saves settings from form + * + * @author [A. Gianotto] [] + * @since [v4.0] + * @return View + */ + public function postLabels(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } $setting->labels_per_page = $request->input('labels_per_page'); $setting->labels_width = $request->input('labels_width'); $setting->labels_height = $request->input('labels_height'); @@ -362,7 +727,7 @@ class SettingsController extends Controller $setting->labels_fontsize = $request->input('labels_fontsize'); $setting->labels_pagewidth = $request->input('labels_pagewidth'); $setting->labels_pageheight = $request->input('labels_pageheight'); - $setting->next_auto_tag_base = $request->input('next_auto_tag_base'); + if (Input::has('labels_display_name')) { @@ -383,16 +748,43 @@ class SettingsController extends Controller $setting->labels_display_tag = 0; } - $alert_email = rtrim($request->input('alert_email'), ','); - $alert_email = trim($alert_email); + 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. + * + * @author [A. Gianotto] [] + * @since [v4.0] + * @return View + */ + public function getLdapSettings() + { + $setting = Setting::first(); + return view('settings.ldap', compact('setting')); + } + + + /** + * Saves settings from form + * + * @author [A. Gianotto] [] + * @since [v4.0] + * @return View + */ + public function postLdapSettings(Request $request) + { + + if (is_null($setting = Setting::first())) { + return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); + } - $setting->alert_email = e($alert_email); - $setting->alerts_enabled = $request->input('alerts_enabled', '0'); - $setting->header_color = $request->input('header_color'); - $setting->default_eula_text = $request->input('default_eula_text'); - $setting->slack_endpoint = $request->input('slack_endpoint'); - $setting->slack_channel = $request->input('slack_channel'); - $setting->slack_botname = $request->input('slack_botname'); $setting->ldap_enabled = $request->input('ldap_enabled', '0'); $setting->ldap_server = $request->input('ldap_server'); $setting->ldap_server_cert_ignore = $request->input('ldap_server_cert_ignore', false); @@ -415,64 +807,17 @@ class SettingsController extends Controller $setting->ldap_tls = $request->input('ldap_tls', '0'); $setting->ldap_pw_sync = $request->input('ldap_pw_sync', '0'); - $setting->date_display_format = $request->input('date_display_format'); - $setting->time_display_format = $request->input('time_display_format'); - $setting->brand = $request->input('brand', '1'); - $setting->login_note = $request->input('login_note'); - - - if ($request->input('clear_logo')=='1') { - $setting->logo = null; - $setting->brand = 1; - } elseif ($request->hasFile('image')) { - - if (!config('app.lock_passwords')) { - $image = $request->file('image'); - $file_name = "logo.".$image->getClientOriginalExtension(); - $path = public_path('uploads'); - if ($image->getClientOriginalExtension()!='svg') { - Image::make($image->getRealPath())->resize(null, 40, function ($constraint) { - $constraint->aspectRatio(); - $constraint->upsize(); - })->save($path.'/'.$file_name); - } else { - $image->move($path, $file_name); - } - $setting->logo = $file_name; - } - } - if ($setting->save()) { - return redirect()->to("admin/settings/app")->with('success', trans('admin/settings/message.update.success')); - } else { - return redirect()->back()->withInput()->withErrors($setting->getErrors()); + return redirect()->route('settings.index') + ->with('success', trans('admin/settings/message.update.success')); } - - - // Redirect to the setting management page - return redirect()->to("admin/settings/app/edit")->with('error', trans('admin/settings/message.update.error')); + return redirect()->back()->withInput()->withErrors($setting->getErrors()); } - public function getLdapTest() - { - - try { - $connection = Ldap::connectToLdap(); - try { - Ldap::bindAdminToLdap($connection); - return response()->json(['message' => 'It worked!'], 200); - } catch (\Exception $e) { - return response()->json(['message' => $e->getMessage()], 500); - } - return response()->json(['message' => 'It worked!'], 200); - } catch (\Exception $e) { - return response()->json(['message' => $e->getMessage()], 500); - } - } /** @@ -524,10 +869,9 @@ class SettingsController extends Controller { if (!config('app.lock_passwords')) { Artisan::call('backup:run'); - return redirect()->to("admin/settings/backups")->with('success', trans('admin/settings/message.backup.generated')); + return redirect()->route('settings.backups.index')->with('success', trans('admin/settings/message.backup.generated')); } else { - - return redirect()->to("admin/settings/backups")->with('error', trans('general.feature_disabled')); + return redirect()->to("settings.backups.index")->with('error', trans('general.feature_disabled')); } @@ -588,6 +932,18 @@ class SettingsController extends Controller } + /** + * Return a form to allow a super admin to update settings. + * + * @author [A. Gianotto] [] + * @since [v4.0] + * @return View + */ + public function getPurge() + { + return view('settings.purge-form'); + } + /** * Purges soft-deletes * @@ -623,6 +979,6 @@ class SettingsController extends Controller * @return View */ public function api() { - return view('settings/api'); + return view('settings.api'); } } diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 95b584c88d..b9cf5c2066 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -321,38 +321,10 @@ @can('superadmin') -
  • + + @lang('general.admin') -
  • @endcan diff --git a/resources/views/settings/alerts.blade.php b/resources/views/settings/alerts.blade.php new file mode 100644 index 0000000000..70c2c60126 --- /dev/null +++ b/resources/views/settings/alerts.blade.php @@ -0,0 +1,112 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Alert Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Alerts +

    +
    +
    + + +
    + + +
    +
    + {{ Form::label('alert_email', trans('admin/settings/general.alerts_enabled')) }} +
    +
    + {{ Form::checkbox('alerts_enabled', '1', Input::old('alerts_enabled', $setting->alerts_enabled),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.alerts_enabled') }} +
    +
    + + + + +
    +
    + {{ Form::label('alert_email', trans('admin/settings/general.alert_email')) }} +
    +
    + {{ Form::text('alert_email', Input::old('alert_email', $setting->alert_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com')) }} + {!! $errors->first('alert_email', ':message
    ') !!} + +

    Email addresses or distribution lists you want alerts to be sent to, comma separated

    + + +
    +
    + + +
    +
    + {{ Form::label('alert_interval', trans('admin/settings/general.alert_interval')) }} +
    +
    + {{ Form::text('alert_interval', Input::old('alert_interval', $setting->alert_interval), array('class' => 'form-control','placeholder' => '30', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {!! $errors->first('alert_interval', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('alert_threshold', trans('admin/settings/general.alert_inv_threshold')) }} +
    +
    + {{ Form::text('alert_threshold', Input::old('alert_threshold', $setting->alert_threshold), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {!! $errors->first('alert_threshold', ':message') !!} +
    +
    + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop + diff --git a/resources/views/settings/api.blade.php b/resources/views/settings/api.blade.php index ae66bcfe43..6de71583e5 100644 --- a/resources/views/settings/api.blade.php +++ b/resources/views/settings/api.blade.php @@ -9,11 +9,10 @@ {{-- Page content --}} @section('content') @if (!config('app.lock_passwords')) - - - @if(env('APP_ENV') != 'production') - - @endif +
    + + +
    @else

    {{ trans('general.feature_disabled') }}

    @endif @@ -26,4 +25,4 @@ el: "#app", }); -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/settings/asset_tags.blade.php b/resources/views/settings/asset_tags.blade.php new file mode 100644 index 0000000000..47d2f40ed1 --- /dev/null +++ b/resources/views/settings/asset_tags.blade.php @@ -0,0 +1,109 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Asset Tag Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Asset Tags +

    +
    +
    + + +
    + + +
    +
    + {{ Form::label('auto_increment_assets', trans('admin/settings/general.asset_ids')) }} +
    +
    + {{ Form::checkbox('auto_increment_assets', '1', Input::old('auto_increment_assets', $setting->auto_increment_assets),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.auto_increment_assets') }} +
    +
    + +
    +
    + {{ Form::label('next_auto_tag_base', trans('admin/settings/general.next_auto_tag_base')) }} +
    +
    + {{ Form::text('next_auto_tag_base', Input::old('next_auto_tag_base', $setting->next_auto_tag_base), array('class' => 'form-control', 'style'=>'width: 150px;')) }} + {!! $errors->first('next_auto_tag_base', ':message') !!} +
    +
    + + + +
    +
    + {{ Form::label('auto_increment_prefix', trans('admin/settings/general.auto_increment_prefix')) }} +
    +
    + @if ($setting->auto_increment_assets == 1) + {{ Form::text('auto_increment_prefix', Input::old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'style'=>'width: 150px;')) }} + {!! $errors->first('auto_increment_prefix', ':message') !!} + @else + {{ Form::text('auto_increment_prefix', Input::old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'disabled'=>'disabled', 'style'=>'width: 150px;')) }} + @endif +
    +
    + + +
    +
    + {{ Form::label('auto_increment_prefix', trans('admin/settings/general.zerofill_count')) }} +
    +
    + {{ Form::text('zerofill_count', Input::old('zerofill_count', $setting->zerofill_count), array('class' => 'form-control', 'style'=>'width: 150px;')) }} + {!! $errors->first('zerofill_count', ':message') !!} +
    +
    + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop diff --git a/resources/views/settings/backups.blade.php b/resources/views/settings/backups.blade.php index 78c4b9c9f3..534a291005 100644 --- a/resources/views/settings/backups.blade.php +++ b/resources/views/settings/backups.blade.php @@ -6,6 +6,10 @@ @parent @stop +@section('header_right') + {{ trans('general.back') }} +@stop + {{-- Page content --}} @section('content') @@ -32,7 +36,7 @@ @can('superadmin') + class="btn delete-asset btn-danger btn-sm {{ (config('app.lock_passwords')) ? ' disabled': '' }}" data-toggle="modal" href=" {{ route('settings.backups.destroy', $file['filename']) }}" data-content="{{ trans('admin/settings/message.backup.delete_confirm') }}" data-title="{{ trans('general.delete') }} {{ htmlspecialchars($file['filename']) }} ?" onClick="return false;"> @endcan @@ -52,7 +56,7 @@ {{ Form::hidden('_token', csrf_token()) }}

    - +

    @if (config('app.lock_passwords')) diff --git a/resources/views/settings/barcodes.blade.php b/resources/views/settings/barcodes.blade.php new file mode 100644 index 0000000000..603eb0ef74 --- /dev/null +++ b/resources/views/settings/barcodes.blade.php @@ -0,0 +1,134 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Barcode Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Barcodes +

    +
    +
    + + +
    + + @if ($is_gd_installed) + +
    +
    + {{ Form::label('qr_code', trans('admin/settings/general.display_qr')) }} +
    +
    + {{ Form::checkbox('qr_code', '1', Input::old('qr_code', $setting->qr_code),array('class' => 'minimal')) }} + {{ trans('general.yes') }} +
    +
    + + +
    +
    + {{ Form::label('barcode_type', trans('admin/settings/general.barcode_type')) }} +
    +
    + {!! Form::barcode_types('barcode_type', Input::old('barcode_type', $setting->barcode_type), 'select2') !!} + {!! $errors->first('barcode_type', ' :message') !!} +
    +
    + + +
    +
    + {{ Form::label('qr_code', trans('admin/settings/general.display_alt_barcode')) }} +
    +
    + {{ Form::checkbox('alt_barcode_enabled', '1', Input::old('alt_barcode_enabled', $setting->alt_barcode_enabled),array('class' => 'minimal')) }} + {{ trans('general.yes') }} +
    +
    + + +
    +
    + {{ Form::label('alt_barcode', trans('admin/settings/general.alt_barcode_type')) }} +
    +
    + {!! Form::alt_barcode_types('alt_barcode', Input::old('alt_barcode', $setting->alt_barcode), 'select2') !!} + {!! $errors->first('barcode_type', ' :message') !!} +
    +
    + @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', Input::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', ':message') !!} + @else + {{ Form::text('qr_text', Input::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::close()}} + +@stop diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php new file mode 100644 index 0000000000..a0ea7cd54d --- /dev/null +++ b/resources/views/settings/branding.blade.php @@ -0,0 +1,159 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Branding Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Branding +

    +
    +
    + + +
    + + +
    + +
    + {{ Form::label('site_name', trans('admin/settings/general.site_name')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }} + @else + {{ Form::text('site_name', + Input::old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management')) }} + @endif + {!! $errors->first('site_name', ':message') !!} +
    +
    + + + +
    +
    + {{ Form::label('logo', trans('admin/settings/general.logo')) }} +
    +
    + @if (config('app.lock_passwords')) +

    {{ trans('general.lock_passwords') }}

    + @else + {{ Form::file('image') }} + {!! $errors->first('image', ':message') !!} + {{ Form::checkbox('clear_logo', '1', Input::old('clear_logo'),array('class' => 'minimal')) }} Remove + @endif +
    +
    + + +
    +
    + {{ Form::label('brand', trans('admin/settings/general.brand')) }} +
    +
    + {!! Form::select('brand', array('1'=>'Text','2'=>'Logo','3'=>'Logo + Text'), Input::old('brand', $setting->brand), array('class' => 'form-control', 'style'=>'width: 150px ;')) !!} + {!! $errors->first('brand', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('header_color', trans('admin/settings/general.header_color')) }} +
    +
    +
    + {{ Form::text('header_color', Input::old('header_color', $setting->header_color), array('class' => 'form-control', 'style' => 'width: 100px;','placeholder' => '#FF0000')) }} +
    + +
    +
    + {!! $errors->first('header_color', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('custom_css', trans('admin/settings/general.custom_css')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::textarea('custom_css', Input::old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS','disabled'=>'disabled')) }} + {!! $errors->first('custom_css', ':message') !!} +

    {{ trans('general.lock_passwords') }}

    + @else + {{ Form::textarea('custom_css', Input::old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS')) }} + {!! $errors->first('custom_css', ':message') !!} + @endif +

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

    +
    +
    + + + + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop + +@section('moar_scripts') + + +@stop diff --git a/resources/views/settings/edit.blade.php b/resources/views/settings/edit.blade.php deleted file mode 100755 index c70f9bf6c4..0000000000 --- a/resources/views/settings/edit.blade.php +++ /dev/null @@ -1,1052 +0,0 @@ -@extends('layouts/default') - -{{-- Page title --}} -@section('title') -{{ trans('admin/settings/general.update') }} -@parent -@stop - - -{{-- Page content --}} -@section('content') - - - - - - -{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} - -{{csrf_field()}} - -
    -
    -
    -
    -

    -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    - {{ Form::label('site_name', trans('admin/settings/general.site_name')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }} - @else - {{ Form::text('site_name', - Input::old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management')) }} - @endif - {!! $errors->first('site_name', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('two_factor_enabled', trans('admin/settings/general.two_factor_enabled_text')) }} -
    -
    - - {!! Form::two_factor_options('two_factor_enabled', Input::old('two_factor_enabled', $setting->two_factor_enabled), 'select2') !!} -

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

    - - @if (config('app.lock_passwords')) -

    {{ trans('general.feature_disabled') }}

    - @endif - - {!! $errors->first('two_factor_enabled', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('time_display_format', trans('general.time_and_date_display')) }} -
    -
    - {!! Form::date_display_format('date_display_format', Input::old('date_display_format', $setting->date_display_format), 'select2') !!} - - {!! Form::time_display_format('time_display_format', Input::old('time_display_format', $setting->time_display_format), 'select2') !!} - - {!! $errors->first('time_display_format', ':message') !!} -
    -
    - - - -
    -
    - {{ Form::label('site_name', trans('admin/settings/general.default_language')) }} -
    -
    - {!! Form::locales('locale', Input::old('locale', $setting->locale), 'select2') !!} - - {!! $errors->first('locale', ':message') !!} -
    -
    - - - -
    -
    - {{ Form::label('full_multiple_companies_support', - trans('admin/settings/general.full_multiple_companies_support_text')) }} -
    -
    - {{ Form::checkbox('full_multiple_companies_support', '1', Input::old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.full_multiple_companies_support_text') }} - {!! $errors->first('full_multiple_companies_support', ':message') !!} -

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

    -
    -
    - - - -
    -
    - {{ Form::label('full_multiple_companies_support', - trans('admin/settings/general.require_accept_signature')) }} -
    -
    - {{ Form::checkbox('require_accept_signature', '1', Input::old('require_accept_signature', $setting->require_accept_signature),array('class' => 'minimal')) }} - {{ trans('general.yes') }} - {!! $errors->first('require_accept_signature', ':message') !!} -

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

    -
    -
    - - - -
    -
    - {{ Form::label('logo', trans('admin/settings/general.logo')) }} -
    -
    - @if (config('app.lock_passwords')) -

    {{ trans('general.lock_passwords') }}

    - @else - {{ Form::file('image') }} - {!! $errors->first('image', ':message') !!} - {{ Form::checkbox('clear_logo', '1', Input::old('clear_logo'),array('class' => 'minimal')) }} Remove - @endif -
    -
    - - -
    -
    - {{ Form::label('brand', trans('admin/settings/general.brand')) }} -
    -
    - {!! Form::select('brand', array('1'=>'Text','2'=>'Logo','3'=>'Logo + Text'), Input::old('brand', $setting->brand), array('class' => 'form-control', 'style'=>'width: 150px ;')) !!} - {!! $errors->first('brand', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('default_currency', trans('admin/settings/general.default_currency')) }} -
    -
    - {{ Form::text('default_currency', Input::old('default_currency', $setting->default_currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} - {!! $errors->first('default_currency', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('email_domain', trans('general.email_domain')) }} -
    -
    - {{ Form::text('email_domain', Input::old('email_domain', $setting->email_domain), array('class' => 'form-control','placeholder' => 'example.com')) }} - {{ trans('general.email_domain_help') }} - {!! $errors->first('email_domain', ':message') !!} -
    -
    - - - -
    -
    - {{ Form::label('email_format', trans('general.email_format')) }} -
    -
    - {!! Form::username_format('email_format', Input::old('email_format', $setting->email_format), 'select2') !!} - {!! $errors->first('email_format', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('username_format', trans('general.username_format')) }} -
    -
    - {!! Form::username_format('username_format', Input::old('username_format', $setting->username_format), 'select2') !!} - {!! $errors->first('username_format', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('alert_email', trans('admin/settings/general.alert_email')) }} -
    -
    - {{ Form::text('alert_email', Input::old('alert_email', $setting->alert_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com', - 'rel' => 'txtTooltip', - 'title' =>'Email addresses or distribution lists you want alerts to be sent to, comma separated.', - 'data-toggle' =>'tooltip', - 'data-placement'=>'top')) }} - {!! $errors->first('alert_email', ':message
    ') !!} - - {{ Form::checkbox('alerts_enabled', '1', Input::old('alerts_enabled', $setting->alerts_enabled),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.alerts_enabled') }} -
    -
    - - -
    -
    - {{ Form::label('alert_interval', trans('admin/settings/general.alert_interval')) }} -
    -
    - {{ Form::text('alert_interval', Input::old('alert_interval', $setting->alert_interval), array('class' => 'form-control','placeholder' => '30', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} - {!! $errors->first('alert_interval', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('alert_threshold', trans('admin/settings/general.alert_inv_threshold')) }} -
    -
    - {{ Form::text('alert_threshold', Input::old('alert_threshold', $setting->alert_threshold), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} - {!! $errors->first('alert_threshold', ':message') !!} -
    -
    - - - -
    -
    - {{ Form::label('header_color', trans('admin/settings/general.header_color')) }} -
    -
    -
    - {{ Form::text('header_color', Input::old('header_color', $setting->header_color), array('class' => 'form-control', 'style' => 'width: 100px;','placeholder' => '#FF0000')) }} -
    - -
    -
    - {!! $errors->first('header_color', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('custom_css', trans('admin/settings/general.custom_css')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::textarea('custom_css', Input::old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS','disabled'=>'disabled')) }} - {!! $errors->first('custom_css', ':message') !!} -

    {{ trans('general.lock_passwords') }}

    - @else - {{ Form::textarea('custom_css', Input::old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS')) }} - {!! $errors->first('custom_css', ':message') !!} - @endif -

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

    -
    -
    - - -
    -
    - {{ Form::label('load_remote', trans('admin/settings/general.load_remote_text')) }} -
    -
    - {{ Form::checkbox('load_remote', '1', Input::old('load_remote', $setting->load_remote),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.load_remote_help_text') }} -
    -
    - - -
    -
    - {{ Form::label('per_page', trans('admin/settings/general.per_page')) }} -
    -
    - {{ Form::text('per_page', Input::old('per_page', $setting->per_page), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} - {!! $errors->first('per_page', ':message') !!} -
    -
    - - - -
    -
    - {{ Form::label('login_note', trans('admin/settings/general.login_note')) }} -
    -
    - @if (config('app.lock_passwords')===true) - - - {!! $errors->first('login_note', ':message') !!} -

    {{ trans('general.lock_passwords') }}

    - @else - - {!! $errors->first('login_note', ':message') !!} - @endif -

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

    -
    -
    - - - -
    -
    -
    - -
    - - -
    -
    - -
    -
    - {{ Form::label('auto_increment_assets', trans('admin/settings/general.asset_ids')) }} -
    -
    - {{ Form::checkbox('auto_increment_assets', '1', Input::old('auto_increment_assets', $setting->auto_increment_assets),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.auto_increment_assets') }} -
    -
    - -
    -
    - {{ Form::label('next_auto_tag_base', trans('admin/settings/general.next_auto_tag_base')) }} -
    -
    - {{ Form::text('next_auto_tag_base', Input::old('next_auto_tag_base', $setting->next_auto_tag_base), array('class' => 'form-control', 'style'=>'width: 100px;')) }} - {!! $errors->first('next_auto_tag_base', ':message') !!} -
    -
    - - - -
    -
    - {{ Form::label('auto_increment_prefix', trans('admin/settings/general.auto_increment_prefix')) }} -
    -
    - @if ($setting->auto_increment_assets == 1) - {{ Form::text('auto_increment_prefix', Input::old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'style'=>'width: 100px;')) }} - {!! $errors->first('auto_increment_prefix', ':message') !!} - @else - {{ Form::text('auto_increment_prefix', Input::old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'disabled'=>'disabled', 'style'=>'width: 100px;')) }} - @endif -
    -
    - - -
    -
    - {{ Form::label('auto_increment_prefix', trans('admin/settings/general.zerofill_count')) }} -
    -
    - {{ Form::text('zerofill_count', Input::old('zerofill_count', $setting->zerofill_count), array('class' => 'form-control', 'style'=>'width: 100px;')) }} - {!! $errors->first('zerofill_count', ':message') !!} -
    -
    -
    -
    -
    - -
    - - -
    -
    - @if ($is_gd_installed) - -
    -
    - {{ Form::label('qr_code', trans('admin/settings/general.display_qr')) }} -
    -
    - {{ Form::checkbox('qr_code', '1', Input::old('qr_code', $setting->qr_code),array('class' => 'minimal')) }} - {{ trans('general.yes') }} -
    -
    - - -
    -
    - {{ Form::label('barcode_type', trans('admin/settings/general.barcode_type')) }} -
    -
    - {!! Form::barcode_types('barcode_type', Input::old('barcode_type', $setting->barcode_type), 'select2') !!} - {!! $errors->first('barcode_type', ' :message') !!} -
    -
    - - -
    -
    - {{ Form::label('qr_code', trans('admin/settings/general.display_alt_barcode')) }} -
    -
    - {{ Form::checkbox('alt_barcode_enabled', '1', Input::old('alt_barcode_enabled', $setting->alt_barcode_enabled),array('class' => 'minimal')) }} - {{ trans('general.yes') }} -
    -
    - - -
    -
    - {{ Form::label('alt_barcode', trans('admin/settings/general.alt_barcode_type')) }} -
    -
    - {!! Form::alt_barcode_types('alt_barcode', Input::old('alt_barcode', $setting->alt_barcode), 'select2') !!} - {!! $errors->first('barcode_type', ' :message') !!} -
    -
    - @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', Input::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', ':message') !!} - @else - {{ Form::text('qr_text', Input::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('labels_per_page', trans('admin/settings/general.labels_per_page')) }} -
    -
    - {{ Form::text('labels_per_page', Input::old('labels_per_page', $setting->labels_per_page), array('class' => 'form-control','style' => 'width: 100px;')) }} - {!! $errors->first('labels_per_page', ':message') !!} -
    -
    - -
    -
    - {{ Form::label('labels_width', trans('admin/settings/general.labels_fontsize')) }} -
    -
    -
    - {{ Form::text('labels_fontsize', Input::old('labels_fontsize', $setting->labels_fontsize), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.text_pt') }}
    -
    -
    -
    - {!! $errors->first('labels_fontsize', ':message') !!} -
    -
    - -
    -
    - {{ Form::label('labels_width', trans('admin/settings/general.label_dimensions')) }} -
    -
    -
    - {{ Form::text('labels_width', Input::old('labels_width', $setting->labels_width), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.width_w') }}
    -
    -
    -
    -
    - {{ Form::text('labels_height', Input::old('labels_height', $setting->labels_height), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.height_h') }}
    -
    -
    -
    - {!! $errors->first('labels_width', ':message') !!} - {!! $errors->first('labels_height', ':message') !!} -
    -
    - -
    -
    - {{ Form::label('labels_width', trans('admin/settings/general.label_gutters')) }} -
    -
    -
    - {{ Form::text('labels_display_sgutter', Input::old('labels_display_sgutter', $setting->labels_display_sgutter), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.horizontal') }}
    -
    -
    -
    -
    - {{ Form::text('labels_display_bgutter', Input::old('labels_display_bgutter', $setting->labels_display_bgutter), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.vertical') }}
    -
    -
    -
    - {!! $errors->first('labels_display_sgutter', ':message') !!} - {!! $errors->first('labels_display_bgutter', ':message') !!} -
    -
    - -
    -
    - {{ Form::label('labels_width', trans('admin/settings/general.page_padding')) }} -
    -
    -
    - {{ Form::text('labels_pmargin_top', Input::old('labels_pmargin_top', $setting->labels_pmargin_top), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.top') }}
    -
    -
    - {{ Form::text('labels_pmargin_right', Input::old('labels_pmargin_right', $setting->labels_pmargin_right), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.right') }}
    -
    -
    -
    -
    - {{ Form::text('labels_pmargin_bottom', Input::old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.bottom') }}
    -
    -
    - {{ Form::text('labels_pmargin_left', Input::old('labels_pmargin_left', $setting->labels_pmargin_left), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.left') }}
    -
    -
    -
    - {!! $errors->first('labels_width', ':message') !!} - {!! $errors->first('labels_height', ':message') !!} -
    -
    - -
    -
    - {{ Form::label('labels_width', trans('admin/settings/general.page_dimensions')) }} -
    -
    -
    - {{ Form::text('labels_pagewidth', Input::old('labels_pagewidth', $setting->labels_pagewidth), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.width_w') }}
    -
    -
    -
    -
    - {{ Form::text('labels_pageheight', Input::old('labels_pageheight', $setting->labels_pageheight), array('class' => 'form-control')) }} -
    {{ trans('admin/settings/general.height_h') }}
    -
    -
    -
    - {!! $errors->first('labels_pagewidth', ':message') !!} - {!! $errors->first('labels_pageheight', ':message') !!} -
    -
    - -
    -
    - {{ Form::label('labels_width', trans('admin/settings/general.label_fields')) }} -
    -
    -
    - - - -
    -
    -
    - -
    -
    -
    - -
    - - -
    -
    -
    -
    - {{ Form::textarea('default_eula_text', Input::old('default_eula_text', $setting->default_eula_text), array('class' => 'form-control','placeholder' => 'Add your default EULA text')) }} - {!! $errors->first('default_eula_text', ':message') !!} -

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

    -

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

    -
    -
    -
    -
    -
    - -
    - - -
    -
    -

    {!! trans('admin/settings/general.slack_integration_help',array('slack_link' => 'https://my.slack.com/services/new/incoming-webhook')) !!}

    - - -
    -
    - {{ Form::label('slack_endpoint', trans('admin/settings/general.slack_endpoint')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }} - @else - {{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }} - @endif - {!! $errors->first('slack_endpoint', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('slack_channel', trans('admin/settings/general.slack_channel')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','disabled'=>'disabled','placeholder' => '#IT-Ops')) }} - @else - {{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','placeholder' => '#IT-Ops')) }} - @endif - {!! $errors->first('slack_channel', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('slack_botname', trans('admin/settings/general.slack_botname')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'Snipe-Bot')) }} - @else - {{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','placeholder' => 'Snipe-Bot')) }} - @endif - {!! $errors->first('slack_botname', ':message') !!} -
    -
    - - -
    -
    -
    - -
    - -
    -
    - -
    -
    - {{ Form::label('ldap_integration', trans('admin/settings/general.ldap_integration')) }} -
    -
    - {{ Form::checkbox('ldap_enabled', '1', Input::old('ldap_enabled', $setting->ldap_enabled),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.ldap_enabled') }} - {!! $errors->first('ldap_enabled', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('is_ad', trans('admin/settings/general.ad')) }} -
    -
    - {{ Form::checkbox('is_ad', '1', Input::old('is_ad', $setting->is_ad),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.is_ad') }} - {!! $errors->first('is_ad', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('is_ad', trans('admin/settings/general.ldap_pw_sync')) }} -
    -
    - {{ Form::checkbox('ldap_pw_sync', '1', Input::old('ldap_pw_sync', $setting->ldap_pw_sync),array('class' => 'minimal')) }} - {{ trans('general.yes') }} -

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

    - {!! $errors->first('ldap_pw_sync', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ad_domain', trans('admin/settings/general.ad_domain')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ad_domain', Input::old('ad_domain', $setting->ad_domain), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'example.com')) }} - @else - {{ Form::text('ad_domain', Input::old('ad_domain', $setting->ad_domain), array('class' => 'form-control','placeholder' => 'example.com')) }} - @endif -

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

    - {!! $errors->first('ad_domain', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_server', trans('admin/settings/general.ldap_server')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_server', Input::old('ldap_server', $setting->ldap_server), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'ldap://ldap.example.com')) }} - @else - {{ Form::text('ldap_server', Input::old('ldap_server', $setting->ldap_server), array('class' => 'form-control','placeholder' => 'ldap://ldap.example.com')) }} - @endif -

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

    - {!! $errors->first('ldap_server', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_tls', trans('admin/settings/general.ldap_tls')) }} -
    -
    - {{ Form::checkbox('ldap_tls', '1', Input::old('ldap_tls', $setting->ldap_tls),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.ldap_tls_help') }} - {!! $errors->first('ldap_tls', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_server_cert_ignore', trans('admin/settings/general.ldap_server_cert')) }} -
    -
    - {{ Form::checkbox('ldap_server_cert_ignore', '1', Input::old('ldap_server_cert_ignore', $setting->ldap_server_cert_ignore),array('class' => 'minimal')) }} - {{ trans('admin/settings/general.ldap_server_cert_ignore') }} - {!! $errors->first('ldap_server_cert_ignore', ':message') !!} -

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

    -
    -
    - - -
    -
    - {{ Form::label('ldap_uname', trans('admin/settings/general.ldap_uname')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_uname', Input::old('ldap_uname', $setting->ldap_uname), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'binduser@example.com')) }} - @else - {{ Form::text('ldap_uname', Input::old('ldap_uname', $setting->ldap_uname), array('class' => 'form-control','placeholder' => 'binduser@example.com')) }} - @endif - {!! $errors->first('ldap_uname', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_pword', trans('admin/settings/general.ldap_pword')) }} -
    -
    - @if (config('app.lock_passwords')) - {{ Form::password('ldap_pword', array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'binduserpassword')) }} - @else - {{ Form::password('ldap_pword', array('class' => 'form-control','placeholder' => 'binduserpassword')) }} - @endif - {!! $errors->first('ldap_pword', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_basedn', trans('admin/settings/general.ldap_basedn')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_basedn', Input::old('ldap_basedn', $setting->ldap_basedn), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'cn=users/authorized,dc=example,dc=com')) }} - @else - {{ Form::text('ldap_basedn', Input::old('ldap_basedn', $setting->ldap_basedn), array('class' => 'form-control','placeholder' => 'cn=users/authorized,dc=example,dc=com')) }} - @endif - {!! $errors->first('ldap_basedn', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_filter', Input::old('ldap_filter', $setting->ldap_filter), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '&(cn=*)')) }} - @else - {{ Form::text('ldap_filter', Input::old('ldap_filter', $setting->ldap_filter), array('class' => 'form-control','placeholder' => '&(cn=*)')) }} - @endif - {!! $errors->first('ldap_filter', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_username_field', Input::old('ldap_username_field', $setting->ldap_username_field), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'samaccountname')) }} - @else - {{ Form::text('ldap_username_field', Input::old('ldap_username_field', $setting->ldap_username_field), array('class' => 'form-control','placeholder' => 'samaccountname')) }} - @endif - {!! $errors->first('ldap_username_field', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_lname_field', Input::old('ldap_lname_field', $setting->ldap_lname_field), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'sn')) }} - @else - {{ Form::text('ldap_lname_field', Input::old('ldap_lname_field', $setting->ldap_lname_field), array('class' => 'form-control','placeholder' => 'sn')) }} - @endif - {!! $errors->first('ldap_lname_field', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_fname_field', Input::old('ldap_fname_field', $setting->ldap_fname_field), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'givenname')) }} - @else - {{ Form::text('ldap_fname_field', Input::old('ldap_fname_field', $setting->ldap_fname_field), array('class' => 'form-control','placeholder' => 'givenname')) }} - @endif - {!! $errors->first('ldap_fname_field', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_auth_filter_query', trans('admin/settings/general.ldap_auth_filter_query')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_auth_filter_query', Input::old('ldap_auth_filter_query', $setting->ldap_auth_filter_query), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '"uid="')) }} - @else - {{ Form::text('ldap_auth_filter_query', Input::old('ldap_auth_filter_query', $setting->ldap_auth_filter_query), array('class' => 'form-control','placeholder' => '"uid="')) }} - @endif - {!! $errors->first('ldap_auth_filter_query', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_version', trans('admin/settings/general.ldap_version')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_version', Input::old('ldap_version', $setting->ldap_version), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '3')) }} - @else - {{ Form::text('ldap_version', Input::old('ldap_version', $setting->ldap_version), array('class' => 'form-control','placeholder' => '3')) }} - @endif - {!! $errors->first('ldap_version', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_active_flag', trans('admin/settings/general.ldap_active_flag')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_active_flag', Input::old('ldap_active_flag', $setting->ldap_active_flag), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '')) }} - @else - {{ Form::text('ldap_active_flag', Input::old('ldap_active_flag', $setting->ldap_active_flag), array('class' => 'form-control','placeholder' => '')) }} - @endif - {!! $errors->first('ldap_active_flag', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_emp_num', trans('admin/settings/general.ldap_emp_num')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_emp_num', Input::old('ldap_emp_num', $setting->ldap_emp_num), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '')) }} - @else - {{ Form::text('ldap_emp_num', Input::old('ldap_emp_num', $setting->ldap_emp_num), array('class' => 'form-control','placeholder' => '')) }} - @endif - {!! $errors->first('ldap_emp_num', ':message') !!} -
    -
    - - -
    -
    - {{ Form::label('ldap_email', trans('admin/settings/general.ldap_email')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('ldap_email', Input::old('ldap_email', $setting->ldap_email), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '')) }} - @else - {{ Form::text('ldap_email', Input::old('ldap_email', $setting->ldap_email), array('class' => 'form-control','placeholder' => '')) }} - @endif - {!! $errors->first('ldap_email', ':message') !!} -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    - -{{Form::close()}} - -@stop - -@section('moar_scripts') - - -@stop diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php new file mode 100644 index 0000000000..4e2ff7eb74 --- /dev/null +++ b/resources/views/settings/general.blade.php @@ -0,0 +1,200 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update General Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + {{ trans('admin/settings/general.general_settings') }} +

    +
    +
    + + +
    + + +
    +
    + {{ Form::label('full_multiple_companies_support', + trans('admin/settings/general.full_multiple_companies_support_text')) }} +
    +
    + {{ Form::checkbox('full_multiple_companies_support', '1', Input::old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.full_multiple_companies_support_text') }} + {!! $errors->first('full_multiple_companies_support', ':message') !!} +

    + {{ trans('admin/settings/general.full_multiple_companies_support_help_text') }} +

    +
    +
    + + + +
    +
    + {{ Form::label('full_multiple_companies_support', + trans('admin/settings/general.require_accept_signature')) }} +
    +
    + {{ Form::checkbox('require_accept_signature', '1', Input::old('require_accept_signature', $setting->require_accept_signature),array('class' => 'minimal')) }} + {{ trans('general.yes') }} + {!! $errors->first('require_accept_signature', ':message') !!} +

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

    +
    +
    + + + + +
    +
    + {{ Form::label('email_domain', trans('general.email_domain')) }} +
    +
    + {{ Form::text('email_domain', Input::old('email_domain', $setting->email_domain), array('class' => 'form-control','placeholder' => 'example.com')) }} + {{ trans('general.email_domain_help') }} + {!! $errors->first('email_domain', ':message') !!} +
    +
    + + + +
    +
    + {{ Form::label('email_format', trans('general.email_format')) }} +
    +
    + {!! Form::username_format('email_format', Input::old('email_format', $setting->email_format), 'select2') !!} + {!! $errors->first('email_format', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('username_format', trans('general.username_format')) }} +
    +
    + {!! Form::username_format('username_format', Input::old('username_format', $setting->username_format), 'select2') !!} + {!! $errors->first('username_format', ':message') !!} +
    +
    + + + + +
    +
    + {{ Form::label('load_remote', trans('admin/settings/general.load_remote_text')) }} +
    +
    + {{ Form::checkbox('load_remote', '1', Input::old('load_remote', $setting->load_remote),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.load_remote_help_text') }} +
    +
    + + +
    +
    + {{ Form::label('per_page', trans('admin/settings/general.per_page')) }} +
    +
    + {{ Form::text('per_page', Input::old('per_page', $setting->per_page), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {!! $errors->first('per_page', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('per_page', trans('admin/settings/general.default_eula_text')) }} +
    +
    + {{ Form::textarea('default_eula_text', Input::old('default_eula_text', $setting->default_eula_text), array('class' => 'form-control','placeholder' => 'Add your default EULA text')) }} + {!! $errors->first('default_eula_text', ':message') !!} +

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

    +

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

    +
    +
    + + + +
    +
    + {{ Form::label('login_note', trans('admin/settings/general.login_note')) }} +
    +
    + @if (config('app.lock_passwords')===true) + + + {!! $errors->first('login_note', ':message') !!} +

    {{ trans('general.lock_passwords') }}

    + @else + + {!! $errors->first('login_note', ':message') !!} + @endif +

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

    +
    +
    + +
    + +
    +
    +
    +
    + + {{Form::close()}} + +@stop + +@section('moar_scripts') + + +@stop diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 870936a752..afcc8def11 100755 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -2,188 +2,206 @@ {{-- Page title --}} @section('title') - {{ trans('admin/settings/general.settings') }} + {{ trans('general.admin') }} @parent @stop {{-- Page content --}} @section('content') + + + +
    + +
    +
    +
    + +
    + Branding +

    Logo, Site Name

    +
    +
    +
    + + +
    +
    +
    + +
    + General Settings +

    Language and stuff

    +
    +
    +
    + + +
    +
    +
    + +
    + Security +

    Two-factor

    +
    +
    +
    + +
    +
    +
    + +
    + Groups +

    Account permission groups

    +
    +
    +
    + + +
    +
    +
    + +
    + Localization +

    Language, time zones

    + +
    +
    +
    + + +
    +
    +
    + +
    + Notifications +

    Email alerts

    +
    +
    +
    + +
    +
    +
    + +
    + Slack +

    Slack settings

    +
    +
    +
    + +
    +
    +
    + +
    + Asset Tags +

    Incrementing and prefixes

    +
    +
    +
    + +
    +
    +
    + +
    + Barcodes +

    Barcode & QR settings

    +
    +
    +
    + +
    +
    +
    + +
    + Labels +

    Label sizes & settings

    +
    +
    +
    + + +
    +
    +
    + +
    + LDAP +

    LDAP/Active Directory

    +
    +
    +
    + +
    +
    +
    + +
    + Backups +

    Download files & Data

    +
    +
    +
    + + +
    +
    +
    + +
    + OAuth +

    Oauth endpoint Settings

    +
    +
    +
    + + + +
    +
    +
    + +
    + Purge +

    Purge Deleted Records

    +
    +
    +
    + + + + + + + +
    + + + + + + + + + +
    -
    +
    -

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

    - +

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

    - - - @foreach ($settings as $setting) - - - - - - - @if ($setting->full_multiple_companies_support == 1) - - @else - - @endif - - - - - @if ($setting->two_factor_enabled == '') - - @elseif ($setting->two_factor_enabled == '1') - - @elseif ($setting->two_factor_enabled == '2') - - @endif - - - - - - - - - @if ($setting->alert_email) - - @else - - @endif - - - - - @if ($setting->alerts_enabled == 1) - - @else - - @endif - - - - - @if ($setting->header_color) - - @else - - @endif - - - - - @if ($setting->auto_increment_assets == 1) - - @else - - @endif - - - - - @if ($setting->require_accept_signature == 1) - - @else - - @endif - - - - - @if ($setting->load_remote == 1) - - @else - - @endif - - - - - - - - - - - - @if ($setting->qr_code == 1) - - @else - - @endif - - - - - @if ($setting->default_eula_text!='') - - @else - - @endif - - - - - @if ($setting->slack_endpoint!='') - - @else - - @endif - - - - - @if ($setting->ldap_enabled == 1) - - @else - - @endif - - @if ($setting->ldap_enabled == 1) - - - - - @endif - @endforeach - -
    {{ trans('admin/settings/general.site_name') }}{{ $setting->site_name }}
    - {{ trans('admin/settings/general.full_multiple_companies_support_text') }} - {{ trans('general.yes') }}{{ trans('general.no') }}
    {{ trans('admin/settings/general.two_factor_enabled_text') }}{{ trans('admin/settings/general.two_factor_disabled') }}{{ trans('admin/settings/general.two_factor_optional') }}{{ trans('admin/settings/general.two_factor_required') }}
    {{ trans('admin/settings/general.default_currency') }}{{ $setting->default_currency }}
    {{ trans('admin/settings/general.alert_email') }}{{ $setting->alert_email }}--
    {{ trans('admin/settings/general.alerts_enabled') }}{{ trans('general.yes') }}{{ trans('general.no') }}
    {{ trans('admin/settings/general.header_color') }}{{ $setting->header_color }}default
    {{ trans('admin/settings/general.auto_increment_assets') }}{{ trans('general.yes') }}{{ trans('general.no') }}
    {{ trans('admin/settings/general.require_accept_signature') }}{{ trans('general.yes') }}{{ trans('general.no') }}
    {{ trans('admin/settings/general.load_remote_text') }}{{ trans('general.yes') }}{{ trans('general.no') }}
    {{ trans('admin/settings/general.auto_increment_prefix') }}{{ $setting->auto_increment_prefix }}
    {{ trans('admin/settings/general.per_page') }}{{ $setting->per_page }}
    {{ trans('admin/settings/general.display_qr') }}{{ trans('general.yes') }} - ({{ $setting->barcode_type }}) - {{ $setting->qr_text }} - - {{ trans('general.no') }}
    {{ trans('admin/settings/general.default_eula_text') }}{{ trans('general.yes') }}{{ trans('general.no') }}
    {{ trans('admin/settings/general.slack_integration') }} {{ trans('general.yes') }} - - @if ($setting->slack_channel!='') - {{ $setting->slack_channel }} - @endif - - {{ trans('general.no') }}
    {{ trans('admin/settings/general.ldap_integration') }} - {{ $setting->ldap_server }} - @if ($setting->is_ad == '1') - (Active Directory) - @endif - {{ trans('general.no') }}
    Test LDAP Connection - Test LDAP - - - - - - -
    -
    -

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

    -
    @@ -199,7 +217,7 @@ @@ -210,75 +228,7 @@ -
    -
    -
    -
    -

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

    -
    - {{ Form::open(['method' => 'POST', 'route' => ['purge'], 'class' => 'form-horizontal', 'role' => 'form' ]) }} - - {{csrf_field()}} -
    -

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

    -
    - {{ Form::label('confirm_purge', trans('admin/settings/general.confirm_purge')) }} -
    -
    - @if (config('app.lock_passwords')===true) - {{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'disabled')) }} - @else - {{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control')) }} - @endif - {!! $errors->first('ldap_version', ':message') !!} -
    -
    - - {{ Form::close() }} -
    -
    -
    @stop -@section('moar_scripts') - -@stop diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.php new file mode 100644 index 0000000000..b66302ea58 --- /dev/null +++ b/resources/views/settings/labels.blade.php @@ -0,0 +1,207 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Label Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Security +

    +
    +
    + + +
    + +
    +
    + {{ Form::label('labels_per_page', trans('admin/settings/general.labels_per_page')) }} +
    +
    + {{ Form::text('labels_per_page', Input::old('labels_per_page', $setting->labels_per_page), array('class' => 'form-control','style' => 'width: 100px;')) }} + {!! $errors->first('labels_per_page', ':message') !!} +
    +
    + +
    +
    + {{ Form::label('labels_width', trans('admin/settings/general.labels_fontsize')) }} +
    +
    +
    + {{ Form::text('labels_fontsize', Input::old('labels_fontsize', $setting->labels_fontsize), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.text_pt') }}
    +
    +
    +
    + {!! $errors->first('labels_fontsize', ':message') !!} +
    +
    + +
    +
    + {{ Form::label('labels_width', trans('admin/settings/general.label_dimensions')) }} +
    +
    +
    + {{ Form::text('labels_width', Input::old('labels_width', $setting->labels_width), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.width_w') }}
    +
    +
    +
    +
    + {{ Form::text('labels_height', Input::old('labels_height', $setting->labels_height), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.height_h') }}
    +
    +
    +
    + {!! $errors->first('labels_width', ':message') !!} + {!! $errors->first('labels_height', ':message') !!} +
    +
    + +
    +
    + {{ Form::label('labels_width', trans('admin/settings/general.label_gutters')) }} +
    +
    +
    + {{ Form::text('labels_display_sgutter', Input::old('labels_display_sgutter', $setting->labels_display_sgutter), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.horizontal') }}
    +
    +
    +
    +
    + {{ Form::text('labels_display_bgutter', Input::old('labels_display_bgutter', $setting->labels_display_bgutter), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.vertical') }}
    +
    +
    +
    + {!! $errors->first('labels_display_sgutter', ':message') !!} + {!! $errors->first('labels_display_bgutter', ':message') !!} +
    +
    + +
    +
    + {{ Form::label('labels_width', trans('admin/settings/general.page_padding')) }} +
    +
    +
    + {{ Form::text('labels_pmargin_top', Input::old('labels_pmargin_top', $setting->labels_pmargin_top), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.top') }}
    +
    +
    + {{ Form::text('labels_pmargin_right', Input::old('labels_pmargin_right', $setting->labels_pmargin_right), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.right') }}
    +
    +
    +
    +
    + {{ Form::text('labels_pmargin_bottom', Input::old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.bottom') }}
    +
    +
    + {{ Form::text('labels_pmargin_left', Input::old('labels_pmargin_left', $setting->labels_pmargin_left), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.left') }}
    +
    +
    +
    + {!! $errors->first('labels_width', ':message') !!} + {!! $errors->first('labels_height', ':message') !!} +
    +
    + +
    +
    + {{ Form::label('labels_width', trans('admin/settings/general.page_dimensions')) }} +
    +
    +
    + {{ Form::text('labels_pagewidth', Input::old('labels_pagewidth', $setting->labels_pagewidth), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.width_w') }}
    +
    +
    +
    +
    + {{ Form::text('labels_pageheight', Input::old('labels_pageheight', $setting->labels_pageheight), array('class' => 'form-control')) }} +
    {{ trans('admin/settings/general.height_h') }}
    +
    +
    +
    + {!! $errors->first('labels_pagewidth', ':message') !!} + {!! $errors->first('labels_pageheight', ':message') !!} +
    +
    + +
    +
    + {{ Form::label('labels_width', trans('admin/settings/general.label_fields')) }} +
    +
    +
    + + + +
    +
    +
    + + + + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop diff --git a/resources/views/settings/ldap.blade.php b/resources/views/settings/ldap.blade.php new file mode 100644 index 0000000000..af95da5779 --- /dev/null +++ b/resources/views/settings/ldap.blade.php @@ -0,0 +1,394 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update LDAP/AD Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + LDAP/AD +

    +
    +
    + + +
    + + +
    +
    + {{ Form::label('ldap_integration', trans('admin/settings/general.ldap_integration')) }} +
    +
    + {{ Form::checkbox('ldap_enabled', '1', Input::old('ldap_enabled', $setting->ldap_enabled),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.ldap_enabled') }} + {!! $errors->first('ldap_enabled', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('is_ad', trans('admin/settings/general.ad')) }} +
    +
    + {{ Form::checkbox('is_ad', '1', Input::old('is_ad', $setting->is_ad),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.is_ad') }} + {!! $errors->first('is_ad', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('is_ad', trans('admin/settings/general.ldap_pw_sync')) }} +
    +
    + {{ Form::checkbox('ldap_pw_sync', '1', Input::old('ldap_pw_sync', $setting->ldap_pw_sync),array('class' => 'minimal')) }} + {{ trans('general.yes') }} +

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

    + {!! $errors->first('ldap_pw_sync', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ad_domain', trans('admin/settings/general.ad_domain')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ad_domain', Input::old('ad_domain', $setting->ad_domain), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'example.com')) }} + @else + {{ Form::text('ad_domain', Input::old('ad_domain', $setting->ad_domain), array('class' => 'form-control','placeholder' => 'example.com')) }} + @endif +

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

    + {!! $errors->first('ad_domain', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_server', trans('admin/settings/general.ldap_server')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_server', Input::old('ldap_server', $setting->ldap_server), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'ldap://ldap.example.com')) }} + @else + {{ Form::text('ldap_server', Input::old('ldap_server', $setting->ldap_server), array('class' => 'form-control','placeholder' => 'ldap://ldap.example.com')) }} + @endif +

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

    + {!! $errors->first('ldap_server', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_tls', trans('admin/settings/general.ldap_tls')) }} +
    +
    + {{ Form::checkbox('ldap_tls', '1', Input::old('ldap_tls', $setting->ldap_tls),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.ldap_tls_help') }} + {!! $errors->first('ldap_tls', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_server_cert_ignore', trans('admin/settings/general.ldap_server_cert')) }} +
    +
    + {{ Form::checkbox('ldap_server_cert_ignore', '1', Input::old('ldap_server_cert_ignore', $setting->ldap_server_cert_ignore),array('class' => 'minimal')) }} + {{ trans('admin/settings/general.ldap_server_cert_ignore') }} + {!! $errors->first('ldap_server_cert_ignore', ':message') !!} +

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

    +
    +
    + + +
    +
    + {{ Form::label('ldap_uname', trans('admin/settings/general.ldap_uname')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_uname', Input::old('ldap_uname', $setting->ldap_uname), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'binduser@example.com')) }} + @else + {{ Form::text('ldap_uname', Input::old('ldap_uname', $setting->ldap_uname), array('class' => 'form-control','placeholder' => 'binduser@example.com')) }} + @endif + {!! $errors->first('ldap_uname', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_pword', trans('admin/settings/general.ldap_pword')) }} +
    +
    + @if (config('app.lock_passwords')) + {{ Form::password('ldap_pword', array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'binduserpassword')) }} + @else + {{ Form::password('ldap_pword', array('class' => 'form-control','placeholder' => 'binduserpassword')) }} + @endif + {!! $errors->first('ldap_pword', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_basedn', trans('admin/settings/general.ldap_basedn')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_basedn', Input::old('ldap_basedn', $setting->ldap_basedn), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'cn=users/authorized,dc=example,dc=com')) }} + @else + {{ Form::text('ldap_basedn', Input::old('ldap_basedn', $setting->ldap_basedn), array('class' => 'form-control','placeholder' => 'cn=users/authorized,dc=example,dc=com')) }} + @endif + {!! $errors->first('ldap_basedn', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_filter', Input::old('ldap_filter', $setting->ldap_filter), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '&(cn=*)')) }} + @else + {{ Form::text('ldap_filter', Input::old('ldap_filter', $setting->ldap_filter), array('class' => 'form-control','placeholder' => '&(cn=*)')) }} + @endif + {!! $errors->first('ldap_filter', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_username_field', Input::old('ldap_username_field', $setting->ldap_username_field), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'samaccountname')) }} + @else + {{ Form::text('ldap_username_field', Input::old('ldap_username_field', $setting->ldap_username_field), array('class' => 'form-control','placeholder' => 'samaccountname')) }} + @endif + {!! $errors->first('ldap_username_field', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_lname_field', Input::old('ldap_lname_field', $setting->ldap_lname_field), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'sn')) }} + @else + {{ Form::text('ldap_lname_field', Input::old('ldap_lname_field', $setting->ldap_lname_field), array('class' => 'form-control','placeholder' => 'sn')) }} + @endif + {!! $errors->first('ldap_lname_field', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_fname_field', Input::old('ldap_fname_field', $setting->ldap_fname_field), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'givenname')) }} + @else + {{ Form::text('ldap_fname_field', Input::old('ldap_fname_field', $setting->ldap_fname_field), array('class' => 'form-control','placeholder' => 'givenname')) }} + @endif + {!! $errors->first('ldap_fname_field', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_auth_filter_query', trans('admin/settings/general.ldap_auth_filter_query')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_auth_filter_query', Input::old('ldap_auth_filter_query', $setting->ldap_auth_filter_query), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '"uid="')) }} + @else + {{ Form::text('ldap_auth_filter_query', Input::old('ldap_auth_filter_query', $setting->ldap_auth_filter_query), array('class' => 'form-control','placeholder' => '"uid="')) }} + @endif + {!! $errors->first('ldap_auth_filter_query', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_version', trans('admin/settings/general.ldap_version')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_version', Input::old('ldap_version', $setting->ldap_version), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '3')) }} + @else + {{ Form::text('ldap_version', Input::old('ldap_version', $setting->ldap_version), array('class' => 'form-control','placeholder' => '3')) }} + @endif + {!! $errors->first('ldap_version', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_active_flag', trans('admin/settings/general.ldap_active_flag')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_active_flag', Input::old('ldap_active_flag', $setting->ldap_active_flag), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '')) }} + @else + {{ Form::text('ldap_active_flag', Input::old('ldap_active_flag', $setting->ldap_active_flag), array('class' => 'form-control','placeholder' => '')) }} + @endif + {!! $errors->first('ldap_active_flag', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_emp_num', trans('admin/settings/general.ldap_emp_num')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_emp_num', Input::old('ldap_emp_num', $setting->ldap_emp_num), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '')) }} + @else + {{ Form::text('ldap_emp_num', Input::old('ldap_emp_num', $setting->ldap_emp_num), array('class' => 'form-control','placeholder' => '')) }} + @endif + {!! $errors->first('ldap_emp_num', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('ldap_email', trans('admin/settings/general.ldap_email')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('ldap_email', Input::old('ldap_email', $setting->ldap_email), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '')) }} + @else + {{ Form::text('ldap_email', Input::old('ldap_email', $setting->ldap_email), array('class' => 'form-control','placeholder' => '')) }} + @endif + {!! $errors->first('ldap_email', ':message') !!} +
    +
    + + + +
    +
    + Test LDAP Connection +
    +
    +
    +
    + Test LDAP + + + +
    +
    +
    +
    + + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop + +@section('moar_scripts') + +@stop diff --git a/resources/views/settings/localization.blade.php b/resources/views/settings/localization.blade.php new file mode 100644 index 0000000000..e3a2f2f4d2 --- /dev/null +++ b/resources/views/settings/localization.blade.php @@ -0,0 +1,103 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Localization Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Localization +

    +
    +
    + + +
    + + +
    +
    + {{ Form::label('site_name', trans('admin/settings/general.default_language')) }} +
    +
    + {!! Form::locales('locale', Input::old('locale', $setting->locale), 'select2') !!} + + {!! $errors->first('locale', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('time_display_format', trans('general.time_and_date_display')) }} +
    +
    + {!! Form::date_display_format('date_display_format', Input::old('date_display_format', $setting->date_display_format), 'select2') !!} + + {!! Form::time_display_format('time_display_format', Input::old('time_display_format', $setting->time_display_format), 'select2') !!} + + {!! $errors->first('time_display_format', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('default_currency', trans('admin/settings/general.default_currency')) }} +
    +
    + {{ Form::text('default_currency', Input::old('default_currency', $setting->default_currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {!! $errors->first('default_currency', ':message') !!} +
    +
    + + + + + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop + diff --git a/resources/views/settings/purge-form.blade.php b/resources/views/settings/purge-form.blade.php new file mode 100644 index 0000000000..c42e9362c1 --- /dev/null +++ b/resources/views/settings/purge-form.blade.php @@ -0,0 +1,50 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Purge Deleted + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + +
    +
    +
    +
    +

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

    +
    + {{ Form::open(['method' => 'POST', 'route' => ['settings.purge.index'], 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} +
    +

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

    +
    + {{ Form::label('confirm_purge', trans('admin/settings/general.confirm_purge')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'disabled')) }} + @else + {{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control')) }} + @endif + {!! $errors->first('ldap_version', ':message') !!} +
    +
    + + {{ Form::close() }} +
    +
    +
    + + {{Form::close()}} + +@stop diff --git a/resources/views/settings/security.blade.php b/resources/views/settings/security.blade.php new file mode 100644 index 0000000000..08e7db2faf --- /dev/null +++ b/resources/views/settings/security.blade.php @@ -0,0 +1,80 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Security Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Security +

    +
    +
    + + +
    + + +
    +
    + {{ Form::label('two_factor_enabled', trans('admin/settings/general.two_factor_enabled_text')) }} +
    +
    + + {!! Form::two_factor_options('two_factor_enabled', Input::old('two_factor_enabled', $setting->two_factor_enabled), 'select2') !!} +

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

    + + @if (config('app.lock_passwords')) +

    {{ trans('general.feature_disabled') }}

    + @endif + + {!! $errors->first('two_factor_enabled', ':message') !!} +
    +
    + + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop diff --git a/resources/views/settings/slack.blade.php b/resources/views/settings/slack.blade.php new file mode 100644 index 0000000000..6e03057e5e --- /dev/null +++ b/resources/views/settings/slack.blade.php @@ -0,0 +1,110 @@ +@extends('layouts/default') + +{{-- Page title --}} +@section('title') + Update Slack Settings + @parent +@stop + +@section('header_right') + {{ trans('general.back') }} +@stop + + +{{-- Page content --}} +@section('content') + + + + + {{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'role' => 'form' ]) }} + + {{csrf_field()}} + +
    +
    + + +
    +
    +

    + Slack +

    +
    +
    + + +
    + +

    {!! trans('admin/settings/general.slack_integration_help',array('slack_link' => 'https://my.slack.com/services/new/incoming-webhook')) !!}

    + + +
    +
    + {{ Form::label('slack_endpoint', trans('admin/settings/general.slack_endpoint')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }} + @else + {{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }} + @endif + {!! $errors->first('slack_endpoint', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('slack_channel', trans('admin/settings/general.slack_channel')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','disabled'=>'disabled','placeholder' => '#IT-Ops')) }} + @else + {{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','placeholder' => '#IT-Ops')) }} + @endif + {!! $errors->first('slack_channel', ':message') !!} +
    +
    + + +
    +
    + {{ Form::label('slack_botname', trans('admin/settings/general.slack_botname')) }} +
    +
    + @if (config('app.lock_passwords')===true) + {{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'Snipe-Bot')) }} + @else + {{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','placeholder' => 'Snipe-Bot')) }} + @endif + {!! $errors->first('slack_botname', ':message') !!} +
    +
    + + + +
    + +
    + +
    +
    +
    + + {{Form::close()}} + +@stop diff --git a/routes/api.php b/routes/api.php index dcfd305c76..c6b2c5b95f 100644 --- a/routes/api.php +++ b/routes/api.php @@ -367,6 +367,11 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () { ] ); // Settings resource + Route::get('settings/ldaptest', [ + 'as' => 'api.settings.ldaptest', + 'uses' => 'SettingsController@getLdapTest' + ]); + /*--- Status Labels API ---*/ diff --git a/routes/web.php b/routes/web.php index 1d40b316d4..e476249d9f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -103,65 +103,79 @@ Route::group(['middleware' => 'auth'], function () { | */ -Route::group([ 'prefix' => 'admin','middleware' => ['auth']], function () { - - Route::get('requests', - // foreach( CheckoutRequest::with('user')->get() as $requestedItem) { - // echo $requestedItem->user->username . ' requested ' . $requestedItem->requestedItem->name; - [ - 'as' => 'requests', - 'middleware' => 'authorize:admin', - 'uses' => 'ViewAssetsController@getRequestedIndex' - ]); - # Admin Settings Routes (for categories, maufactureres, etc) - Route::group([ 'prefix' => 'settings', 'middleware'=>'authorize:superuser'], function () { +Route::group([ 'prefix' => 'admin','middleware' => ['authorize:superuser']], function () { - # Settings - Route::group([ 'prefix' => 'app' ], function () { + Route::get('settings', ['as' => 'settings.general.index','uses' => 'SettingsController@getSettings' ]); + Route::post('settings', ['as' => 'settings.general.save','uses' => 'SettingsController@postSettings' ]); - Route::get('api', [ 'as' => 'settings.api', 'uses' => 'SettingsController@api' ]); - Route::post('purge', ['as' => 'purge', 'uses' => 'SettingsController@postPurge']); - Route::get('edit', [ 'as' => 'edit/settings', 'uses' => 'SettingsController@getEdit' ]); - Route::post('edit', 'SettingsController@postEdit'); - Route::get('ldaptest', [ - 'as' => 'settings/ldaptest', - 'uses' => 'SettingsController@getLdapTest' - ]); + Route::get('branding', ['as' => 'settings.branding.index','uses' => 'SettingsController@getBranding' ]); + Route::post('branding', ['as' => 'settings.branding.save','uses' => 'SettingsController@postBranding' ]); - Route::get('/', [ 'as' => 'app', 'uses' => 'SettingsController@getIndex' ]); - }); + Route::get('security', ['as' => 'settings.security.index','uses' => 'SettingsController@getSecurity' ]); + Route::post('security', ['as' => 'settings.security.save','uses' => 'SettingsController@postSecurity' ]); + + Route::get('groups', ['as' => 'settings.groups.index','uses' => 'GroupsController@index' ]); + + Route::get('localization', ['as' => 'settings.localization.index','uses' => 'SettingsController@getLocalization' ]); + Route::post('localization', ['as' => 'settings.localization.save','uses' => 'SettingsController@postLocalization' ]); + + Route::get('notifications', ['as' => 'settings.alerts.index','uses' => 'SettingsController@getAlerts' ]); + Route::post('notifications', ['as' => 'settings.alerts.save','uses' => 'SettingsController@postAlerts' ]); + + Route::get('slack', ['as' => 'settings.slack.index','uses' => 'SettingsController@getSlack' ]); + Route::post('slack', ['as' => 'settings.slack.save','uses' => 'SettingsController@postSlack' ]); + + Route::get('asset_tags', ['as' => 'settings.asset_tags.index','uses' => 'SettingsController@getAssetTags' ]); + Route::post('asset_tags', ['as' => 'settings.asset_tags.save','uses' => 'SettingsController@postAssetTags' ]); + + Route::get('barcodes', ['as' => 'settings.barcodes.index','uses' => 'SettingsController@getBarcodes' ]); + Route::post('barcodes', ['as' => 'settings.barcodes.save','uses' => 'SettingsController@postBarcodes' ]); + + Route::get('labels', ['as' => 'settings.labels.index','uses' => 'SettingsController@getLabels' ]); + Route::post('labels', ['as' => 'settings.labels.save','uses' => 'SettingsController@postLabels' ]); + + Route::get('ldap', ['as' => 'settings.ldap.index','uses' => 'SettingsController@getLdapSettings' ]); + Route::post('ldap', ['as' => 'settings.ldap.save','uses' => 'SettingsController@postLdapSettings' ]); - # Settings - Route::group([ 'prefix' => 'backups', 'middleware' => 'auth' ], function () { + Route::get('oauth', [ 'as' => 'settings.oauth.index', 'uses' => 'SettingsController@api' ]); + + Route::get('purge', ['as' => 'settings.purge.index', 'uses' => 'SettingsController@getPurge']); + Route::post('purge', ['as' => 'settings.purge.save', 'uses' => 'SettingsController@postPurge']); + + # Backups + Route::group([ 'prefix' => 'backups', 'middleware' => 'auth' ], function () { - Route::get('download/{filename}', [ - 'as' => 'settings/download-file', - 'uses' => 'SettingsController@downloadFile' ]); + Route::get('download/{filename}', [ + 'as' => 'settings.backups.download', + 'uses' => 'SettingsController@downloadFile' ]); - Route::delete('delete/{filename}', [ - 'as' => 'settings/delete-file', - 'uses' => 'SettingsController@deleteFile' ]); + Route::delete('delete/{filename}', [ + 'as' => 'settings.backups.destroy', + 'uses' => 'SettingsController@deleteFile' ]); - Route::post('/', [ - 'as' => 'settings/backups', - 'uses' => 'SettingsController@postBackups' - ]); + Route::post('/', [ + 'as' => 'settings.backups.create', + 'uses' => 'SettingsController@postBackups' + ]); - - Route::get('/', [ 'as' => 'settings/backups', 'uses' => 'SettingsController@getBackups' ]); - }); + Route::get('/', [ 'as' => 'settings.backups.index', 'uses' => 'SettingsController@getBackups' ]); }); - # Dashboard - Route::get('/', [ 'as' => 'admin', 'uses' => 'DashboardController@getIndex' ]); + Route::get('requests', [ 'as' => 'requests', 'middleware' => 'authorize:admin', 'uses' => 'ViewAssetsController@getRequestedIndex']); + + + + + Route::get('/', ['as' => 'settings.index', 'uses' => 'SettingsController@index' ]); + });
    {{ trans('admin/settings/general.laravel') }} - {{ $setting->lar_ver() }} + {{ $snipeSettings->lar_ver() }}