@extends('layouts.default')

{{-- Web site Title --}}
@section('title')
@parent
Добавление сайта для проекта {{ $project->name }}
@stop

{{-- Content --}}
@section('content')
<div class="row">
	<div class="col-md-6 col-md-offset-3">
		{{ Form::open(array('action' => array('SitesController@store', $project->id))) }}
		<h2>Добавление сайта для проекта {{ $project->name }}</h2>

		<div class="form-group {{ ($errors->has('url')) ? 'has-error' : '' }}">
			{{ Form::label( 'url', 'Адрес сайта:', array('class' => 'control-label') ) }}
			{{ Form::text('url', null, array('class' => 'form-control', 'placeholder' => 'Адрес сайта', 'autofocus')) }}
			{{ ($errors->has('url') ? $errors->first('url') : '') }}
		</div>

		{{ Form::submit('Добавить сайт', array('class' => 'btn btn-primary')) }}
		{{ Form::button('Отмена', array('class' => 'btn btn-default', 'onclick'=>'location="'.URL::to('projects').'/'.$project->id.'/sites"')) }}

    {{ Form::close() }}
	</div>
</div>

@stop