{namespace i=TYPO3\CMS\Install\ViewHelpers}
<p>
	If you upgrade your TYPO3 installation from one major version to another (e.g. 6.2 to 7 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>
<hr />

<h2>Wizards available</h2>
<div class="progress">
	<div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar"
		 aria-valuenow="{wizardsPercentageDone}" aria-valuemin="0" aria-valuemax="100"
		 style="width: {wizardsPercentageDone}%;">
		{wizardsPercentageDone}% Complete
	</div>
</div>
<f:if condition="{availableUpdates}">
	<f:then>
		<f:for each="{availableUpdates}" as="availableUpdate">
			<form method="post">
				<f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
				<input type="hidden" name="install[values][identifier]" value="{availableUpdate.identifier}"/>
				<h4>{availableUpdate.title}</h4>
				<f:format.raw>{availableUpdate.explanation}</f:format.raw>
				<f:if condition="{availableUpdate.renderNext}">
					<div>
						<f:render
							partial="Action/Common/SubmitButton"
							arguments="{name:'getUserInput', text:'Execute', className: 'btn-primary'}"
						/>
					</div>
				</f:if>
				<hr />
			</form>
		</f:for>
	</f:then>
	<f:else>
		<p>
			<strong>No updates to perform!</strong>
		</p>
		<hr />
	</f:else>
</f:if>

<f:if condition="{wizardsDone}">
	<form method="post">
		<f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
		<h2>Wizards marked as done</h2>
		<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>
		<table class="table table-striped">
			<tbody>
			<f:for each="{wizardsDone}" as="wizardDone">
				<tr>
					<td>
						<input id="t3-recheck-{wizardDone.identifier}" type="checkbox" name="install[values][recheck][{wizardDone.identifier}]" value="1" />
					</td>
					<td>
						{wizardDone.title}
					</td>
				</tr>
			</f:for>
			<f:for each="{rowUpdatersDone}" as="rowUpdaterDone">
				<tr>
					<td>
						<input id="t3-recheck-{rowUpdaterDone.identifier}" type="checkbox" name="install[values][recheckRowUpdater][{rowUpdaterDone.identifier}]" value="1" />
					</td>
					<td>
						Row updater: {rowUpdaterDone.title}
					</td>
				</tr>
			</f:for>
			</tbody>
		</table>
		<f:render
			partial="Action/Common/SubmitButton"
			arguments="{name:'recheckWizards', text:'Recheck chosen wizards'}"
		/>
	</form>
</f:if>
<hr />

<h4>Hint</h4>
<p>
	When all updates are done you can check the database for tables and fields no longer required.
	Perform the Database Analyzer steps until no more changes are required.
</p>
<a href="{i:uri.action(action: 'importantActions')}" class="btn btn-default">
	Go to Database Analyzer
</a>
