Fixes #811: Improve interface to add medal ranks and avoid losing data
[platal.git] / templates / profile / admin_decos.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
179afa7f 3{* Copyright (C) 2003-2008 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
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. *}
10{* *}
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. *}
15{* *}
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 *}
20{* *}
21{**************************************************************************}
22
d02b8359 23{include file="core/table-editor.tpl"}
0337d704 24
25<h1>Administration Polytechnique.org</h1>
26
27{literal}
28<script type="text/javascript">
29 <!--
0337d704 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();
35 return true;
36 }
37 }
38 // -->
39</script>
40{/literal}
41
e7ae7df9 42<form method="post" action='{$t->pl}/edit/{$id}#form_grade' id='form_grade'>
0337d704 43 <table class='bicol'>
44 <tr>
45 <th>id</th>
a7de4ef7 46 <th>intitulé</th>
0337d704 47 <th>ordre</th>
48 <th>&nbsp;</th>
49 </tr>
0337d704 50 {iterate from=$grades item=g}
51 <tr class="{cycle values="pair,impair"}">
52 <td>{$g.gid}</td>
53 <td>
54 <input type='text' size='65' value="{$g.text}" name="grades[{$g.gid}]" />
55 </td>
56 <td>
57 <input type='text' maxlength='2' value="{$g.pos}" name="pos[{$g.gid}]" />
58 </td>
59 <td class='action'>
e7ae7df9 60 <a href='javascript:del_grade({$g.gid})'>{icon name=delete title='supprimer grade'}</a>
0337d704 61 </td>
62 </tr>
63 {/iterate}
64 <tr class="{cycle values="impair,pair"}">
154ee23a
OLF
65 <td></td>
66 <td>
67 <input type='text' size='65' name="grades[0]" />
68 </td>
69 <td>
70 <input type='text' maxlength='2' name="pos[0]" value="0" />
71 </td>
72 <td class='action'>
73 <a href='javascript:document.forms.form_grade.submit()'>{icon name=add title='nouveau grade'}</a>
74 </td>
75 </tr>
76 <tr class="{cycle values="impair,pair"}">
0337d704 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='' />
154ee23a 82 <input type='submit' name='gr_sub' value='Enregistrer' />
0337d704 83 </td>
84 </tr>
85 </table>
86</form>
87
a7de4ef7 88{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}