<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<p>
    If you upgrade your TYPO3 installation from one major version to another (e.g. {currentVersion - 1} LTS to {currentVersion} LTS),
    then the Upgrade Wizards guide you through the necessary steps to upgrade your database
    records or explicitly install extensions that ship with the latest TYPO3 version.
</p>

<div class="t3js-upgrade-status-section">
    <div class="t3js-upgradeWizards-wizards-messages-output"></div>
    <div class="upgradeWizards-wizards-output t3js-upgradeWizards-wizards-output"></div>

    <h4 class="mt-4">Wizards marked as done</h4>
    <p>
        Some wizards fully automatically check whether they should be executed, while others just
        set a flag in the system registry if they have been executed once. This "I have been executed"
        flag can be reset by selecting specific wizards from the list below, so the according wizards
        show up as possible upgrade wizards again.
    </p>
    <div
        class="t3js-module-content"
        data-upgrade-wizards-mark-undone-token="{upgradeWizardsMarkUndoneToken}"
        data-upgrade-wizards-input-token="{upgradeWizardsInputToken}"
        data-upgrade-wizards-execute-token="{upgradeWizardsExecuteToken}"
    >
        <div class="t3js-upgradeWizards-done-output"></div>
    </div>
</div>

<template id="t3js-upgradeWizards-blocking-charset-template">
    <p>
        The default database charset of the main MySQL database is not utf-8.
        <br />
        You have to run this update wizard before you can run any other update
        wizard to make sure new tables and fields are created with the correct
        charset.
        <br />
        WARNING: This will NOT convert any existing data.
    </p>
    <button type="button" class="btn btn-default t3js-upgradeWizards-blocking-charset-fix">
        Set default charset to utf8
    </button>
</template>

<template id="t3js-upgradeWizards-blocking-adds-template">
    <p class="mt-4">
        There are tables or fields in the database which need to be created.
        <br />
        You have to run this update wizard before you can run any other update
        wizard to make sure all needed tables and fields are present.
    </p>
    <p class="t3js-upgradeWizards-blocking-adds-rows"></p>
    <button type="button" class="btn btn-default t3js-upgradeWizards-blocking-adds-execute">
        Create missing tables and fields
    </button>
</template>

<template id="t3js-upgradeWizards-list-template">
    <f:comment><!--
            @todo: this whole "partial" gets reloaded everytime the "Upgrade status" is re-calculated
                this is an issue with the progress bar as it thus is re-rendered all the time
        --></f:comment>
    <h4 class="mt-4">Upgrade status</h4>
    <typo3-backend-progress-bar value="0" max="100"></typo3-backend-progress-bar>
    <div class="module-action-list t3js-upgradeWizards-list-rows mt-4"></div>
</template>

<template id="t3js-upgradeWizards-list-row-template">
    <div class="module-action-item">
        <div class="module-action-item-body">
            <div class="module-action-item-title t3js-upgradeWizards-list-row-title"></div>
            <div class="module-action-item-description t3js-upgradeWizards-list-row-explanation"></div>
        </div>
        <div class="module-action-item-action">
            <button type="button" class="btn btn-default t3js-upgradeWizards-list-row-execute">
                <core:icon identifier="actions-play" size="small" /> Execute
            </button>
        </div>
    </div>
</template>

<template id="t3js-upgradeWizards-input">
    <form class="card">
        <div class="card-header">
            <h4 class="t3js-upgradeWizards-input-title">{updateData.title}</h4>
        </div>
        <div class="card-body">
            <p class="t3js-upgradeWizards-input-description">{updateData.description}</p>
            <div class="t3js-upgradeWizards-input-html"></div>
        </div>
        <div class="card-footer">
            <button type="button" class="btn btn-warning t3js-upgradeWizards-input-perform">
                Perform updates!
            </button>
            <button type="button" class="btn btn-default t3js-upgradeWizards-input-abort">
                Abort
            </button>
        </div>
    </form>
</template>

<template id="t3js-upgradeWizards-done-body-template">
    <div class="table-fit mb-0">
        <table class="table table-striped">
            <tbody class="t3js-upgradeWizards-done-rows"></tbody>
        </table>
    </div>
</template>

<template id="t3js-upgradeWizards-done-row-template">
    <tr>
        <td>
            <button type="button" class="btn btn-default t3js-upgradeWizards-done-markUndone">
                Mark undone
            </button>
        </td>
        <td class="t3js-upgradeWizards-done-title">
        </td>
    </tr>
</template>

</html>
