@extends('layouts.default')

{{-- Web site Title --}}
@section('title')
@parent
Регистрация
@stop

@section('js')
<script src="{{ asset('js/jquery.maskedinput.min.js') }}"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	$("#phone").mask("+7 (999) 999-99-99")
});
</script>
@stop

{{-- Content --}}
@section('content')
<div class="row">
	<div class="col-md-4 col-md-offset-4">
		{{ Form::open(array('action' => 'UserController@store')) }}

		<h2>Регистрация</h2>

		<div class="form-group {{ ($errors->has('first_name')) ? 'has-error' : '' }}">
			{{ Form::label( 'first_name', 'Имя:', array('class' => 'control-label') ) }}
			{{ Form::text('first_name', null, array('class' => 'form-control', 'placeholder' => 'Имя')) }}
			{{ ($errors->has('first_name') ?  '<p class="help-block">'.$errors->first('first_name').'</p>' : '') }}
		</div>

		<div class="form-group {{ ($errors->has('last_name')) ? 'has-error' : '' }}">
			{{ Form::label( 'last_name', 'Фамилия:', array('class' => 'control-label') ) }}
			{{ Form::text('last_name', null, array('class' => 'form-control', 'placeholder' => 'Фамилия')) }}
			{{ ($errors->has('last_name') ?  '<p class="help-block">'.$errors->first('last_name').'</p>' : '') }}
		</div>

		<div class="form-group {{ ($errors->has('phone')) ? 'has-error' : '' }}">
			{{ Form::label( 'phone', 'Телефон:', array('class' => 'control-label') ) }}
			{{ Form::text('phone', null, array('class' => 'form-control', 'placeholder' => 'Телефон', 'id' => 'phone')) }}
			{{ ($errors->has('phone') ?  '<p class="help-block">'.$errors->first('phone').'</p>' : '') }}
		</div>

		<div class="form-group {{ ($errors->has('email')) ? 'has-error' : '' }}">
			{{ Form::label( 'email', 'E-mail:', array('class' => 'control-label') ) }}
			{{ Form::text('email', null, array('class' => 'form-control', 'placeholder' => 'E-mail')) }}
			{{ ($errors->has('email') ?  '<p class="help-block">'.$errors->first('email').'</p>' : '') }}
		</div>

		<div class="form-group {{ ($errors->has('password')) ? 'has-error' : '' }}">
			{{ Form::label( 'password', 'Пароль:', array('class' => 'control-label') ) }}
			{{ Form::password('password', array('class' => 'form-control', 'placeholder' => 'Пароль')) }}
			{{ ($errors->has('password') ?  '<p class="help-block">'.$errors->first('password').'</p>' : '') }}
		</div>

		<div class="form-group {{ ($errors->has('password_confirmation')) ? 'has-error' : '' }}">
			{{ Form::label( 'password_confirmation', 'Подтверждение пароля:', array('class' => 'control-label') ) }}
			{{ Form::password('password_confirmation', array('class' => 'form-control', 'placeholder' => 'Подтвержденте пароля')) }}
			{{ ($errors->has('password_confirmation') ?  '<p class="help-block">'.$errors->first('password_confirmation').'</p>' : '') }}
		</div>

		{{ Form::submit('Зарегистрировать', array('class' => 'btn btn-primary')) }}

		{{ Form::close() }}
	</div>
</div>

@stop