@extends('layouts.'.(isset($layout)?$layout:'app')) @section('pagetitle', ($box->alias ?: $box->name) . " - " . __("Settings")) @section('breadcrumbs') @endsection @section('content') @if(auth()->user()->hasPermission( 'access.admin') && $box->networkSettingsSet) @php if( App\User::where('id', $box->networkSettingsSet->updated_by)->exists()){ $updated_by_name = App\User::find($box->networkSettingsSet->updated_by)->name ; } else { $updated_by_name = "UNKNOWN"; } @endphp {{ __("Last update (including writeback from box): :timestamp. Last manual change by :name. (Only admins can see this)", ['timestamp' => $box->networkSettingsSet->updated_at, 'name' => $updated_by_name ]) }} @endif
{{__('Back')}}

@csrf

{{__("Server information")}}

@if(auth()->user()->hasPermission('box.mocks'))
@if($box->enable_mock_slave_temperatures)


@endif @endif @if(auth()->user()->hasPermission('box.manage_warnings'))


@endif @if(auth()->user()->hasPermission('box.links.manage'))
@endif @if(auth()->user()->hasPermission('box.delete')) {{__('Delete box')}} @endif
@if($box->networkSettingsSet != null) @foreach($box->networkSettingsSet->contents as $category => $settings) @unless($category == "Email") @if(!array_key_exists($category, \App\NetworkSettingsSet::SETTING_PERMS) || (array_key_exists($category, \App\NetworkSettingsSet::SETTING_PERMS) && auth()->user()->hasPermission(\App\NetworkSettingsSet::SETTING_PERMS[$category]))) @if(substr($category, -1, 1) != "_")

{{__($category)}}

@foreach($settings as $option => $val) @unless(is_array($val)) @if(!array_key_exists($category."|".$option, \App\NetworkSettingsSet::SETTING_PERMS) || (array_key_exists($category."|".$option, \App\NetworkSettingsSet::SETTING_PERMS) && auth()->user()->hasPermission(\App\NetworkSettingsSet::SETTING_PERMS[$category."|".$option]))) @php $timezone = 3; if(array_key_exists('Time',$box->networkSettingsSet->contents) && array_key_exists('Timezone',$box->networkSettingsSet->contents['Time'])){ $timezone = $box->networkSettingsSet->contents['Time']['Timezone']; } @endphp @if(array_key_exists($category . '|' . $option, $inputmodifiers)) {!! \App\Helpers\InputFieldHelper::getAltInputField( $option, $option, "Network|" . $category . '|' . $option, $inputmodifiers[$category . '|' . $option]['type'], array_key_exists('data', $inputmodifiers[$category . '|' . $option]) ?$inputmodifiers[$category . '|' . $option]['data']: [], $val, $timezone) !!} @else @if(substr($option, -1, 1) != "_")
@endif @endif @endif @else

{{__('setting.'.$option)}}

@foreach($val as $l1option => $l1val) @if(!is_array($l1val)) @if(!array_key_exists($option . '|' . $l1option, \App\NetworkSettingsSet::SETTING_PERMS) || (array_key_exists($option . '|' . $l1option, \App\NetworkSettingsSet::SETTING_PERMS) && auth()->user()->hasPermission(\App\NetworkSettingsSet::SETTING_PERMS[$option . '|' . $l1option]))) @if(array_key_exists( $option . '|' . $l1option, $inputmodifiers)) {!! \App\Helpers\InputFieldHelper::getAltInputField( $option . '|' . $l1option, $l1option, $category . '|' . $option . '|' . $l1option, $inputmodifiers[$category . '|' . $option . '|' . $l1option]['type'], array_key_exists('data', $inputmodifiers[$category . '|' . $option . '|' . $l1option]) ?$inputmodifiers[$option . '|' . $l1option]['data']: [], $l1val ) !!} @else @if( substr($l1option, -1, 1) != "_")
@endif @endif @endif @else @endif @endforeach @endunless @endforeach
@endif @endif @endunless @endforeach @endif
@endsection @section("page_js") @endsection