mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Added login note to settings
This commit is contained in:
parent
c2e8803d1e
commit
9894edb008
|
@ -418,6 +418,7 @@ class SettingsController extends Controller
|
|||
$setting->date_display_format = $request->input('date_display_format');
|
||||
$setting->time_display_format = $request->input('time_display_format');
|
||||
$setting->brand = $request->input('brand', '1');
|
||||
$setting->login_note = $request->input('login_note');
|
||||
|
||||
|
||||
if ($request->input('clear_logo')=='1') {
|
||||
|
|
32
database/migrations/2017_07_07_191533_add_login_text.php
Normal file
32
database/migrations/2017_07_07_191533_add_login_text.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLoginText extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->text('login_note')->nullable()->default(null);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('login_note');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -63,6 +63,8 @@ return array(
|
|||
'ldap_email' => 'LDAP Email',
|
||||
'load_remote_text' => 'Remote Scripts',
|
||||
'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world.',
|
||||
'login_note' => 'Login Note',
|
||||
'login_note_help' => 'Optionally include a few sentences on your login screen, for example to assist people who have found a lost or stolen device. This field accepts <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>',
|
||||
'logo' => 'Logo',
|
||||
'full_multiple_companies_support_help_text' => 'Restricting users (including admins) assigned to companies to their company\'s assets.',
|
||||
'full_multiple_companies_support_text' => 'Full Multiple Companies Support',
|
||||
|
|
|
@ -21,6 +21,13 @@
|
|||
<div class="login-box-body">
|
||||
<div class="row">
|
||||
|
||||
@if ($snipeSettings->login_note)
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
{!! Parsedown::instance()->text(e($snipeSettings->login_note)) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Notifications -->
|
||||
@include('notifications')
|
||||
|
|
|
@ -312,6 +312,29 @@
|
|||
{!! $errors->first('per_page', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- login text -->
|
||||
<div class="form-group {{ $errors->has('custom_css') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('login_note', trans('admin/settings/general.login_note')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
|
||||
<textarea class="form-control" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ Input::old('login_note', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('custom_css', '<span class="alert-msg">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
|
||||
@else
|
||||
<textarea class="form-control" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ Input::old('login_note', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('login_note', '<span class="alert-msg">:message</span>') !!}
|
||||
@endif
|
||||
<p class="help-block">{!! trans('admin/settings/general.login_note_help') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div> <!-- .box-body-->
|
||||
</div> <!--/.collapseOne-->
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue