Skip to content

Commit

Permalink
Re-added UI for load_remote
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed Feb 5, 2024
1 parent 1a48043 commit 32c360f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ public function postSettings(Request $request)
}

$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');

Expand Down
6 changes: 3 additions & 3 deletions resources/lang/en-US/admin/settings/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
'footer_text' => 'Additional Footer Text ',
'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>. Line breaks, headers, images, etc may result in unpredictable results.',
'general_settings' => 'General Settings',
'general_settings_keywords' => 'company support, signature, acceptance, email format, username format, images, per page, thumbnail, eula, tos, dashboard, privacy',
'general_settings_keywords' => 'company support, signature, acceptance, email format, username format, images, per page, thumbnail, eula, gravatar, tos, dashboard, privacy',
'general_settings_help' => 'Default EULA and more',
'generate_backup' => 'Generate Backup',
'google_workspaces' => 'Google Workspaces',
Expand Down Expand Up @@ -122,8 +122,8 @@
'ldap_test' => 'Test LDAP',
'ldap_test_sync' => 'Test LDAP Synchronization',
'license' => 'Software License',
'load_remote_text' => 'Remote Scripts',
'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world.',
'load_remote' => 'Load Remote Scripts',
'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world. This will disable gravatar loading if unchecked.',
'login' => 'Login Attempts',
'login_attempt' => 'Login Attempt',
'login_ip' => 'IP Address',
Expand Down
22 changes: 21 additions & 1 deletion resources/views/settings/general.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,25 @@
</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">
<div class="col-md-3">
Expand All @@ -137,8 +156,9 @@
<label class="form-control">
{{ Form::checkbox('unique_serial', '1', Request::old('unique_serial', $setting->unique_serial),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
{!! $errors->first('unique_serial', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</label>
{!! $errors->first('unique_serial', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}

<p class="help-block">
{{ trans('admin/settings/general.unique_serial_help_text') }}
</p>
Expand Down

0 comments on commit 32c360f

Please sign in to comment.