Maintain activated state on editing a user

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-04-09 14:06:29 -07:00
parent b886f57d92
commit 70ce0d9ee6
2 changed files with 1 additions and 2 deletions

View file

@ -74,7 +74,6 @@ class UsersController extends Controller
$permissions = $this->filterDisplayable($permissions);
$user = new User;
$user->activated = 1;
return view('users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
->with('user', $user);

View file

@ -227,7 +227,7 @@
@else
<!-- everything is normal - as you were -->
<label class="form-control">
{{ Form::checkbox('activated', '1', old('activated'), ['id' => 'activated', 'checked'=> 'checked', 'aria-label'=>'update_real_loc']) }}
<input type="checkbox" value="1" name="activated"{{ ((old('activated') == '1') || ($user->activated) == '1') ? ' checked="checked"' : '' }} aria-label="activated" id="activated">
{{ trans('admin/users/general.activated_help_text') }}
</label>
@endif