@extends('layouts.default')

{{-- Web site Title --}}
@section('title')
@parent
Редактировать информацию о сайте
@stop

{{-- Content --}}
@section('content')
<div class="row">
	<div class="col-md-6 col-md-offset-3">
		{{ Form::open(array('action' => array('SitesController@update', $project->id, $site->id), 'method' => 'put')) }}
		<h2>Редактировать информацию о сайте</h2>

		<div class="form-group {{ ($errors->has('url')) ? 'has-error' : '' }}">
			{{ Form::label( 'url', 'Адрес сайта:', array('class' => 'control-label') ) }}
			{{ Form::text('url', $site->url, array('class' => 'form-control', 'placeholder' => 'Адрес сайта', 'autofocus')) }}
			{{ ($errors->has('url') ? $errors->first('url') : '') }}
		</div>

		{{ Form::hidden('id', $site->id) }}
		{{ 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