{extends file="layout.tpl"}

{* Breadcrumb *}
{block name='no-return-functions' append}
    {$breadcrumbs = [['title' => {intl l="Contact us"}, 'url'=>{url path="/contact"}]]}
{/block}

{block name="main-content"}
    <div class="main">
        <article class="col-main" role="main" aria-labelledby="main-label">
        <h1 id="main-label" class="page-header">{intl l="Contact us"}</h1>

        <div id="google-map">
            <iframe class="map" width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=london&aq=&sll=52.8382,-2.327815&sspn=9.377429,22.126465&ie=UTF8&hq=&hnear=London,+United+Kingdom&t=m&z=10&ll=51.511214,-0.119824&output=embed&iwloc=near"></iframe>
        </div><!-- / #google-map-->

        {block name="contact-form"}
            {form name="thelia.front.contact"}
            <form id="form-contact" action="{url path="/contact"}" method="post" role="form">
                {form_hidden_fields form=$form}
                <fieldset id="contact-info" class="panel">
                    <div class="panel-heading">
                        {intl l="Send us a message"}
                    </div>
                    <div class="panel-body">
                        <div class="row">
                        {form_field form=$form field="name"}
                            <div class="form-group group-name col-sm-6 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
                                <label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
                                <div class="control-input">
                                    <input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="What's your name?"}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
                                    {if $error }
                                        <span class="help-block"><i class="icon-remove"></i> {$message}</span>
                                        {assign var="error_focus" value="true"}
                                    {elseif $value != "" && !$error}
                                        <span class="help-block"><i class="icon-ok"></i></span>
                                    {/if}
                                </div>
                            </div><!--/.form-group-->
                        {/form_field}
                        {form_field form=$form field="email"}
                            <div class="form-group group-email col-sm-6 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
                                <label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
                                <div class="control-input">
                                    <input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="So I can get back to you."}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
                                    {if $error }
                                        <span class="help-block"><i class="icon-remove"></i> {$message}</span>
                                        {assign var="error_focus" value="true"}
                                    {elseif $value != "" && !$error}
                                        <span class="help-block"><i class="icon-ok"></i></span>
                                    {/if}
                                </div>
                            </div><!--/.form-group-->
                        {/form_field}
                        </div>
                        {form_field form=$form field="subject"}
                            <div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
                                <label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
                                <div class="control-input">
                                    <input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="The subject of your message."}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
                                    {if $error }
                                        <span class="help-block"><i class="icon-remove"></i> {$message}</span>
                                        {assign var="error_focus" value="true"}
                                    {elseif $value != "" && !$error}
                                        <span class="help-block"><i class="icon-ok"></i></span>
                                    {/if}
                                </div>
                            </div><!--/.form-group-->
                        {/form_field}
                        {form_field form=$form field="message"}
                            <div class="form-group group-message {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
                                <label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
                                <div class="control-input">
                                    <textarea name="{$name}" id="{$label_attr.for}" placeholder="{intl l='And your message...'}" rows="6" class="form-control"{if $required} aria-required="true" required{/if}>{$value}</textarea>
                                    {if $error }
                                        <span class="help-block"><i class="icon-remove"></i> {$message}</span>
                                        {assign var="error_focus" value="true"}
                                    {elseif $value != "" && !$error}
                                        <span class="help-block"><i class="icon-ok"></i></span>
                                    {/if}
                                </div>
                            </div><!--/.form-group-->
                        {/form_field}

                        <div class="form-group group-btn">
                            <div class="control-btn">
                                <button type="submit" class="btn btn-contact">{intl l="Send"}</button>
                            </div>
                        </div><!--/.form-group-->
                    </div>
                </fieldset>
            </form>
            {/form}
        {/block}
        </article>
    </div>
{/block}
