<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=contact_us.<br />
 * Displays contact us page form.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Sun Aug 19 09:47:29 2012 -0400 Modified in v1.5.1 $
 */
?>
<div class="centerColumn" id="contactUsDefault">

<?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send')); ?>

<?php if (CONTACT_US_STORE_NAME_ADDRESS== '1') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address><br>
<?php } ?>

<?php if ($genesis_options['google_maps_embed']) : ?>
<div class="embed-responsive embed-responsive-4by3">
<iframe src="<?php echo $genesis_options['google_maps_embed']; ?>" width="757" height="568" frameborder="0" style="border:0" allowfullscreen></iframe>
</div><br class="clearBoth" />
<?php endif; ?>

<?php
  if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>

<div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div>

<div class="buttonRow"><a href="<?php echo zen_back_link(true); ?>"><?php echo BUTTON_BACK_ALT; ?></a></div>

<?php
  } else {
?>

<?php if (DEFINE_CONTACT_US_STATUS >= '1' and DEFINE_CONTACT_US_STATUS <= '2') { ?>
<div id="contactUsNoticeContent" class="content">
<?php
/**
 * require html_define for the contact_us page
 */
  require($define_page);
?>
</div>
<br class="clearBoth" />
<?php } ?>

<?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?>

<h3 class="section-title"><?php echo HEADING_TITLE; ?></h3>
<p class="text-danger"><?php echo FORM_REQUIRED_INFORMATION; ?></p>
<br class="clearBoth" />

<?php
// show dropdown if set
    if (CONTACT_US_LIST !=''){
?>
<div class="form-group">
	<label class="inputLabel" for="send-to"><?php echo str_replace( ':', '', SEND_TO_TEXT ) . ' <span class="alert form-alert text-danger">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
	<?php echo zen_draw_pull_down_menu('send_to',  $send_to_array, 0, 'id="send-to"'); ?>
</div>
<?php
    }
?>

<div class="form-group">
	<label class="inputLabel" for="contactname"><?php echo str_replace( ':', '', ENTRY_NAME ) . ' <span class="alert form-alert text-danger">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
	<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"'); ?>
</div>

<div class="form-group">
	<label class="inputLabel" for="email-address"><?php echo str_replace( ':', '', ENTRY_EMAIL ) . ' <span class="alert form-alert text-danger">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
	<?php echo zen_draw_input_field('email', ($email_address), ' size="40" id="email-address"'); ?>
</div>

<div class="form-group">
	<label class="inputLabel" for="enquiry"><?php echo str_replace( ':', '', ENTRY_ENQUIRY ) . ' <span class="alert form-alert text-danger">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
	<?php echo zen_draw_textarea_field('enquiry', '38', '5', $enquiry, 'id="enquiry"'); ?>
</div>

<?php echo zen_draw_input_field('should_be_empty', '', ' size="40" id="CUAS" style="visibility:hidden; display:none;" autocomplete="off"'); ?>

<br class="clearBoth" />

<div class="buttonRow pull-right"><input type="submit" value="<?php echo BUTTON_SEND_ALT; ?>" class="button"></div>
<div class="buttonRow pull-left"><a href="<?php echo zen_back_link(true); ?>" class="button button-inverse"><?php echo BUTTON_BACK_ALT; ?></a></div>
<?php
  }
?>
</form>
</div>