Fixes #3652 - missing groups UI element in user edit view

This commit is contained in:
snipe 2017-06-09 12:19:12 -07:00
parent e9dd119b9c
commit 0bc709206f

View file

@ -369,6 +369,47 @@
</div> </div>
</div> </div>
<!-- Groups -->
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="groups"> {{ trans('general.groups') }}</label>
<div class="col-md-5">
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
@if (count($userGroups->keys()) > 0)
<ul>
@foreach ($groups as $id => $group)
{!! ($userGroups->keys()->contains($id) ? '<li>'.e($group).'</li>' : '') !!}
@endforeach
</ul>
@endif
<span class="help-block">Only superadmins may edit group memberships.</p>
@else
<div class="controls">
<select
name="groups[]"
id="groups[]"
multiple="multiple"
class="form-control">
@foreach ($groups as $id => $group)
<option value="{{ $id }}"
{{ ($userGroups->keys()->contains($id) ? ' selected="selected"' : '') }}>
{{ $group }}
</option>
@endforeach
</select>
<span class="help-block">
{{ trans('admin/users/table.groupnotes') }}
</span>
</div>
@endif
</div>
</div>
<!-- Email user --> <!-- Email user -->
@if (!$user->id) @if (!$user->id)