mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 00:54:07 -08:00
Merge pull request #12810 from snipe/fixes/maintain_checkbox_state_on_user
Maintain activated state on editing a user
This commit is contained in:
commit
79a8effa25
|
@ -74,7 +74,6 @@ class UsersController extends Controller
|
||||||
$permissions = $this->filterDisplayable($permissions);
|
$permissions = $this->filterDisplayable($permissions);
|
||||||
|
|
||||||
$user = new User;
|
$user = new User;
|
||||||
$user->activated = 1;
|
|
||||||
|
|
||||||
return view('users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
|
return view('users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
|
||||||
->with('user', $user);
|
->with('user', $user);
|
||||||
|
|
|
@ -227,7 +227,7 @@
|
||||||
@else
|
@else
|
||||||
<!-- everything is normal - as you were -->
|
<!-- everything is normal - as you were -->
|
||||||
<label class="form-control">
|
<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') }}
|
{{ trans('admin/users/general.activated_help_text') }}
|
||||||
</label>
|
</label>
|
||||||
@endif
|
@endif
|
||||||
|
|
Loading…
Reference in a new issue