<div class="row">
	<div class="col-12">
		<h1 class="h4 mb-3">{{ title }}</h1>
		<form action="{{ admin_dir }}/settings/smtp/" method="post" class="needs-validation" autocomplete="off" novalidate>
			<div class="row">
				<div class="col-12 col-md-6">
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="disable_confirm" name="opt[disable_confirm]" value="true" {{ disable_confirm ? 'checked' : '' }}>
							<label class="custom-control-label" for="disable_confirm">Disable registration confirmation email / reset password</label>
						</div>
						<small class="form-text text-muted">Warning! If you tick this feature then the email entered by the user will not be validated.</small>
					</div>
					<div class="form-group">
						<label for="smtp_provider">Provider</label>
						<select name="opt[smtp_provider]" id="smtp_provider" class="form-control" onchange="settings.smtp()">
							<option value="">-- Select Email Provider --</option>
							{% for key, val in email_provider %}
								<option value="{{ key }}" {{ key == smtp_provider ? 'selected' : '' }}>{{ val }}</option>
							{% endfor %}
						</select>
					</div>
					<div class="form-group">
						<label for="smtp_host">Host</label>
						<input type="text" name="opt[smtp_host]" id="smtp_host" class="form-control" placeholder="SMTP Host" value="{{ smtp_host }}">
					</div>
					<div class="form-group">
						<label for="smtp_port">Port</label>
						<input type="number" name="opt[smtp_port]" id="smtp_port" class="form-control" placeholder="SMTP Port" value="{{ smtp_port }}">
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="smtp_tls" name="opt[smtp_tls]" {{ smtp_tls ? 'checked' : '' }}>
							<label class="custom-control-label" for="smtp_tls">Use TLS</label>
						</div>
					</div>
				</div>
				<div class="col-12 col-md-6">
					<div class="form-group">
						<label for="smtp_email">Email</label>
						<input type="email" name="opt[smtp_email]" id="smtp_email" class="form-control" placeholder="Email" value="{{ smtp_email }}">
					</div>
					<div class="form-group">
						<label for="smtp_password">Password</label>
						<input type="password" name="opt[smtp_password]" id="smtp_password" class="form-control" placeholder="Password" value="{{ smtp_password }}">
					</div>
					<div class="form-group">
						<label for="smtp_sender">Sender Name</label>
						<input type="text" name="opt[smtp_sender]" id="smtp_sender" class="form-control" placeholder="Sender Name" value="{{ smtp_sender }}">
					</div>
					<div class="form-group">
						<label for="smtp_reply_email">Reply To Email</label>
						<input type="email" name="opt[smtp_reply_email]" id="smtp_reply_email" class="form-control" placeholder="Reply To Email" value="{{ smtp_reply_email }}">
					</div>
					<div class="form-group">
						<label for="smtp_reply_name">Reply To Recipient</label>
						<input type="text" name="opt[smtp_reply_name]" id="smtp_reply_name" class="form-control" placeholder="Reply To Recipient" value="{{ smtp_reply_name }}">
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-12">
					<button type="submit" class="btn btn-success">
						<em class="fas fa-save mr-2"></em>Update
					</button>
				</div>
			</div>
		</form>
	</div>
</div>
