<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"></h3>
    </div>
    <div class="box-body">
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="name">Nome:</label>
                    <input type="text" name="name" class="form-control" value="{{ old('name', $user->name ?? '') }}">
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="email">Email:</label>
                    <input type="text" name="email" class="form-control" value="{{ old('email', $user->email ?? '') }}">
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="password">Password:</label> (lasciare vuoto per non cambiarla)
                    <input type="text" name="password" value="" class="form-control">
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="level">Livello:</label>
                    <select name="level" class="form-control">
                        <option value="0" {{ old('level', $user->level ?? '') == '0' ? 'selected' : '' }}>Direttore</option>
                        <option value="1" {{ old('level', $user->level ?? '') == '1' ? 'selected' : '' }}>Autore</option>
                        <option value="1" {{ old('level', $user->level ?? '') == '2' ? 'selected' : '' }}>Amministratore</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="disabled">Disabilitato:</label><br>
                    <input type="checkbox" name="disabled" value="on" {{ old('disabled', $user->disabled ?? '') == 'on' ? 'checked' : '' }}>
                </div>
            </div>
        </div>
    </div>
    <div class="box-footer">
        <button type="submit" class="btn btn-success">{{ $submit_text }}</button>
        <a href="{{ route('users.index') }}" class="btn btn-info">Annulla</a>
    </div>
</div>
