1 {**************************************************************************}
3 {* Copyright (C) 2003-2007 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
6 {* This program is free software; you can redistribute it and/or modify *}
7 {* it under the terms of the GNU General Public License as published by *}
8 {* the Free Software Foundation; either version 2 of the License, or *}
9 {* (at your option) any later version. *}
11 {* This program is distributed in the hope that it will be useful, *}
12 {* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13 {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14 {* GNU General Public License for more details. *}
16 {* You should have received a copy of the GNU General Public License *}
17 {* along with this program; if not, write to the Free Software *}
18 {* Foundation, Inc., *}
19 {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
21 {**************************************************************************}
25 <script type="text/javascript">//<![CDATA[
27 var year = gdt.getYear();
32 var oldMate = year >= {/literal}{$smarty.session.promo_sortie}{literal};
34 function printTitle(text)
37 document.write("ex-" + text);
45 var val = document.forms.prof_annu[type + '_sel'].value;
46 if (val == '0' || document.getElementById(type + '_' + val) != null) {
47 document.getElementById(type + '_add').style.display = 'none';
49 document.getElementById(type + '_add').style.display = '';
53 function remove(cat, id)
55 $('#' + cat + '_' + id).remove();
61 var cb = document.forms.prof_annu[cat + '_sel'];
63 var text = cb.options[cb.selectedIndex].text;
64 var html = '<tr id="' + cat + '_' + id + '">'
66 + ' <input type="hidden" name="' + cat + '[' + id + ']" value="' + text + '" />'
69 + ' <div style="float: left; width: 70%">'
72 + ' <a href="javascript:remove(\'' + cat + '\', ' + id + ')">'
73 + ' <img src="images/icons/cross.gif" alt="cross" title="Supprimer ce groupe" />'
77 $('#' + cat).after(html);
85 <table class="bicol" summary="Profil: Informations Polytechniciennes">
88 Informations polytechniciennes
92 <td colspan="2" class="flags">
93 <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
94 <span class="texte">privé</span>
98 <td class="titre" style="width: 30%">
99 <script type="text/javascript">printTitle("Section")</script>
102 <select name="section">
103 {select_db_table table="sections" valeur=$section}
110 <script type="text/javascript">printTitle("Binet(s)")</script>
113 <select name="binets_sel" onchange="update('binets')">
114 {select_db_table table="binets_def" valeur=0 champ="text" pad='1'}
116 <a id="binets_add" href="javascript:add('binets')">{icon name="add" title="Ajouter ce binet"}</a>
119 {foreach item=text key=bid from=$binets}
120 <tr id="binets_{$bid}">
122 <input type="hidden" name="binets[{$bid}]" value="{$text}" />
125 <div style="float: left; width: 70%">
128 <a href="javascript:remove('binets', {$bid})">{icon name="cross" title="Supprimer ce binet"}</a>
134 <td class="titre">Groupe(s) X</td>
136 <select name="groupesx_sel" onchange="update('groupesx')">
137 {select_db_table table="groupesx_def" valeur=0 champ="text" pad='1'}
139 <a id="groupesx_add" href="javascript:add('groupesx')">{icon name="add" title="Ajouter ce groupe X"}</a>
142 {foreach item=text key=bid from=$groupesx}
143 <tr id="groupesx_{$bid}">
145 <input type="hidden" name="groupesx[{$bid}]" value="{$text}" />
148 <div style="float: left; width: 70%">
151 <a href="javascript:remove('groupesx', {$bid})">{icon name="cross" title="Supprimer ce groupe X"}</a>
157 <script type="text/javascript">
162 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}