{% extends '/components/merlin/steps/base.twig' %}

{% block slide_body_video_section_blurb %}
	<p>Shield assesses every IP address that accesses your site and when they trigger your
		defenses often enough (offense limit), they're blacklisted.
	</p>
{% endblock %}

{% block slide_body_action_area %}
	{% import '/common/macros.twig' as icwp_macros %}

	<form class="form-horizontal merlin-form ajax-form">
		{{ icwp_macros.formInput_Hidden( 'step_slug', vars.step_slug ) }}

		<div class="row mb-2">
			<div class="col">
				<h6 class="pb-1 border-bottom d-inline-block">Automatic IP Blocking Settings</h6>
			</div>
		</div>

		<div class="row">
			<div class="col-12">
				{{ icwp_macros.formInput_Number( 'offenses', vars.offense_limit, 'Offense Limit', null,
					strings.ip_blocking_text,null
				) }}

				<div class="form-group row mt-3">
					<label class="col-4 col-form-label" for="_block_length">Block Duration</label>
					<div class="col-8">
						<select name="block_length" id="_block_length">
							<option value="day">1 Day</option>
							<option value="week">1 Week</option>
							<option value="month">1 Month</option>
						</select>
						<small class="form-text text-muted d-block">
							Malicious IPs should be blocked for at least a day.
						</small>
					</div>
				</div>

				<div class="mt-3"></div>
				{{ icwp_macros.formInput_Checkbox(
					'cs_block', 'Y', 'Crowd-Sourced IPs',
					'Use CrowdSec Blocklists',
					"Crowd-sourced IP block-lists involves sharing your IP block-list with others, and they share their lists with you."
					~' [<a href="https://clk.shldscrty.com/l7" target="_blank">more info</a>]',
					null, true
				) }}

				<div class="mt-3"></div>
				{{ icwp_macros.formInput_Submit2( 'Set IP Blocking Options', null, 'secondary', false, 'mt-2' ) }}
			</div>
		</div>

	</form>
{% endblock %}