1 {**************************************************************************}
3 {* Copyright (C) 2003-2009 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 {**************************************************************************}
23 {include core=table-editor.tpl}
25 <h1>Administration Polytechnique.org</h1>
28 <script type="text/javascript">
30 function del_grade( myid ) {
31 if (confirm ("You are about to delete this entry. Do you want to proceed?")) {
32 document.forms.form_grade.act.value = "del";
33 document.forms.form_grade.gid.value = myid;
34 document.forms.form_grade.submit();
42 <form method="post" action='{$t->pl}/edit/{$id}#form_grade' id='form_grade'>
50 {iterate from=$grades item=g}
51 <tr class="{cycle values="pair,impair"}">
54 <input type='text' size='65' value="{$g.text}" name="grades[{$g.gid}]" />
57 <input type='text' maxlength='2' value="{$g.pos}" name="pos[{$g.gid}]" />
60 <a href='javascript:del_grade({$g.gid})'>{icon name=delete title='supprimer grade'}</a>
64 <tr class="{cycle values="impair,pair"}">
67 <input type='text' size='65' name="grades[0]" />
70 <input type='text' maxlength='2' name="pos[0]" value="0" />
73 <a href='javascript:document.forms.form_grade.submit()'>{icon name=add title='nouveau grade'}</a>
76 <tr class="{cycle values="impair,pair"}">
77 <td colspan='4' class="center">
78 <input type='hidden' name='frm_id' value='{$smarty.post.frm_id}' />
79 <input type='hidden' name='action' value='{$smarty.post.action}' />
80 <input type='hidden' name='act' value='' />
81 <input type='hidden' name='gid' value='' />
82 <input type='submit' name='gr_sub' value='Enregistrer' />
88 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}