@extends("theme.$theme.layout")
@section('titulo')
CLINICA VETERINARIA
@endsection

@section("styles")
<link href="{{asset("assets/js/bootstrap-fileinput/css/fileinput.min.css")}}" rel="stylesheet" type="text/css"/>
@endsection

@section("scriptsPlugins")
<script src="{{asset("assets/js/bootstrap-fileinput/js/fileinput.min.js")}}" type="text/javascript"></script>
<script src="{{asset("assets/js/bootstrap-fileinput/js/locales/es.js")}}" type="text/javascript"></script>
<script src="{{asset("assets/js/bootstrap-fileinput/themes/fas/theme.min.js")}}" type="text/javascript"></script>
@endsection

@section('contenido')
<div class="row">
    <div class="col-lg-12">
        @include('includes.mensaje')
        @include('includes.form-error')
        <div class="box box-danger">
            <div class="box-header with-border">
                <h3 class="box-title">Editar {{$data->raza}}</h3>
                <a href="{{route('raza')}}" class="btn btn-info btn-sm pull-right">Volver al listado</a>
            </div>
            <form action="{{route('actualizar_raza', $data->id)}}" id="form-general" class="form-horizontal" method="POST" autocomplete="off" enctype="multipart/form-data">
                @csrf @method("put")
                <div class="box-body">
                    
<div class="form-group">
    <label for="raza_mascota" class="col-lg-3 control-label requerido"> Raza de mascota </label>
    <div class="col-lg-8">
    <input type="text" name="raza_mascota" id="raza_mascota" class="form-control"  value="{{old('raza_mascota', $data->raza_mascota ?? '')}}" placeholder="Raza de mascota" required/>
    </div>
</div>

 <div class="form-group">
                        <label for="id_tipomascota" class="col-lg-3 control-label requerido"> Tipo Mascota </label>
                        <div class="col-lg-8">   
                            <select name="id_tipomascota" class="form-control">
                  @foreach ($tipomascota as $tipomascota)
                  <option value="{{ $tipomascota->id }}" 
                    @if ($tipomascota->id == $data->id_tipomascota)
                    selected="selected"
                    @endif>
                    {{ $tipomascota->tipo_mascota }}</option>
                    @endforeach               
                </select>            
                </div>
</div> 


                    
                </div>
                <div class="box-footer">
                    <div class="col-lg-3"></div>
                    <div class="col-lg-6">
                        @include('includes.boton-form-editar')
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection