Skip to content

A free open source IT asset/license management system

Disable login note editing on demo

snipe30019a144a8f
diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php
index c82b8bf2e2..686c283b1a 100755
--- a/app/Http/Controllers/SettingsController.php
+++ b/app/Http/Controllers/SettingsController.php
@@ -338,7 +338,10 @@ class SettingsController extends Controller
$setting->email_format = $request->input('email_format');
$setting->username_format = $request->input('username_format');
$setting->require_accept_signature = $request->input('require_accept_signature');
- $setting->login_note = $request->input('login_note');
+ if (config('app.lock_passwords')) {
+ $setting->login_note = $request->input('login_note');
+ }
+
$setting->default_eula_text = $request->input('default_eula_text');
$setting->thumbnail_max_h = $request->input('thumbnail_max_h');
diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php
index 01eeab2d9a..01a68340ff 100644
--- a/resources/views/settings/general.blade.php
+++ b/resources/views/settings/general.blade.php
@@ -165,9 +165,9 @@
{{ Form::label('login_note', trans('admin/settings/general.login_note')) }}
</div>
<div class="col-md-9">
- @if (config('app.lock_passwords')===true)
+ @if (config('app.lock_passwords'))
- <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>
+ <textarea class="form-control disabled" 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" readonly>{{ Input::old('login_note', $setting->login_note) }}</textarea>
{!! $errors->first('login_note', '<span class="alert-msg">:message</span>') !!}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
@else