diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 807f5466f8..a5f50e5bd8 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -375,6 +375,8 @@ class SettingsController extends Controller $setting->brand = $request->input('brand', '1'); $setting->header_color = $request->input('header_color'); + $setting->support_footer = $request->input('support_footer'); + $setting->footer_text = $request->input('footer_text'); $setting->show_url_in_emails = $request->input('show_url_in_emails', '0'); diff --git a/database/migrations/2018_01_24_062633_add_footer_settings_to_settings.php b/database/migrations/2018_01_24_062633_add_footer_settings_to_settings.php new file mode 100644 index 0000000000..5b9de3ce59 --- /dev/null +++ b/database/migrations/2018_01_24_062633_add_footer_settings_to_settings.php @@ -0,0 +1,34 @@ +char('support_footer', 5)->nullable()->default('on'); + $table->text('footer_text')->nullable()->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('settings', function (Blueprint $table) { + $table->text('support_footer'); + $table->text('footer_text'); + }); + } +} diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php index 76159635b1..012cedb08a 100644 --- a/resources/lang/en/admin/settings/general.php +++ b/resources/lang/en/admin/settings/general.php @@ -40,6 +40,8 @@ return array( 'alt_barcode_type' => '1D barcode type', 'eula_settings' => 'EULA Settings', 'eula_markdown' => 'This EULA allows Github flavored markdown.', + 'footer_text' => 'Additional Footer Text ', + 'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using Github flavored markdown. Line breaks, headers, images, etc may result in unpredictable results.', 'general_settings' => 'General Settings', 'generate_backup' => 'Generate Backup', 'header_color' => 'Header Color', @@ -71,6 +73,7 @@ return array( 'ldap_active_flag' => 'LDAP Active Flag', 'ldap_emp_num' => 'LDAP Employee Number', 'ldap_email' => 'LDAP Email', + 'license' => 'Software License', 'load_remote_text' => 'Remote Scripts', 'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world.', 'login_note' => 'Login Note', @@ -103,6 +106,8 @@ return array( 'slack_integration' => 'Slack Settings', 'slack_integration_help' => 'Slack integration is optional, however the endpoint and channel are required if you wish to use it. To configure Slack integration, you must first create an incoming webhook on your Slack account.', 'snipe_version' => 'Snipe-IT version', + 'support_footer' => 'Support Footer Links ', + 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual', 'system' => 'System Information', 'update' => 'Update Settings', 'value' => 'Value', diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index ab99bba216..ca83c89232 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -726,13 +726,25 @@ diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php index ec0ed0b531..1f724f9ebc 100644 --- a/resources/views/settings/branding.blade.php +++ b/resources/views/settings/branding.blade.php @@ -139,6 +139,42 @@ + +
+
+ {{ Form::label('support_footer', trans('admin/settings/general.support_footer')) }} +
+
+ @if (config('app.lock_passwords')===true) + {!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Input::old('support_footer', $setting->support_footer), ['class' => 'form-control disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!} + @else + {!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Input::old('support_footer', $setting->support_footer), array('class' => 'form-control', 'style'=>'width: 150px ;')) !!} + @endif + +

{{ trans('admin/settings/general.support_footer_help') }}

+ {!! $errors->first('support_footer', ':message') !!} +
+
+ + +
+
+ {{ Form::label('custom_css', trans('admin/settings/general.footer_text')) }} +
+
+ @if (config('app.lock_passwords')===true) + {{ Form::textarea('footer_text', Input::old('footer_text', $setting->footer_text), array('class' => 'form-control', 'rows' => '4', 'placeholder' => 'Optional footer text','disabled'=>'disabled')) }} +

{{ trans('general.lock_passwords') }}

+ @else + {{ Form::textarea('footer_text', Input::old('footer_text', $setting->footer_text), array('class' => 'form-control','rows' => '4','placeholder' => 'Optional footer text')) }} + @endif +

{!! trans('admin/settings/general.footer_text_help') !!}

+ {!! $errors->first('footer_text', ':message') !!} + +
+
+ + diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 103b6751ae..c17f4013b9 100755 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -215,6 +215,12 @@ {{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }}) + + {{ trans('admin/settings/general.license') }} + + AGPL3 + + {{ trans('admin/settings/general.php') }} {{ phpversion() }} @@ -225,6 +231,10 @@ {{ $snipeSettings->lar_ver() }} + + + +