@extends('layouts.app') @section('content')
Dancers
@if(isset($mode_add) || isset($mode_edit)) @if(isset($mode_edit) && isset($dancer)) {!! Form::model($dancer, ['url' => Request::url(), 'method'=>'post', 'class'=>'form-horizontal']) !!} @else {!! Form::open(['url' => Request::url(), 'method'=>'post', 'class'=>'form-horizontal']) !!} @endif
{!! Form::text('first_name', null, ['class'=>'form-control', 'autofocus' => 'autofocus']) !!} @if ($errors->has('first_name')) {{ $errors->first('first_name') }} @endif
{!! Form::text('last_name', null, ['class'=>'form-control', 'autofocus' => 'autofocus']) !!} @if ($errors->has('last_name')) {{ $errors->first('last_name') }} @endif
{!! Form::select('gender', ['f'=>'Female','m'=>'Male'], null, ['class'=>'form-control', 'autofocus' => 'autofocus']) !!} @if ($errors->has('gender')) {{ $errors->first('gender') }} @endif
@if(isset($mode_edit))
The date of birth cannot be edited. Please delete and re-add the dancers if you wish to do so.
@else
{!! Form::text('date_of_birth', null, ['class'=>'form-control', 'autofocus' => 'autofocus','id'=>'date_of_birth','placeholder'=>'MM/DD/YYYY','data-date-format'=>'mm/dd/yyyy']) !!} @if ($errors->has('date_of_birth')) {{ $errors->first('date_of_birth') }} @endif
Please enter the date of birth EXTREMELY CAREFULLY, as it cannot be edited later.
@endif
@if(isset($mode_add)) I'm done adding participants
@endif
{!! Form::close() !!} @else @if(!Auth::guard('groups')->user()->isLocked()) Add

@endif @endif @if(!isset($mode_edit))
@foreach($dancers as $dancer) @if(!Auth::guard('groups')->user()->isLocked()) @else @endif @endforeach
Name Date of birth
{{$dancer->first_name}} {{$dancer->last_name}} {{$dancer->date_of_birth->toDateString()}}Edit    Delete
@endif
@endsection