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 {**************************************************************************}
23 {include file="core/table-editor.tpl"}
25 <h1>Administration Polytechnique.org</h1>
28 <script type="text/javascript">
30 function new_grade() {
31 document.forms.form_grade.act.value = "new";
32 document.forms.form_grade.submit();
36 function del_grade( myid ) {
37 if (confirm ("You are about to delete this entry. Do you want to proceed?")) {
38 document.forms.form_grade.act.value = "del";
39 document.forms.form_grade.gid.value = myid;
40 document.forms.form_grade.submit();
48 <form method="post" action='{$t->pl}/edit/{$id}#form_grade' id='form_grade'>
61 <a href='javascript:new_grade()'>nouveau{icon name=add title='nouveau grade'}</a>
64 {iterate from=$grades item=g}
65 <tr class="{cycle values="pair,impair"}">
68 <input type='text' size='65' value="{$g.text}" name="grades[{$g.gid}]" />
71 <input type='text' maxlength='2' value="{$g.pos}" name="pos[{$g.gid}]" />
74 <a href='javascript:del_grade({$g.gid})'>{icon name=delete title='supprimer grade'}</a>
78 <tr class="{cycle values="impair,pair"}">
79 <td colspan='4' class="center">
80 <input type='hidden' name='frm_id' value='{$smarty.post.frm_id}' />
81 <input type='hidden' name='action' value='{$smarty.post.action}' />
82 <input type='hidden' name='act' value='' />
83 <input type='hidden' name='gid' value='' />
84 <input type='submit' name='gr_sub' value='Sauver' />
90 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}