<?php
/*
 * @author     M2E Pro Developers Team
 * @copyright  M2E LTD
 * @license    Commercial use is forbidden
 */

// @codingStandardsIgnoreFile

/** @var $this Ess_M2ePro_Block_Adminhtml_Ebay_Template_Description_Preview_Form */

?>

<style type="text/css">
    body {
        background: none;
    }
    #store_switcher_container p {
        margin-bottom: 0 !important;
        border: none !important;
        background: none !important;
        padding: 0 !important;
    }
</style>

<div style="margin: 5px !important;" id="block_notice_ebay_template_description_preview" class="block_notices_module" title="<?php echo Mage::helper('M2ePro')->__('Description Preview'); ?>">
    <?php echo Mage::helper('M2ePro')->__(
        'If your description contains M2E Pro Attributes, some of them such as Image URLs, Images, etc. might display for the previewing the value which is different from the actual one that will be sent to eBay.'
    ); ?>
</div>

<div class="entry-edit" id="magento_block_ebay_template_description_form" style="padding: 5px;">

    <div class="entry-edit-head">
        <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('M2ePro')->__('Select Product'); ?></h4>
    </div>

    <div class="fieldset">
        <div class="hor-scroll">

            <form id="<?php echo $this->getForm()->getId(); ?>" action="<?php echo $this->getForm()->getData('action'); ?>" method="post" enctype="multipart/form-data">

                <input type="hidden" name="show" value="1" />
                <input type="hidden" name="form_key" value="<?php echo $this->getFormKey(); ?>" />

                <?php if ($errorMessage = $this->getData('error_message')): ?>
                    <span style="color: red; font-weight: bold;"><?php echo Mage::helper('M2ePro')->escapeHtml($errorMessage); ?></span>
                    <br/><br/>
                <?php endif; ?>

                <?php echo Mage::helper('M2ePro')->__('Enter Product Id'); ?>:&nbsp;&nbsp;
                <input id="product_id" type="text" name="id" value="<?php echo $this->getData('product_id'); ?>" class="input-text" />

                <div id="store_switcher_container" style="margin-left: 10px; margin-right: 10px; display: inline-block;">
                    <?php echo Mage::helper('M2ePro')->__('Store'); ?>:&nbsp;&nbsp;
                    <div style="display: inline-block; \">
                        <?php echo $this->getChildHtml('store_switcher'); ?>
                    </div>
                </div>

                &nbsp;&nbsp;<?php echo $this->getChildHtml('display_product_description') ?>
                &nbsp;&nbsp;<?php echo Mage::helper('M2ePro')->__('or') ?>&nbsp;&nbsp;
                <?php echo $this->getChildHtml('display_random_product_description') ?>

            </form>

        </div>
    </div>

</div>