{*
  Template for the edit interface
  $Id: edit_candidates.tpl,v 1.00 2006/10/26 20:00:00
*}

<!-- {$smarty.template} -->
<div id="title">{if $myclub}<a href="show_clubs.php?id={$myclub}">{$club.longname}  - {$lang.season} {$nameseason.season}</a>{else} {/if}</div>
<div id="actions">
    <div id="barre-onglet">
{if $myclub}
	{if $myclub}
		<form action="show_clubs.php" method="get" name="show">
			<input type="hidden" name="id" value="{$myclub}" />
			<input type="submit" class="onglet" value="{$lang.view}" />
		</form>
		<form action="show_teams.php" name="editform">
				<input type="hidden" name="id" value="{$myclub}"/>
				<input type="submit" class="onglet" value="{$lang.teamplayers}" />
		</form>
		<form action="show_calendarteams.php" name="editform">
				<input type="hidden" name="id" value="{$myclub}"/>
				<input type="submit" class="onglet" value="{$lang.calendar}" />
		</form>
		{if $clubstats}
			<form action="stats_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$myclub}"/>
				<input class="onglet" type="submit" value="{$lang.statistics}" />
			</form>
		{/if}
	{/if}
	{if $seegallery}
        <form action="gallery.php" name="galleryform">
            <input type="hidden" name="subcat" value="{$myclub}"/>
            <input type="hidden" name="cat" value="2" />
            <input type="submit" value="{$lang.gallery}" class="onglet"/>
        </form>
	{/if}
	{if $commentable}
			<form action="comments.php" name="mkcommentform">
				<input type="hidden" name="subcat" value="{$myclub}"/>
				<input type="hidden" name="cat" value="2" />
				<input type="submit" value="{$lang.comments}" class="onglet"/>
			</form>
	{/if}
	{if $prev_id || $next_id}
			<form action="show_clubs.php" name="prevform">
				<input type="hidden" name="id" value="{$prev_id}"/>
				<input type="submit" class="onglet" value="<" {if !$prev_id}disabled="disabled"{/if} accesskey="," />
			</form>
			<form action="show_clubs.php" name="nextform">
				<input type="hidden" name="id" value="{$next_id}"/>
				<input type="submit" class="onglet" value=">" {if !$next_id}disabled="disabled"{/if} accesskey="." />
			</form>
	{/if}
 
	{if $seasonselect}
			<b>{$lang.seasons} :</b> <form action="edit_teams.php" name="seasonform">
			<input type="hidden" name="id" value="{$myclub}"/>
			<select name="season" onchange="submit();">
				<option value="0">---{$lang.season}---</option>
			{foreach item=season from=$seasonselect}
			{assign var="nextyear" value="`$season.season+1`"}
				<option value="{$season.id}" {if $season.id == $myseason}Selected{/if}>{$season.season} / {$nextyear}</option>
			{/foreach}
			</select>
			</form>
		{/if}
	</div>
	<!-- /actions -->
	{if $editable || $administrable}
	<div id="barre-season">
		{if $administrable}
		<form action="edit_clubs.php" name="editform">
				<input type="submit" value="{$lang.newdata}" class="onglet"/>
		</form>
		{/if}
		{if $editable || $administrable}
		<form action="edit_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$myclub}"/>
				<input type="submit" value="{$lang.edit}" class="onglet"/>
		</form>
		{/if}
		{if $administrable}
		<form action="delete.php" name="deleteform">
				<input type="hidden" name="id" value="{$myclub}"/>
				<input type="hidden" name="cat" value="1"/>
				<input type="submit" value="{$lang.del}" onclick="return(confirm('{$nameclub|escape:javascript}: {$lang.mag_really_del}?'))" class="onglet"/>
		</form>
		{/if}
		{if $editable || $administrable}
		<form action="edit_teams.php" name="matchsform">
				<input type="hidden" name="id" value="{$myclub}"/>
				<input type="hidden" name="season" value="{$myseason}"/>				
				<input type="submit" value="{$lang.editteams}" class="onglet"/>
		</form>
		{/if}
	</div>
	{/if}
{/if}
</div>

<script language="JavaScript" type="text/javascript" src="javascript/edit.js"></script>


{if $http_error}<div class="center">{$http_error}</div>{/if}



<div id="pagecontent">
<form action="edit_teams.php" id="edi" name="edi" method="post" onSubmit="javascript:return CheckAlbumForm(this,'{$lang.wanttochange}','{$lang.mustbe2}');">
<input type="hidden" name="myclub" id="myclub" value="{$myclub}" />
<input type="hidden" name="season" id="season" value="{$myseason}" />
<input type="hidden" name="save" id="save" value="1" />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
      <td class="td-value" align="right">
		  <h3>{$lang.players}:</h3><br>
		  <select size="25" style="width:250px;" name="players" ondblclick="Ajouter(this.form.players,this.form.candidate)">
			{foreach item=player from=$players}
			<option value="{$player.id}">{$player.lastname} - {$player.firstname}</option>
			{/foreach}
		  </select>			  
      </td>
	  
	  <td class="td-opt" style="vertical-align:middle" align="center">
	  <input type="button" class="button" onclick="Ajouter(this.form.players,this.form.candidate)" value="{$lang.add} >>"><br><br>
	  <input type="button" class="button" onclick="Effacer(this.form.candidate,this.form.players)" value="<< {$lang.del}">
	  </td>
      <td class="td-value" align="left">
		  <h3>{$lang.players}:</h3><br>
		  <select size="25" style="width:250px;" id="candidate" name="candidate[]" multiple="yes" ondblclick="Effacer(this.form.candidate,this.form.players)">
			{foreach item=teamplayer from=$teamplayers}
			<option value='{$teamplayer.id}'>{$teamplayer.lastname} {$teamplayer.firstname}</option>
			{/foreach}
		  </select>
      </td>   
   </tr>
   <tr>
	<td class="td-value" colspan="3">	
		<div id="barre-season">
		  <input style="width:100%;" type="submit" class="btn-search" value="{$lang.save}" id="savebutton" accesskey="s" />
		</div>
	</td>
	</tr> 
</table>
</form>
</div>

<!-- /content -->
