{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2017 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}



{capture name=path}{l s='Contact'}{/capture}
{if isset($confirmation)}
	<p class="alert alert-success">{l s='Your message has been successfully sent to our team.'}</p>
	<ul class="footer_links clearfix">
		<li>
			<a class="btn btn-default button button-small" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}">
				<span>
					<i class="icon-chevron-left"></i>{l s='Home'}
				</span>
			</a>
		</li>
	</ul>
{elseif isset($alreadySent)}
	<p class="alert alert-warning">{l s='Your message has already been sent.'}</p>
	<ul class="footer_links clearfix">
		<li>
			<a class="btn btn-default button button-small" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}">
				<span>
					<i class="icon-chevron-left"></i>{l s='Home'}
				</span>
			</a>
		</li>
	</ul>
{else}
	{include file="$tpl_dir./errors.tpl"}
	<form action="{$request_uri}" method="post" class="contact-form-box" enctype="multipart/form-data">
		<fieldset>
			<div class="clearfix">
				<div class="col-xs-12 col-md-3">
					<p class="form-group">
						<label for="email">{l s='Your name'}*</label>
						<input class="form-control grey" type="text" id="name" name="name" required />
					</p>
					<p class="form-group">
						<label for="email">{l s='Your company'}*</label>
						<input class="form-control grey" type="text" id="company" name="company" required />
					</p>
					<p class="form-group">
						<label for="email">{l s='Your phone'}*</label>
						<input class="form-control grey" type="text" id="phone" name="phone" required />
					</p>
					<p class="form-group">
						<label for="email">{l s='Email address'}*</label>
						<input class="form-control grey validate" type="text" id="email" name="from" data-validate="isEmail" required />
					</p>
					
				</div>
				<div class="col-xs-12 col-md-3">
					<p class="form-group">
						<label for="email">{l s='Subject'}*</label>
						<input class="form-control grey validate" type="text" id="subject" name="subject" required />
					</p>
					<p class="form-group">
						<label for="email">{l s='Your country'}</label>
						<select id="country" class="form-control" name="country">
							<option value="0">{l s='-- Choose --'}</option>
							{foreach from=$countries item=country}
								<option value="{$country.name|escape:'html':'UTF-8'}">{$country.name|escape:'html':'UTF-8'}</option>
							{/foreach}
						</select>
					</p>
					{if $fileupload == 1}
						<p class="form-group">
							<label for="fileUpload">{l s='Attach File'}</label>
							<input type="hidden" name="MAX_FILE_SIZE" value="{if isset($max_upload_size) && $max_upload_size}{$max_upload_size|intval}{else}2000000{/if}" />
							<input type="file" name="fileUpload" id="fileUpload" class="form-control" />
						</p>
					{/if}
				</div>
				<div class="col-xs-12 col-md-6">
					<div class="form-group">
						<label for="message">{l s='Message'}*</label>
						<textarea class="form-control" id="message" name="message" required>{if isset($message)}{$message|escape:'html':'UTF-8'|stripslashes}{/if}</textarea>
					</div>
					{hook h='displayGDPRConsent' moduleName='contactform'}
				</div>
			</div>
			<div class="submit">
				<input type="text" name="url" value="" class="hidden" />
				<input type="hidden" name="contactKey" value="{$contactKey}" />
				<button type="submit" name="submitMessage" id="submitMessage" class="button btn btn-default button-medium"><span>{l s='Send'}<i class="icon-chevron-right right"></i></span></button>
			</div>
		</fieldset>
	</form>
{/if}
{addJsDefL name='contact_fileDefaultHtml'}{l s='No file selected' js=1}{/addJsDefL}
{addJsDefL name='contact_fileButtonHtml'}{l s='Choose File' js=1}{/addJsDefL}
