<form id="StartScans">
	<div class="card">
		<div class="card-header">
			<h5 class="card-title">
				{{ strings.title_scan_now }}
			</h5>
			<h6 class="card-subtitle text-muted">{{ strings.subtitle_scan_now }}</h6>
		</div>
		<div class="card-body pb-2">

			<div class="row mb-3">
				<div class="col-12">
					<h6 class="mt-0 mb-2">{{ strings.scanselect_file_areas }}</h6>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_wcf" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="wcf" id="_wcf" value="Y"
								   {% if not scans.wcf.flags.is_available %}disabled="disabled"{% endif %}
									{% if scans.wcf.flags.is_selected %}checked="checked" aria-selected="true"{% endif %}
							/>
							{{ scans.wcf.strings.title }}
							<br />
							<small class="form-text">{{ scans.wcf.strings.subtitle }}</small>
						</label>
					</div>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_ufc" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="ufc" id="_ufc" value="Y"
								   {% if not scans.ufc.flags.is_available %}disabled="disabled"{% endif %}
									{% if scans.ufc.flags.is_selected %}checked="checked" aria-selected="true"{% endif %}
							/>
							{{ scans.ufc.strings.title }}
							<br />
							<small class="form-text">{{ scans.ufc.strings.subtitle }}</small>
						</label>
					</div>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_ptg" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="ptg" id="_ptg" value="Y"
								   {% if not scans.ptg.flags.is_available %}disabled="disabled"{% endif %}
									{% if scans.ptg.flags.is_selected %}checked="checked" aria-selected="true"{% endif %}
							/>
							{{ scans.ptg.strings.title }}
							<br />
							<small class="form-text">{{ scans.ptg.strings.subtitle }}</small>
						</label>
					</div>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_mal" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="mal" id="_mal" value="Y"
								   {% if not scans.mal.flags.is_available %}disabled="disabled"{% endif %}
									{% if scans.mal.flags.is_selected %}checked="checked" aria-selected="true"{% endif %}
							/>
							{{ scans.mal.strings.title }}
							<br />
							<small class="form-text">{{ scans.mal.strings.subtitle }}</small>
						</label>
					</div>
				</div>
			</div>

			<div class="row">

				<div class="col-12">
					<h6 class="mt-0 mb-2">{{ strings.scanselect_assets }}</h6>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_wpv" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="wpv" id="_wpv" value="Y"
								   {% if not scans.wpv.flags.is_available %}disabled="disabled"{% endif %}
									{% if scans.wpv.flags.is_selected %}checked="checked" aria-selected="true"{% endif %}
							/>
							{{ scans.wpv.strings.title }}
							<br />
							<small class="form-text">{{ scans.wpv.strings.subtitle }}</small>
						</label>
					</div>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_apc" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="apc" id="_apc" value="Y"
								   {% if not scans.apc.flags.is_available %}disabled="disabled"{% endif %}
									{% if scans.apc.flags.is_selected %}checked="checked" aria-selected="true"{% endif %}
							/>
							{{ scans.apc.strings.title }}
							<br />
							<small class="form-text">{{ scans.apc.strings.subtitle }}</small>
						</label>
					</div>
				</div>

			</div>

			<div class="row">
				<div class="col-12">
					<h6 class="mt-2 mb-2">{{ strings.scan_options }}</h6>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_opt_clear_ignore" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="opt_clear_ignore" id="_opt_clear_ignore" value="Y" />
							{{ strings.clear_ignore }}
							<br />
							<small class="form-text">{{ strings.clear_ignore_sub }}</small>
						</label>
					</div>
				</div>

				<div class="col-xl-3 col-lg-6 col-md-6">
					<div class="scan-select pl-2 text-nowrap">
						<label for="_opt_clear_notification" class="col-form-label">
							<input type="checkbox" class="form-control text-right"
								   name="opt_clear_notification" id="_opt_clear_notification" value="Y" />
							{{ strings.clear_suppression }}
							<br />
							<small class="form-text">{{ strings.clear_suppression_sub }}</small>
						</label>
					</div>
				</div>

			</div>
		</div>
		<div class="card-footer">
			<button class="btn btn-primary float-right"
					{% if not flags.can_scan %}disabled="disabled"{% endif %}
					type="submit" id="StartScansButton">{{ strings.run_scans_now }} &rarr;</button>
			{% if flags.can_scan %}
				{{ strings.more_items_longer }}
			{% else %}
				<p>Scans are currently disabled because:
					{% for cannot_scan_reason in vars.cannot_scan_reasons %}
						<br />-<span class="text-danger">{{ strings[cannot_scan_reason] }}</span>
					{% endfor %}
				</p>
			{% endif %}
		</div>
	</div>
</form>

<script>
	jQuery( 'form#StartScans' ).icwpWpsfScansStart(
		{
			'ajax_scans_start':{{ ajax.scans_start|raw }},
			'ajax_scans_check':{{ ajax.scans_check|raw }}
		}
	);
	{% if vars.initial_check %}
		jQuery( document ).icwpWpsfScansCheck(
			{
				'ajax_scans_check':{{ ajax.scans_check|raw }}
			}
		);
	{% endif %}

</script>