<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc">
	<xsl:import href="../../xslc.xsl"/>
	<xsl:import href="../../Common.xsl"/>
	<xsl:template match="/">
		<xsl:apply-templates select="document"/>
	</xsl:template>
	<xsl:template match="document">
		<xsl:call-template name="xslc:Page">
			<xsl:with-param name="Body">
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:apply-templates select="Annonceurs"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="Annonceurs">
		<xsl:variable name="vAction">
			<xsl:if test="not(/document/Params/idAnnonceur=-1)">UpdateAnnonceurs</xsl:if>
			<xsl:if test="/document/Params/idAnnonceur=-1">InsertAnnonceurs</xsl:if>
		</xsl:variable>
		<xsl:variable name="vGroup">
			<xsl:if test="not(/document/Params/idAnnonceur=-1)">
				<xsl:value-of select="cGroup"/>
			</xsl:if>
			<xsl:if test="/document/Params/idAnnonceur=-1">
				<xsl:value-of select="/document/Params/SelGroup"/>
			</xsl:if>
		</xsl:variable>
		<xsl:variable name="vID">
			<xsl:value-of select="idAnnonceur"/>
			<xsl:if test="idAnnonceur=''">0</xsl:if>
		</xsl:variable>
		<form name="MainForm" method="POST" action="{/document/Aliases/bdVODLL}{$vAction}">
			<input type="hidden" name="idAnnonceur" value="{$vID}"/>
			<input type="hidden" name="cGroup" value="{$vGroup}"/>
			<table border="0" cellpadding="2" cellspacing="0" width="100%">
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">cGroup:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="cGroup" size="40" value="{$vGroup}"/>
					</td>
				</tr>
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">CodeAnnonceur:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="CodeAnnonceur" size="40" value="{CodeAnnonceur}"/>
					</td>
				</tr>
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">LibelleAnnonceur:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="LibelleAnnonceur" size="40" value="{LibelleAnnonceur}"/>
					</td>
				</tr>
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">URLAnnonceur:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="URLAnnonceur" size="40" value="{URLAnnonceur}"/>
					</td>
				</tr>
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">InfoAnnonceur:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="InfoAnnonceur" size="40" value="{InfoAnnonceur}"/>
					</td>
				</tr>
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">EmailAnnonceur:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="EmailAnnonceur" size="40" value="{EmailAnnonceur}"/>
					</td>
				</tr>
				<tr>
					<td nowrap="">
						<span class="clFieldCaption">Quota:</span>
					</td>
					<td style="padding-left: 10px" width="100%">
						<input type="text" class="clFlatTextInput" name="Quota" size="40" value="{vLimite}"/>
					</td>
				</tr>
				<tr>
					<td> </td>
					<td style="padding-left: 8px">
						<xsl:if test="/document/Params/idAnnonceur=-1">
							<xsl:call-template name="xslc:ButtonPad"/>
						</xsl:if>
						<xsl:if test="/document/Params/idAnnonceur!=-1">
							<xsl:call-template name="xslc:ButtonPad">
								<xsl:with-param name="DeleteAction">
									<xsl:value-of select="/document/Aliases/DLL"/>DeleteAnnonceurs</xsl:with-param>
							</xsl:call-template>
						</xsl:if>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>
</xsl:stylesheet>
