<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
// @codingStandardsIgnoreFile
?>
<?php
$helper = $this->helper('Solwin\Cpanel\Helper\Data');
$showgooglemap = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/showgooglemap');
$embedcode = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/embedcode');
$storename = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/storename');
$storedesc = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/storedesc');
$storeaddress = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/storeaddress');
$contactinfo = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/contactinfo');
$storeemail = $helper->getCpanelConfigValue('cpanelsection/contactpagegroup/storeemail');
?>
<div class="c-add col-lg-5 col-md-5 col-sm-6 col-xs-12">
    <h2 class="cs-name"><?php echo $storename; ?> </h2>
    <div class="cs-desc">
        <?php echo $storedesc; ?>
    </div>
    <div class="cs-info">
        <span>
            <i class="fa fa-map-marker"></i>
        </span>
        <b>Address</b>
        <div>
            <?php echo $storeaddress; ?>  
        </div>
    </div>
    <div class="cs-info">
        <span>
            <i class="fa fa-phone"></i>
        </span>
        <b>Phone</b>
        <div>
            <?php echo $contactinfo; ?>
        </div>
    </div>
    <div class="cs-info">
        <span>
            <i class="fa fa-envelope"></i>
        </span>
        <b>Email</b>
        <div>
            <a href="mailto:<?php echo $storeemail; ?>">
                <?php echo $storeemail; ?>
            </a>
        </div>
    </div>
    <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('socials_block')->toHtml(); ?>
</div>
<div class="c-wrapper col-lg-7 col-md-7 col-sm-6 col-xs-12">
    <div class="row">
        <form class="form contact"
              action="<?php /* @escapeNotVerified */ echo $block->getFormAction(); ?>"
              id="contact-form"
              method="post"
              data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>"
              data-mage-init='{"validation":{}}'>
            <fieldset class="fieldset">
                <legend class="legend"><span style="font-weight: 400;"><?php /* @escapeNotVerified */ echo __('Write Us') ?></span></legend><br />
                <div class="field note no-label"><?php /* @escapeNotVerified */ echo __('Jot us a note and we’ll get back to you as quickly as possible.') ?></div>
                <div class="field name required">
                    <label class="label" for="name"><span><?php /* @escapeNotVerified */ echo __('Name') ?></span></label>
                    <div class="control">
                        <input name="name" id="name" title="<?php /* @escapeNotVerified */ echo __('Name') ?>" value="<?php echo $block->escapeHtml($this->helper('Magento\Contact\Helper\Data')->getUserName()) ?>" class="input-text" type="text" data-validate="{required:true}"/>
                    </div>
                </div>
                <div class="field email required">
                    <label class="label" for="email"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
                    <div class="control">
                        <input name="email" id="email" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" value="<?php echo $block->escapeHtml($this->helper('Magento\Contact\Helper\Data')->getUserEmail()) ?>" class="input-text" type="email" data-validate="{required:true, 'validate-email':true}"/>
                    </div>
                </div>
                <div class="field telephone">
                    <label class="label" for="telephone"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
                    <div class="control">
                        <input name="telephone" id="telephone" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" value="" class="input-text" type="text" />
                    </div>
                </div>
                <div class="field comment required">
                    <label class="label" for="comment"><span><?php /* @escapeNotVerified */ echo __('What’s on your mind?') ?></span></label>
                    <div class="control">
                        <textarea name="comment" id="comment" title="<?php /* @escapeNotVerified */ echo __('What’s on your mind?') ?>" placeholder="Please describe your request and best time to call" class="input-text" cols="5" rows="3" data-validate="{required:true}"></textarea>
                    </div>
                </div>
                <?php echo $block->getChildHtml('form.additional.info'); ?>
            </fieldset>
            <div class="actions-toolbar">
                <div class="primary">
                    <input type="hidden" name="hideit" id="hideit" value="" />
                    <button type="submit" title="<?php /* @escapeNotVerified */ echo __('Submit') ?>" class="action submit primary">
                        <span><?php /* @escapeNotVerified */ echo __('Submit') ?></span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<?php if ($showgooglemap) { ?>
    <div class="contact-map" style="margin:30px 0 0;float: left;width:100%;">
        <iframe style="border: 0;" src="<?php echo $embedcode; ?>" frameborder="0" width="100%" height="400px"></iframe>
    </div>
<?php } ?>
