Fixes #6252 - activated flag not checked when editing active user

This commit is contained in:
snipe 2018-09-28 11:18:33 -07:00
parent 75032def9e
commit ff824ec4db

View file

@ -330,19 +330,21 @@
<div class="col-md-9">
@if (config('app.lock_passwords'))
<div class="icheckbox disabled" style="padding-left: 10px;">
{{ Form::checkbox('activated', '1', old('activated', $user->activated),['class' => 'minimal', 'disabled'=>'disabled']) }}
<input type="checkbox" value="1" name="activated" class="minimal disabled" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} disabled="disabled">
{{ trans('admin/users/general.activated_help_text') }}
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
kjasdhv
</div>
@elseif ($user->id === Auth::user()->id)
<div class="icheckbox disabled" style="padding-left: 10px;">
{{ Form::checkbox('activated', '1', old('activated', $user->activated),['class' => 'minimal', 'disabled'=>'disabled']) }}
<input type="checkbox" value="1" name="activated" class="minimal disabled" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} disabled="disabled">
{{ trans('admin/users/general.activated_help_text') }}
<p class="help-block">{{ trans('admin/users/general.activated_disabled_help_text') }}</p>
</div>
@else
<div style="padding-left: 10px;">
{{ Form::checkbox('activated', '1', old('activated', $user->activated),['class' => 'minimal' ]) }}
<input type="checkbox" value="1" name="activated" class="minimal" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }}>
{{ trans('admin/users/general.activated_help_text') }}
</div>
@endif