mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Moved gthe settings for remote loading to the branding section
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
36ae162626
commit
3f20e29901
|
@ -348,7 +348,6 @@ class SettingsController extends Controller
|
|||
}
|
||||
|
||||
$setting->default_eula_text = $request->input('default_eula_text');
|
||||
$setting->load_remote = $request->input('load_remote', 0);
|
||||
$setting->thumbnail_max_h = $request->input('thumbnail_max_h');
|
||||
$setting->privacy_policy_link = $request->input('privacy_policy_link');
|
||||
$setting->depreciation_method = $request->input('depreciation_method');
|
||||
|
@ -411,6 +410,7 @@ class SettingsController extends Controller
|
|||
$setting->allow_user_skin = $request->input('allow_user_skin', '0');
|
||||
$setting->show_url_in_emails = $request->input('show_url_in_emails', '0');
|
||||
$setting->logo_print_assets = $request->input('logo_print_assets', '0');
|
||||
$setting->load_remote = $request->input('load_remote', 0);
|
||||
|
||||
// Only allow the site name, images, and CSS to be changed if lock_passwords is false
|
||||
// Because public demos make people act like dicks
|
||||
|
|
|
@ -445,6 +445,10 @@ class UserPresenter extends Presenter
|
|||
return Storage::disk('public')->url('avatars/'.e($this->avatar));
|
||||
}
|
||||
|
||||
// If there is a default avatar
|
||||
if (Setting::getSettings()->default_avatar!= '') {
|
||||
return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar));
|
||||
}
|
||||
|
||||
// Fall back to Gravatar if the settings allow loading remote scripts
|
||||
if (Setting::getSettings()->load_remote == '1') {
|
||||
|
@ -460,10 +464,6 @@ class UserPresenter extends Presenter
|
|||
}
|
||||
}
|
||||
|
||||
// If there is a default avatar
|
||||
if (Setting::getSettings()->default_avatar!= '') {
|
||||
return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -119,6 +119,25 @@
|
|||
"helpBlock" => trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]),
|
||||
])
|
||||
|
||||
<!-- Load gravatar -->
|
||||
<div class="form-group {{ $errors->has('load_remote') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.load_remote') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('load_remote', '1', old('load_remote', $setting->load_remote)) }}
|
||||
{{ trans('general.yes') }}
|
||||
{!! $errors->first('load_remote', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</label>
|
||||
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.load_remote_help_text') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Include logo in print assets -->
|
||||
<div class="form-group">
|
||||
|
|
|
@ -144,24 +144,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Load gravatar -->
|
||||
<div class="form-group {{ $errors->has('load_remote') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('admin/settings/general.load_remote') }}</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('load_remote', '1', old('load_remote', $setting->load_remote)) }}
|
||||
{{ trans('general.yes') }}
|
||||
{!! $errors->first('load_remote', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</label>
|
||||
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.load_remote_help_text') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- unique serial -->
|
||||
<div class="form-group">
|
||||
|
|
Loading…
Reference in a new issue