@extends('layouts.index')
@section('contenido')
<div class="content">
	<div class="card">
		<div class="card-header header-elements-inline">
			<h5 class="card-title">EDITAR GIRA</h5>
			<div class="header-elements">
				<div class="list-icons">
				    <a class="list-icons-item" data-action="collapse"></a>
				</div>
			</div>
		</div>

		<div class="card-body">
			<form action="{{ route('gira.actualizar',$gira->id) }}" method="POST">
                @csrf
                <fieldset>
                    <div class="collapse show">
                        <div class="form-group">
                            <label>Seleccione la región</label>
                            <select class="form-control" name="id_region">
                                @foreach ($regiones as $region)
                                    <option {{ $gira->id_region == $region['id'] ? "selected" : "" }} value="{{$region['id']}}">{{$region['descripcion_region']}}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Ingrese el nombre de la gira*</label>
                            <input type="text" class="form-control" value="{{$gira->descripcion_gira}}" name="descripcion" placeholder="" required>
                        </div>
                    </div>
                </fieldset>

				<div class="text-right">
					<button type="submit" class="btn btn-primary">Actualizar gira<i class="icon-floppy-disk ml-2"></i></button>
				</div>
            </form>

		</div>
	</div>
</div>

@endsection

@section('javascript')
<script>
    jQuery( document ).ready(function() {

    });
</script>
@endsection
