<!--
	Copyright (C) 2004 Orbeon, Inc.
	
	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU Lesser General Public License as published by the Free Software Foundation; either version
	2.1 of the License, or (at your option) any later version.
	
	This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
	without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
	See the GNU Lesser General Public License for more details.
	
	The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
-->
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xforms="http://www.w3.org/2002/xforms"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
	xmlns:f="http://orbeon.org/oxf/xml/formatting" xsl:version="2.0">
	<head>
		<title>Formation Orbeon</title>
	</head>
	<body>

		<div align="center">
			<center>
				<h1>STEP 3 : FORMATIONS ET DIPLOMES</h1>
			</center>
		</div>
		<br />
		<br />
		<br />
		<center>
			<xforms:group ref='/form'
				xxforms:show-errors="{doc('input:instance')/form/show-errors = 'true'}">
				<table>
					<tr>
						<td colspan='3' bgcolor='CC99FF'
							style="ont-weight: bold; text-align: center">
							Domaine d'activitee :
						</td>
						<td>
							<xforms:select1 ref="formations/fonction-actuelle"
								appearance='minimal'>
								<xforms:item>
									<xforms:label>Finance</xforms:label>
									<xforms:value>finance</xforms:value>
								</xforms:item>
								<xforms:item>
									<xforms:label>
										Informatique
									</xforms:label>
									<xforms:value>
										informatique
									</xforms:value>
								</xforms:item>
								<xforms:item>
									<xforms:label>
										Electrique
									</xforms:label>
									<xforms:value>
										electrique
									</xforms:value>
								</xforms:item>
								<xforms:item>
									<xforms:label>
										Mecanique
									</xforms:label>
									<xforms:value>
										mecanique
									</xforms:value>
								</xforms:item>
							</xforms:select1>
						</td>
					</tr>
				</table>
				<!--         </xforms:group>-->
				<!--         <xforms:group ref='/form/formations/diplomes' xxforms:show-errors="{doc('input:instance')/form/show-errors = 'true'}">-->
				<br />
				<table>
					<tr bgcolor='99CCFF'
						style="ont-weight: bold; text-align: center">
						<td>Intitule Diplome</td>
						<td>Annee Obtention</td>
						<td>Mention</td>
						<td>Action</td>
					</tr>

					<xforms:repeat
						nodeset="formations/diplomes/diplome [position() &lt; last()] "
						id="diplomeSet">
						<tr>
							<td>
								<xforms:input ref="intitule">
									<xforms:alert>Error</xforms:alert>
									<xforms:hint>
										l'intitule du diplome
									</xforms:hint>
								</xforms:input>
							</td>
							<td>
								<xforms:input ref="annee">
									<xforms:alert>Error</xforms:alert>
									<xforms:hint>
										L'annee de l'obtention du
										diplome
									</xforms:hint>
								</xforms:input>
							</td>
							<td>
								<xforms:input ref="mention">
									<xforms:alert>Error</xforms:alert>
									<xforms:hint>
										Mention du diplome
									</xforms:hint>
								</xforms:input>
							</td>
							<td align='center'>
								<xforms:submit>
									<xforms:label>X</xforms:label>
									<xforms:delete
										nodeset="/form/formations/diplomes/diplome"
										at="index('diplomeSet')" />
								</xforms:submit>
							</td>
						</tr>
					</xforms:repeat>
					<tr>
						<td colspan='4' align='center'>
							<xforms:submit>
								<xforms:label>Ajouter un diplome</xforms:label>
								<xforms:insert
									nodeset="/form/formations/diplomes/diplome" at="last()"
									position="after" />
							</xforms:submit>
						</td>
					</tr>
				</table>
				<br />
				<br />
				<table>
					<tr>
						<td>
							<xforms:submit>
								<xforms:label>Enregistrer et Afficher Donnees</xforms:label>
					            <xforms:setvalue ref="action">displayData</xforms:setvalue>
							</xforms:submit>
						</td>
						<td>
							<xforms:submit>
								<xforms:label>Quitter</xforms:label>
					            <xforms:setvalue ref="action">annule</xforms:setvalue>
							</xforms:submit>
						</td>

					</tr>
				</table>
			</xforms:group>
		</center>
		<br />
		<f:xml-source>
			<xsl:copy-of select="doc('input:instance')/form/*" />
		</f:xml-source>

	</body>
</html>
