<form class="standard" id="member_page_edit" action="<?php echo $tpl['current_url_pageless']; ?>" method="post" autocomplete="off">
	<h3 class="icon"><?php echo __('Modifier mes informations'); ?></h3>

<?php include(__DIR__ . '/report.tpl.php'); ?>
<?php $required = FALSE; ?>

<?php if ($tpl['profile_params']['nickname']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'nickname') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['nickname']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="nickname"><?php echo __('Pseudonyme (s\'affichera à la place du nom d\'utilisateur) :'); ?></label>
		<input<?php if ($tpl['profile_params']['nickname']['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['nickname']; ?>" maxlength="<?php echo $tpl['profile_params']['nickname']['maxlength']; ?>" id="nickname" name="nickname" type="text">
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['name']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'name') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['name']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="name"><?php echo __('Nom :'); ?></label>
		<input<?php if ($tpl['profile_params']['name']['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['name']; ?>" maxlength="<?php echo $tpl['profile_params']['name']['maxlength']; ?>" id="name" name="name" type="text">
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['firstname']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'firstname') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['firstname']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="firstname"><?php echo __('Prénom :'); ?></label>
		<input<?php if ($tpl['profile_params']['firstname']['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['firstname']; ?>" maxlength="<?php echo $tpl['profile_params']['firstname']['maxlength']; ?>" id="firstname" name="firstname" type="text">
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['gender']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'gender') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['gender']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="gender"><?php echo __('Genre :'); ?></label>
		<br>
		<select<?php if ($tpl['profile_params']['gender']['required']) : ?> required<?php endif; ?> autofocus name="gender" id="gender">
<?php foreach ($tpl['profile']['gender'] as &$i) : ?>
			<option<?php if ($i['current']) : ?> selected<?php endif; ?> value="<?php echo $i['value']; ?>"><?php echo $i['text']; ?></option>
<?php endforeach; ?>
		</select>
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['birthdate']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'birthdate') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['birthdate']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="birthdate_year"><?php echo __('Date de naissance :'); ?></label>
		<br>
		<input<?php if ($tpl['profile_params']['birthdate']['required']) : ?> required<?php endif; ?> autofocus name="birthdate_year" class="dt_year" type="number" min="1900" max="<?php echo date('Y'); ?>" placeholder="<?php echo __('Année'); ?>" value="<?php echo $tpl['profile']['birthdate_year']; ?>" id="birthdate_year">
		<span>-</span>
		<input<?php if ($tpl['profile_params']['birthdate']['required']) : ?> required<?php endif; ?> name="birthdate_month" class="dt_month" type="number" min="1" max="12" placeholder="<?php echo __('Mois'); ?>" value="<?php echo $tpl['profile']['birthdate_month'] !== '' ? sprintf("%'.02d", $tpl['profile']['birthdate_month']) : ''; ?>">
		<span>-</span>
		<input<?php if ($tpl['profile_params']['birthdate']['required']) : ?> required<?php endif; ?> name="birthdate_day" class="dt_day" type="number" min="1" max="31" placeholder="<?php echo __('Jour'); ?>" value="<?php echo $tpl['profile']['birthdate_day'] !== '' ? sprintf("%'.02d", $tpl['profile']['birthdate_day']) : ''; ?>">
		<a href="javascript:;" class="js dt_reset">&#xe916;</a>
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['location']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'location') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['location']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="location"><?php echo __('Localisation :'); ?></label>
		<input<?php if ($tpl['profile_params']['location']['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['location']; ?>" maxlength="<?php echo $tpl['profile_params']['location']['maxlength']; ?>" id="location" name="location" type="text">
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['email']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'email') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['email']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="email"><?php echo __('Courriel :'); ?></label>
		<input<?php if ($tpl['profile_params']['email']['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['email']; ?>" maxlength="<?php echo $tpl['profile_params']['email']['maxlength']; ?>" id="email" name="email" type="email">
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['website']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'website') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['website']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="website"><?php echo __('Site Web :'); ?></label>
		<input<?php if ($tpl['profile_params']['website']['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['website']; ?>" maxlength="<?php echo $tpl['profile_params']['website']['maxlength']; ?>" id="website" name="website" type="url">
	</p>
<?php endif; ?>
<?php if ($tpl['profile_params']['description']['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'description') : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['description']['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="description"><?php echo __('Description :'); ?></label>
		<textarea<?php if ($tpl['profile_params']['description']['required']) : ?> required<?php endif; ?> autofocus maxlength="<?php echo $tpl['profile_params']['description']['maxlength']; ?>" rows="6" cols="50" id="description" name="description"><?php echo $tpl['profile']['description']; ?></textarea>
	</p>
<?php endif; ?>
<?php for ($n = 1; $n <= 5; $n++) : ?>
<?php if ($tpl['profile_params']['custom_' . $n]['activated']) : ?>
	<p class="field<?php if ($tpl['field_error'] == 'custom_' . $n) : ?> field_error<?php endif; ?><?php if ($tpl['profile_params']['custom_' . $n]['required']) : $required = TRUE; ?> required<?php endif; ?>">
		<label for="custom_<?php echo $n; ?>"><?php echo $tpl['profile_params']['custom_' . $n]['name']; ?> :</label>
		<input<?php if ($tpl['profile_params']['custom_' . $n]['required']) : ?> required<?php endif; ?> autofocus class="large" value="<?php echo $tpl['profile']['custom_' . $n]; ?>" maxlength="<?php echo $tpl['profile_params']['custom_' . $n]['maxlength']; ?>" id="custom_<?php echo $n; ?>" name="custom_<?php echo $n; ?>" type="text">
	</p>
<?php endif; ?>
<?php endfor; ?>
	<br>
<?php if ($required) : ?>
	<p class="message_info"><?php echo __('Les champs marqués d\'un astérisque sont obligatoires.'); ?></p>
<?php endif; ?>
	<p id="submit">
		<input name="anticsrf" type="hidden" value="<?php echo $tpl['anticsrf'](); ?>">
		<input class="button" name="edit" type="submit" value="<?php echo __('Enregistrer'); ?>">
	</p>
</form>