MOON
Server: Apache
System: Linux server10.mejorconweb.com 3.10.0-962.3.2.lve1.5.27.el7.x86_64 #1 SMP Sat Nov 30 02:18:52 EST 2019 x86_64
User: ser65kty (1085)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
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