Plugins  LAST
 All Data Structures Files Functions Variables Pages
tool_exercice_input.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of NOALYSS.
5  *
6  * NOALYSS 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  * NOALYSS 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 NOALYSS; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 /* $Revision$ */
21 
22 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
23 
24 /**
25  * @file
26  * @brief Input data for new Exercice
27  *
28  */
29 ?>
30 <form method="POST" onsubmit="return validate()">
31  <table>
32  <tr>
33  <td>
34  Exercice
35  </td>
36  <td>
37  <?php echo $exercice->input()?>
38  </td>
39  </tr>
40  <tr>
41  <td>
42  Année
43  </td>
44  <td>
45  <?php echo $year->input()?>
46  </td>
47  </tr>
48  <tr>
49  <td>
50  Nombre de mois
51  </td>
52  <td>
53  <?php echo $nb_month->input()?>
54  </td>
55  </tr>
56  <tr>
57  <td>
58  A partir du mois de
59  </td>
60  <td>
61  <?php echo $from->input()?>
62  </td>
63  </tr>
64  </table>
65 <?php
66 echo HtmlInput::submit('save','Valider');
67 echo HtmlInput::request_to_hidden(array('sa','ac','plugin_code','gDossier'));
68 ?>
69 </form>
70 <script charset="UTF8" lang="javascript">
71  function validate()
72  {
73  if (trim($('<?php echo $exercice->id?>').value)=='') {
74  $('<?php echo $exercice->id?>').style.borderColor='red';
75  alert('Exercice invalide');
76  return false;
77  }
78  if (trim($('<?php echo $nb_month->id?>').value)=='') {
79  $('<?php echo $nb_month->id?>').style.borderColor='red';
80  alert('Nombre de mois invalide');
81  return false;
82  }
83  if (trim($('<?php echo $year->id?>').value)=='') {
84  $('<?php echo $year->id?>').style.borderColor='red';
85  alert('Année invalide');
86  return false;
87  }
88  }
89 </script>
$note style
if(isset($_POST['save'])) $exercice
$p_year value
$categorie_appel table