<?php defined('ABSPATH') || exit; ?>

<p>
    <?php printf(
        _x('Site Reviews needs to migrate your reviews and settings to the latest version. If this notice continues to appear after 5 minutes, please read the %s section on the Help page.', 'admin-text', 'site-reviews'),
        glsr_admin_link('documentation.support', _x('Common Problems and Solutions', 'admin-text', 'site-reviews'), '#support-common-problems-and-solutions')
    ); ?>
</p>

<?php if (glsr()->hasPermission('tools', 'general')) { ?>
    <form method="post">
        <?php wp_nonce_field('migrate-plugin'); ?>
        <input type="hidden" name="<?php echo glsr()->id; ?>[_action]" value="migrate-plugin">
        <p class="glsr-notice-buttons">
            <button type="submit" class="glsr-button button button-primary"
                data-ajax-click
                data-remove-notice="migration"
                data-loading="<?php echo esc_attr_x('Migrating, please wait...', 'admin-text', 'site-reviews'); ?>"
            ><?php echo _x('Run Migration', 'admin-text', 'site-reviews'); ?>
            </button>
        </p>
    </form>
<?php } ?>
