export calendar - modifica impostazioni
This commit is contained in:
@@ -44,9 +44,10 @@
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="is_admin" value="0">
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="isAdmin" name="is_admin" value="1">
|
||||
<input type="checkbox" class="custom-control-input" id="isAdmin" name="is_admin" value="1" {{ old('is_admin') === '1' ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="isAdmin">Superadmin (bypass ACL)</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,12 +64,12 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(['individui', 'gruppi', 'eventi', 'documenti', 'mailing', 'viste'] as $module)
|
||||
@foreach(\App\Models\User::MODULES as $module)
|
||||
<tr>
|
||||
<td><strong>{{ ucfirst($module) }}</strong></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="0" {{ old('permissions.' . $module, '1') == '0' ? 'checked' : '' }}></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="1" {{ old('permissions.' . $module, '1') == '1' ? 'checked' : '' }}></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="2" {{ old('permissions.' . $module, '1') == '2' ? 'checked' : '' }}></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="0" {{ old('permissions.' . $module, $module === 'settings' ? '0' : '1') == '0' ? 'checked' : '' }}></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="1" {{ old('permissions.' . $module, $module === 'settings' ? '0' : '1') == '1' ? 'checked' : '' }}></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="2" {{ old('permissions.' . $module, $module === 'settings' ? '0' : '1') == '2' ? 'checked' : '' }}></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<h3 class="card-title">Dati Utente</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url('/admin/utenti/' . $user->id) }}">
|
||||
<form method="POST" action="/admin/utenti/{{ $user->id }}">
|
||||
@csrf @method('PUT')
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
@@ -38,9 +38,9 @@
|
||||
<div class="form-group">
|
||||
<label>Stato</label>
|
||||
<select name="status" class="form-control" required>
|
||||
<option value="active" {{ $user->status === 'active' ? 'selected' : '' }}>Attivo</option>
|
||||
<option value="suspended" {{ $user->status === 'suspended' ? 'selected' : '' }}>Sospeso</option>
|
||||
<option value="pending" {{ $user->status === 'pending' ? 'selected' : '' }}>In attesa</option>
|
||||
<option value="active" {{ old('status', $user->status) === 'active' ? 'selected' : '' }}>Attivo</option>
|
||||
<option value="suspended" {{ old('status', $user->status) === 'suspended' ? 'selected' : '' }}>Sospeso</option>
|
||||
<option value="pending" {{ old('status', $user->status) === 'pending' ? 'selected' : '' }}>In attesa</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -48,15 +48,16 @@
|
||||
<select name="role_preset_id" class="form-control" id="rolePresetSelect">
|
||||
<option value="">Personalizzato</option>
|
||||
@foreach($rolePresets as $preset)
|
||||
<option value="{{ $preset->id }}" {{ $user->role_preset_id == $preset->id ? 'selected' : '' }}>
|
||||
<option value="{{ $preset->id }}" {{ old('role_preset_id', $user->role_preset_id) == $preset->id ? 'selected' : '' }}>
|
||||
{{ $preset->name }} - {{ $preset->description }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="is_admin" value="0">
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="isAdmin" name="is_admin" value="1" {{ $user->isSuperAdmin() ? 'checked' : '' }}>
|
||||
<input type="checkbox" class="custom-control-input" id="isAdmin" name="is_admin" value="1" {{ old('is_admin', $user->isSuperAdmin() ? '1' : '0') === '1' ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="isAdmin">Superadmin (bypass ACL)</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +74,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(['individui', 'gruppi', 'eventi', 'documenti', 'mailing', 'viste'] as $module)
|
||||
@foreach(\App\Models\User::MODULES as $module)
|
||||
<tr>
|
||||
<td><strong>{{ ucfirst($module) }}</strong></td>
|
||||
<td><input type="radio" name="permissions[{{ $module }}]" value="0" {{ ($user->permissions[$module] ?? 0) == 0 ? 'checked' : '' }}></td>
|
||||
|
||||
Reference in New Issue
Block a user