File: /home/ser65kty/cardedeu.serversmw.com/resources/views/inscripciotaller.blade.php
@extends('layouts.app')
@section('metadata')
<title>Formació i ocupació - Ajuntament de Cardedeu</title>
@endsection
@section('content')
@if ($user->checkinscripciocurstaller($tallerseleccionat->id))
<div class="col-lg-6 col-sm-8 col-xs-12 container bg-publicaroferta">
{{ html()->form('POST')->route('inscripcionstallers.storefronttaller')->open() }}
<div class="form-group">
{{ html()->label('Vull fer un taller (MÀXIM 4 OPCIONS)') }}<br>
@foreach ($tallers as $taller)
<input type="checkbox" class="single-checkbox" name="vulltallers[]" value="{{$taller->id}}" @if($taller->id == $tallerseleccionat->id) {{"checked"}} @endif/>
<label for="vulltallers">{{$taller->name}}</label><br>
@endforeach
</div>
<br>
<div class="form-group">
{{ html()->submit("Inscriure'm als tallers")->class(['form-control']) }}
</div>
{{ html()->form()->close() }}
</div>
@else
<div class="col-lg-6 col-sm-8 col-xs-12 container bg-publicaroferta">
<h5>Ja existeix una inscripció al taller {{$tallerseleccionat->name}} per a aquest usuari</h5>
</div>
@endif
<div class="clearfix"></div>
@endsection
@section('bottomscripts')
<script>
var limit = 4;
$('input.single-checkbox').on('change', function(evt) {
if($(this).siblings(':checked').length >= limit) {
this.checked = false;
}
});
</script>
@endsection