Skip to content

Instantly share code, notes, and snippets.

@maximelebreton
Created March 6, 2013 15:30
Show Gist options
  • Save maximelebreton/5100107 to your computer and use it in GitHub Desktop.
Save maximelebreton/5100107 to your computer and use it in GitHub Desktop.
Mieux gérer les messages d'erreur
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Test Plusieurs labels</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen">
</head>
<body>
<form action="index" method="post" onsubmit="alert('Formulaire de test,\nl\'envoi n\'est pas géré');return false;">
<h1>Rédaction d'un article</h1>
<div id="error_list">
<p><strong>Enregistrement impossible :</strong></p>
<ul>
<li><label for="auteur">Auteur</label> champ obligatoire</li>
<li><label for="categorie">Catégorie</label> champ obligatoire</li>
<li><label for="contenu">Contenu</label> 30 caractères minimum</li>
</ul>
</div>
<table>
<tfoot>
<tr>
<td colspan="3">
<p><input type="submit" value="Enregistrer"></p>
</td>
</tr>
</tfoot>
<tbody>
<tr class="error">
<th>
<label for="auteur">Auteur</label>
</th>
<td class="field">
<select id="auteur" name="auteur">
<option value="" selected="selected">Liste des auteurs</option>
<option>Pierre Brillault</option>
<option>Delphine Delaneau</option>
<option>Fabrice Delaneau</option>
<option>Éric Rogé</option>
</select>
</td>
<td class="error"><label for="auteur">Champ obligatoire</label></td>
</tr>
<tr class="error">
<th><label for="categorie">Catégorie</label></th>
<td class="field">
<select id="categorie" name="categorie">
<option value="" selected="selected">Liste des catégories</option>
<option>Concept</option>
<option>Design</option>
<option>Code</option>
</select>
</td>
<td class="error"><label for="categorie">Champ obligatoire</label></td>
</tr>
<tr>
<th><label for="titre">Titre</label></th>
<td class="field">
<input type="text" id="titre" name="titre" value="Lorem ipsum">
</td>
<td class="error"></td>
</tr>
<tr class="error">
<th><label for="contenu">Contenu</label></th>
<td class="field">
<textarea id="contenu" name="contenu" cols="30" rows="5">Dolor sit amet</textarea>
</td>
<td class="error"><label for="contenu">30 caractères minimum</label></td>
</tr>
</tbody>
</table>
</form>
<div id="sbi_camera_button" class="sbi_search" style="left: 0px; top: 0px; position: absolute; width: 29px; height: 27px; border: none; margin: 0px; padding: 0px; z-index: 2147483647; display: none;"></div></body><style type="text/css"></style></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment