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

// @codingStandardsIgnoreFile

/** @var $this Ess_M2ePro_Block_Adminhtml_Configuration_Advanced_Form */

?>

<script>
    M2ePro.translator.add(<?php echo json_encode(array(
        'Migration Information' => Mage::helper('M2ePro')->__('Migration Information')
    )); ?>);

    Event.observe(window, 'load', function() {
        AdvancedObj = new ConfigurationAdvanced();
    });
</script>

<div id="block_notice_configuration_advanced" class="block_notices_module" title="<?php echo Mage::helper('M2ePro')->__('Migration to Magento v2.x'); ?>">
    <p><?php echo Mage::helper('M2ePro')->__('
                Here you can start M2E Pro data migration to Magento v2.x.
                Read the <a href="%url%" target="_blank">Migration Guide</a> for more details.',
            Mage::helper('M2ePro/Module_Support')->getSupportUrl('/support/solutions/articles/9000219396')
        ); ?></p>
</div>

<div class="entry-edit" id="magento_block_configuration_advanced_data" collapseable="no">

    <div class="entry-edit-head">
        <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('M2ePro')->__('Migration to Magento v2.x'); ?></h4>
    </div>

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

            <table class="form-list" cellspacing="0" cellpadding="0">

                <tbody>

                <tr>
                    <td class="label" style="width: auto">
                        <label style="width: auto"><?php echo Mage::helper('M2ePro')->__('Stop Module and prepare for migration'); ?>: </label>
                    </td>

                    <td class="value">
                        <?php echo $this->getChildHtml('proceed_button'); ?>
                    </td>

                    <td>
                        <p class="note">
                            <span>
                                <?php echo Mage::helper('M2ePro')->__(
                                    'Inventory and Order synchronization stops. The Module interface becomes unavailable.<br>
                                    <b>Note</b>: Once you confirm the migration running, it cannot be stopped.'
                                ) ?>
                            </span>
                        </p>
                    </td>
                </tr>

                </tbody>

            </table>

        </div>
    </div>

</div>

<script type="M2ePro/template" id="information_content">

    <div class="entry-edit" id="magento_block_configuration_advanced_data" collapseable="no">

        <div style="margin-top: 10px">
            <p>
                <?php echo Mage::helper('M2ePro')->__('
                    You are going to run the migration of M2E Pro data from Magento v1.x to Magento v2.x.<br>
                    Before you proceed, please read the <a href="%url%" target="_blank">Migration Guide</a>.
                    <br><br>
                    If you are ready to start, please click <strong>Confirm</strong>. It will stop the dynamic Cron tasks,
                    put M2E Pro under maintenance and prepare its database for the migration.
                    Please wait for at least 15 minutes until the process is fully completed.
                    <br><br>
                    <strong>Note:</strong> Once you confirm the migration running, the process cannot be rolled back.
                ', Mage::helper('M2ePro/Module_Support')->getSupportUrl('/support/solutions/articles/9000219396')); ?>
            </p>
        </div>

        <div style="float: right; margin: 0 0 1em;">
            <a href="#" onclick="adnvancedPopup.close();">Close</a>
            &nbsp;
            &nbsp;
            &nbsp;
            <?php echo $this->getChildHtml('confirm_button');?>
        </div>

    </div>

</script>