@extends('layouts.app') @section('content')
Choreographies
@if(count($dance->participants) < $dance->category->min_dancers)
Please note that you need to add at least {{$dance->category->min_dancers}} participants (currently added: {{count($dance->participants)}}, {{$dance->category->min_dancers-count($dance->participants)}} left)
@endif {!! Form::open(['url' => 'dance/addparticipant/'.$dance->id, 'method'=>'post', 'class'=>'form-horizontal']) !!}

Dancers for choreography "{{$dance->name}}"

{!! Form::select('dancer_id', Auth::guard('groups')->user()->getDancersSelectArray(), null, ['class'=>'form-control', 'autofocus' => 'autofocus', 'data-max'=> '0']) !!} @if ($errors->has('dancer_id')) {{ $errors->first('dancer_id') }} @endif @if ($errors->has('message')) {{ $errors->first('message') }} @endif
{!! Form::close() !!} @if(count($dance->participants) < 1) No dancers. @else @foreach($dance->participants as $dancer)
{{$dancer->first_name}} {{$dancer->last_name}}
@endforeach @if(count($dance->participants) >= $dance->category->min_dancers) {!! Form::open(['url' => Request::url(),'files' => true, 'method'=>'post', 'class'=>'form-horizontal']) !!}
{!! Form::select('age_groups_id', $dance->getAgeGroupsSelect(), null, ['class'=>'form-control', 'id'=>'age_groups_id', 'data-recommended'=> $dance->getRecommendedAgeGroup()->id]) !!} @if ($errors->has('age_groups_id')) {{ $errors->first('age_groups_id') }} @endif
{!! Form::select('begin', ['p'=>'On stage','m'=>'Off stage'], null, ['class'=>'form-control', 'autofocus' => 'autofocus']) !!} @if ($errors->has('begin')) {{ $errors->first('begin') }} @endif
@if(strlen($dance->mp3) > 0)

{{$dance->mp3}} Download

@endif
@if(strlen($dance->mp3) > 0) @else @endif
{!! Form::file('mp3file', ['class'=>'form-control-static']) !!} @if ($errors->has('mp3file')) {{ $errors->first('mp3file') }} @endif MP3 file, 15MB maximum
{!! Form::close() !!} @endif {{--@if(count($errors) > 0) @foreach($errors->all() as $e) {{$e}}
@endforeach @endif--}} @endif
@stop