Skip to content

A free open source IT asset/license management system

Merge branch 'develop' into chore/migrate-select-helper

Marcus Moore2a156776a460
diff --cc resources/views/settings/branding.blade.php
index 96e42bc99c,dcee8027f6..dcebbec48c
--- a/resources/views/settings/branding.blade.php
+++ b/resources/views/settings/branding.blade.php
@@@ -67,15 -78,11 +78,19 @@@
<label for="brand">{{ trans('admin/settings/general.web_brand') }}</label>
</div>
<div class="col-md-9">
- {!! Form::select('brand', [
- '1'=> trans('admin/settings/general.logo_option_types.text'),
- '2'=> trans('admin/settings/general.logo_option_types.logo'),
- '3'=> trans('admin/settings/general.logo_option_types.logo_and_text')], old('brand', $setting->brand), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
-
+ <x-input.select
+ name="brand"
+ id="brand"
- :options="['1'=>'Text','2'=>'Logo','3'=>'Logo + Text']"
++ :options="[
++ '1' => trans('admin/settings/general.logo_option_types.text'),
++ '2' => trans('admin/settings/general.logo_option_types.logo'),
++ '3' => trans('admin/settings/general.logo_option_types.logo_and_text'),
++ ]"
+ :selected="old('brand', $setting->brand)"
+ class="form-control"
+ style="width: 150px"
+ />
+ {!! $errors->first('brand', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
@@@ -259,25 -277,10 +285,25 @@@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
- {!! Form::select('support_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
+ <x-input.select
+ name="support_footer"
+ id="support_footer"
- :options="['on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only']"
++ :options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
+ :selected="old('support_footer', $setting->support_footer)"
+ disabled
+ class="form-control disabled"
+ style="width: 150px"
+ />
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
- {!! Form::select('support_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
+ <x-input.select
+ name="support_footer"
+ id="support_footer"
- :options="['on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only']"
++ :options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
+ :selected="old('support_footer', $setting->support_footer)"
+ class="form-control"
+ style="width: 150px"
+ />
@endif
@@@ -293,25 -296,10 +319,25 @@@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
- {!! Form::select('version_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
+ <x-input.select
+ name="version_footer"
+ id="version_footer"
- :options="['on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only']"
++ :options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
+ :selected="old('version_footer', $setting->version_footer)"
+ disabled
+ class="form-control disabled"
+ style="width: 150px"
+ />
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
- {!! Form::select('version_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
+ <x-input.select
+ name="version_footer"
+ id="version_footer"
- :options="['on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only']"
++ :options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
+ :selected="old('version_footer', $setting->version_footer)"
+ class="form-control"
+ style="width: 150px"
+ />
@endif
<p class="help-block">{{ trans('admin/settings/general.version_footer_help') }}</p>
diff --cc resources/views/settings/general.blade.php
index 3e9a26489a,20d8517546..1b123d3519
--- a/resources/views/settings/general.blade.php
+++ b/resources/views/settings/general.blade.php
@@@ -369,16 -374,14 +377,16 @@@
<!-- Depreciation method -->
<div class="form-group {{ $errors->has('depreciation_method') ? 'error' : '' }}">
<div class="col-md-3">
- <label for="depreciation_method">{{ trans('Depreciation method') }}</label>
+ <label for="depreciation_method">{{ trans('admin/depreciations/general.depreciation_method') }}</label>
</div>
<div class="col-md-9">
- {{ Form::select('depreciation_method', array(
- 'default' => trans('admin/depreciations/general.linear_depreciation'),
- 'half_1' => trans('admin/depreciations/general.half_1'),
- 'half_2' => trans('admin/depreciations/general.half_2'),
- ), old('username_format', $setting->depreciation_method), ['class' =>'select2', 'style' => 'width: 80%']) }}
+ <x-input.select
+ name="depreciation_method"
+ id="depreciation_method"
- :options="['default' => 'Linear (default)', 'half_1' => 'Half-year convention, always applied', 'half_2' => 'Half-year convention, applied with condition']"
++ :options="['default' => trans('admin/depreciations/general.linear_depreciation'), 'half_1' => trans('admin/depreciations/general.half_1'), 'half_2' => trans('admin/depreciations/general.half_2')]"
+ :selected="old('depreciation_method', $setting->depreciation_method)"
+ style="width: 80%"
+ />
</div>
</div>
<!-- /.form-group -->