@extends ('layouts.admin')
@section ('contenido')
    <div class="row">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <h3>Editar Licencia: {{ $cLicencia->id}}</h3>
            
            @if (count($errors)>0)
            <div class="alert alert-danger">
                <ul>
                @foreach ($errors->all() as $error)
                    <li>{{$error}}</li>
                @endforeach
                </ul>
            </div>
            @endif

            <form action="{{ route('clicencia.update', $cLicencia->id) }}" method="POST" autocomplete="off">
            
            @csrf
            @method('PATCH')

            <div class="form-group">
                <label for="clave">CLAVE</label>
                <input readonly type="text" name="clave" class="form-control" value="{{ old('clave', $cLicencia->clave) }}" placeholder="CLAVE...">
            </div>

            <div class="form-group">
                <label for="ruc">RUC</label>
                <input type="text" name="ruc" class="form-control" value="{{ old('ruc', $cLicencia->ruc) }}" placeholder="RUC...">
            </div>

            <div class="form-group">
                <label for="RAZON">RAZON</label>
                <input type="text" name="RAZON" class="form-control" value="{{ old('RAZON', $cLicencia->RAZON) }}" placeholder="RAZON...">
            </div>

            <div class="form-group">
                <label for="mac">MAC</label>
                <input type="text" name="mac" class="form-control" value="{{ old('mac', $cLicencia->mac) }}" placeholder="MAC...">
            </div>

            <div class="form-group">
                <label for="fechai">FECHA DE INICIO</label>
                <input type="date" name="fechai" class="form-control" value="{{ old('fechai', $cLicencia->fechai) }}" placeholder="FECHA DE INICIO...">
            </div>

            <div class="form-group">
                <label for="fechaf">FECHA DE FIN</label>
                <input type="date" name="fechaf" class="form-control" value="{{ old('fechaf', $cLicencia->fechaf) }}" placeholder="FECHA DE FIN...">
            </div>
                                              
            <div class="form-group">
                <button class="btn btn-primary" type="submit">Guardar</button>
                <button class="btn btn-danger" type="reset">Cancelar</button>
            </div>

            </form> </div>
    </div>
@push ('scripts')
<script>
$('#liLicencias').addClass("treeview active");
$('#liClicencia').addClass("active");
</script>
@endpush
@endsection