{% extends 'wizard/slides/common/base.twig' %}

{% block slide_body %}
	{{ icwp_macros.slideTitle( 'Core File Scanner Results' ) }}

	{% if data.files.has %}
		<div class="alert alert-warning" role="alert">
			{{ data.files.count }} file(s) were discovered that you need to review.
		</div>
		<div class="indent_slight">
			{% if data.files.checksum.has %}
				<h5>Modified Core Files: {{ data.files.checksum.count }}</h5>
				<ul>
					{% for file in data.files.checksum.list %}
						<li><code class="filepath">{{ file }}</code></li>
					{% endfor %}
				</ul>
			{% endif %}
		</div>

		<div class="indent_slight">
			{% if data.files.missing.has %}
				<h4>Missing Core Files: {{ data.files.missing.count }}</h4>
				<ul>
					{% for file in data.files.missing.list %}
						<li><code class="filepath">{{ file }}</code></li>
					{% endfor %}
				</ul>
			{% endif %}
		</div>

		<p>To replace the files listed above with the official versions taken
		   directly from WordPress.org, use the confirmation form below.</p>
		<p><strong>Important</strong>: Remember it is not the job of the scanner to determine
			whether you need to replace these files on your website. This is <em>your role</em>.
			We can only show you what's there. If you have doubts, please discuss
			this with your web hosting provider or developers.
		</p>
		<form class="form-horizontal icwp-wizard-form">

			{{ icwp_macros.formInput_Checkbox(
				'RestoreFiles', 'Y', 'Replace Modified Files', 'Check to replace all of the modified files',
				"If you are unsure about whether you can restore these files to official
						WordPress originals, please discuss the results of this scan with your
						web host/developer.."
			) }}
			{{ icwp_macros.formInput_Hidden( 'wizard-step', 'restorefiles' ) }}
			{{ icwp_macros.formInput_Submit( 'Replace Files With Originals' ) }}
		</form>

	{% else %}
		<div class="alert alert-success" role="alert">
			Great! There were no modified files discovered in the scan.
		</div>
	{% endif %}
{% endblock %}