{# @copyright   Copyright (C) 2010-2019 Combodo SARL #}
{# @license     http://opensource.org/licenses/AGPL-3.0 #}

<div class="display_block display-files">
    <fieldset id="installation_progress">
        <legend>{{ 'iTopUpdate:UI:Progress'|dict_s }}</legend>

        <div id="progress_content">
            <p class="center">
                <span id="setup_msg">{{ 'iTopUpdate:UI:SetupMessage:Ready'|dict_s }}</span>
            </p>
            <div id="progress">0%</div>
        </div>
    </fieldset>

    <fieldset>
        <legend>{{ 'iTopUpdate:UI:Status'|dict_s }}</legend>

        <p id="new_version" style="display: none;">{{ 'iTopUpdate:UI:NewVersion'|dict_s }}</p>
        <div id="current_version" class="message message-info">
            <span id="current-version">{{ sCurrentVersion }}</span>
        </div>

        {% if bDoBackup %}
            <div id="do_backup_done" style="display: none;">
                <p>{{ 'iTopUpdate:UI:WithDBBackup'|dict_s }}</p>
                <div class="message message-valid">
                    {{ sBackupFile }}
                </div>
            </div>
        {% endif %}
        {% if bDoFilesArchive %}
            <div id="do_files_archive_done" style="display: none;">
                <p>{{ 'iTopUpdate:UI:WithFilesBackup'|dict_s }}</p>
                <div class="message message-valid">
                    {{ sItopArchive }}
                </div>
            </div>
        {% endif %}
    </fieldset>

    <fieldset>
        <div id="setup_error_outer" class="message message-error" style="display: none;">
            <div>
                <span id="setup_error"></span>
            </div>
            {% if bDoFilesArchive %}
                <div>
                    <span>{{ 'iTopUpdate:UI:RestoreArchive'|dict_format(sItopArchive) }}</span>
                </div>
            {% endif %}
            {% if bDoBackup %}
                <div>
                    <span>{{ 'iTopUpdate:UI:RestoreBackup'|dict_format(sBackupFile) }}</span>
                </div>
            {% endif %}
            <div>
                <span>{{ 'iTopUpdate:UI:MaintenanceModeActive'|dict_s }}</span>
            </div>
        </div>

        <div id="run_setup" style="display: none;">
            <form enctype="multipart/form-data" method="post" class="form-inline">
                <input type="hidden" name="operation" value="RunSetup"/>
                <input type="hidden" name="authent" value="{{ sSetupToken }}">
                <input id="run_setup" type="submit" value="{{ 'iTopUpdate:UI:RunSetup'|dict_s }}" class="ui-button ui-widget ui-state-default ui-corner-all" role="button"/>
            </form>
        </div>

        <form enctype="multipart/form-data" method="post" class="form-inline">
            <input id="setup_continue" type="submit" value="{{ 'iTopUpdate:UI:Continue'|dict_s }}" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" disabled/>
        </form>
    </fieldset>
</div>
