<h3>
    <span class="fas fa-cogs"></span>
    {% trans %}Migrate Users to ZAuth{% endtrans %}
    {{ pageSetVar('title', 'Migrate Users to ZAuth'|trans) }}
</h3>
<div class="alert alert-info">
    {% trans %}This will migrate all VALID users from the old Users table to the new ZAuth table. Users are automatically migrated when they login, but this will migrate all users at one time.{% endtrans %}
    {% trans %}This could potentially take a long time if there are many users that must be migrated. They will be migrated in batches of 25 to reduce the risk of timeouts.{% endtrans %}
    <p><strong>{% trans %}This action MUST be complete before upgrading to Core-2.0.{% endtrans %}</strong></p>
    <p><em>{% trans %}Invalid users cannot be migrated unless their data is manually corrected. The errors are posted to the logfile.{% endtrans %}</em></p>
</div>
<div class="alert alert-danger">
    <i class="fas fa-exclamation-triangle fa-2x"></i> {% trans %}This action cannot be undone.{% endtrans %}
</div>
<div class="progress" id="progress-bar">
    <div class="progress-bar bg-success progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0">
        <span class="sr-only">{% trans %}Progress bar{% endtrans %}</span>
    </div>
</div>
<div class="alert alert-info">{% trans with {'%f%': count} %}There are %f% users to try to migrate.{% endtrans %}</div>
<div class="text-center"><i id="spinner" class="fas fa-cog fa-2x fa-spin fa-fw" style="display: none"></i> <button id="migrate" class="btn btn-lg btn-success">{% trans %}Begin Migration{% endtrans %}</button></div>
<div id="redirectUrlAfterSuccess" data-route="{{ path('zikulausersmodule_useradministration_list') }}"></div>
{{ pageAddAsset('javascript', zasset('@ZikulaUsersModule:js/Zikula.Users.Admin.Migration.js')) }}
