Skip to content

A free open source IT asset/license management system

Adapt for regular "skin" macro

Marcus Mooreef26f48f603c
diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php
index df0b97c4ea..f86812e976 100755
--- a/resources/views/account/profile.blade.php
+++ b/resources/views/account/profile.blade.php
@@ -65,7 +65,7 @@
{{ trans('general.skin') }}
</label>
<div class="col-md-8">
- <x-input.user-skin name="skin" :selected="old('skin', $user->skin)" />
+ <x-input.user-skin name="skin" :selected="old('skin', $user->skin)" :include-blank-option="true"/>
{!! $errors->first('skin', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
diff --git a/resources/views/blade/input/user-skin.blade.php b/resources/views/blade/input/user-skin.blade.php
index 5c2ccab19c..dd6135f0fd 100644
--- a/resources/views/blade/input/user-skin.blade.php
+++ b/resources/views/blade/input/user-skin.blade.php
@@ -1,11 +1,12 @@
@props([
'name',
'selected',
+ // Whether to include a blank option with the label "Site Default"
+ 'includeBlankOption' => false,
])
@php
$formats = [
- '' => 'Site Default',
'blue' => trans('general.skins.default_blue'),
'blue-dark' => trans('general.skins.blue_dark'),
'green' => trans('general.skins.green'),
@@ -22,6 +23,10 @@
'yellow-dark' => trans('general.skins.yellow_dark'),
'contrast' => trans('general.skins.high_contrast'),
];
+
+ if ($includeBlankOption) {
+ $formats = ['' => 'Site Default'] + $formats;
+ }
@endphp
<select
diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php
index 63d174f2c4..28a6967acd 100644
--- a/resources/views/settings/branding.blade.php
+++ b/resources/views/settings/branding.blade.php
@@ -252,7 +252,7 @@
<label for="skin">{{ trans('general.skin') }}</label>
</div>
<div class="col-md-9">
- {!! Form::skin('skin', old('skin', $setting->skin), 'select2') !!}
+ <x-input.user-skin name="skin" :selected="old('skin', $setting->skin)" />
{!! $errors->first('skin', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>