<?php
    $store = Mage::app()->getStore();
    $code  = $store->getCode();

    $_infoblock = Mage::getStoreConfig('porto_settings/contacts/infoblock', $code);
    $custom_block = Mage::getStoreConfig('porto_settings/contacts/customblock', $code);
?>
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<?php if($custom_block): ?>
<div class="row">
    <div class="col-md-12">
        <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($custom_block)->toHtml(); ?>
    </div>
</div>
<?php endif; ?>
<div class="row">
    <div class="col-md-8">
<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">
    <h2 class="legend"><?php echo Mage::helper('contacts')->__('Leave') ?> <?php echo Mage::helper('contacts')->__('a') ?> <b><?php echo Mage::helper('contacts')->__('Message') ?></b></h2>
    <div class="row">
        <ul class="form-list col-md-6">
            <li>
                <label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
                <div class="input-box">
                    <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
                </div>
            </li>
            <li>
                <label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
                <div class="input-box">
                    <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
                </div>
            </li>
            <li>
                <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
                <div class="input-box">
                    <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
                </div>
            </li>
        </ul>
        <ul class="form-list col-md-6">
            <li>
                <label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label>
                <div class="input-box input-textarea">
                    <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3" placeholder="<?php echo Mage::helper('contacts')->__('Comment') ?>"></textarea>
                </div>
            </li>
            <li>
                <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
                <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
            </li>
        </ul>
    </div>
</form>
<script type="text/javascript">
//<![CDATA[
    var contactForm = new VarienForm('contactForm', true);
//]]>
</script>
    </div>
    <div class="col-md-4 contact-info">
        <h2 class="legend"><?php echo Mage::helper('contacts')->__('Contact') ?> <b><?php echo Mage::helper('contacts')->__('Details') ?></b></h2>
        <?php
            echo $_infoblock;
        ?>
    </div>
</div>