<form class="standard" id="contact_form" action="<?php echo $tpl['current_url_pageless']; ?>" method="post" autocomplete="off">
	<h2><?php echo __('Contacter l\'administrateur'); ?></h2>
<?php include(__DIR__ . '/report.tpl.php'); ?>
<?php if (!isset($tpl['report']['success']) && !isset($tpl['report']['info'])) : ?>
<?php if ($tpl['contact']['message']) : ?>
	<p id="contact_message" class="object_desc"><?php echo $tpl['format_text']($tpl['contact']['message']); ?></p>
<?php endif; ?>
	<p class="field">
		<label for="f_email">Email :</label>
		<input maxlength="255" id="f_email" name="f_email" type="text">
	</p>
	<p class="required field<?php if ($tpl['field_error'] == 'name') : ?> field_error<?php endif; ?>">
		<label for="name"><?php echo __('Votre nom :'); ?></label>
		<input required autofocus value="<?php echo $_POST['name'] ?? ''; ?>" id="name" name="name" type="text" maxlength="<?php echo $tpl['contact']['maxlength']['name']; ?>" class="large">
	</p>
	<p class="required field<?php if ($tpl['field_error'] == 'email') : ?> field_error<?php endif; ?>">
		<label for="email"><?php echo __('Votre adresse de courriel :'); ?></label>
		<input required value="<?php echo $_POST['email'] ?? ''; ?>" id="email" name="email" type="email" maxlength="<?php echo $tpl['contact']['maxlength']['email']; ?>" class="large">
	</p>
	<p class="required field<?php if ($tpl['field_error'] == 'subject') : ?> field_error<?php endif; ?>">
		<label for="subject"><?php echo __('Sujet de votre message :'); ?></label>
		<input required value="<?php echo $_POST['subject'] ?? ''; ?>" id="subject" name="subject" type="text" maxlength="<?php echo $tpl['contact']['maxlength']['subject']; ?>" class="large">
	</p>
	<p class="required field<?php if ($tpl['field_error'] == 'message') : ?> field_error<?php endif; ?>">
		<label for="message"><?php echo __('Votre message :'); ?></label>
		<textarea required maxlength="<?php echo $tpl['contact']['maxlength']['message']; ?>" rows="10" cols="25" id="message" name="message"><?php echo $_POST['message'] ?? ''; ?></textarea>
	</p>
	<br>
	<p class="message_info"><?php echo __('Les champs marqués d\'un astérisque sont obligatoires.'); ?></p>
	<p id="submit">
		<input name="anticsrf" type="hidden" value="<?php echo $tpl['anticsrf'](); ?>">
		<input class="button" name="send" type="submit" value="<?php echo __('Envoyer'); ?>">
	</p>
<?php endif; ?>
</form>