1 |
softime |
2715 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 03/01/2014 16:53 |
4 |
|
|
|
5 |
|
|
require_once ("../gen/obj/contrainte.class.php"); |
6 |
|
|
|
7 |
|
|
class contrainte extends contrainte_gen { |
8 |
|
|
|
9 |
|
|
function contrainte($id,&$db,$debug) { |
10 |
|
|
$this->constructeur($id,$db,$debug); |
11 |
|
|
}// fin constructeur |
12 |
|
|
|
13 |
|
|
/** |
14 |
|
|
* [setType description] |
15 |
|
|
* @param [type] $form [description] |
16 |
|
|
* @param [type] $maj [description] |
17 |
|
|
*/ |
18 |
|
|
function setType(&$form, $maj) { |
19 |
|
|
// |
20 |
|
|
parent::setType($form, $maj); |
21 |
|
|
|
22 |
|
|
// Champs cachés |
23 |
|
|
$form->setType('contrainte', 'hidden'); |
24 |
|
|
$form->setType('numero', 'hidden'); |
25 |
|
|
|
26 |
|
|
// En mode ajouter et modifier |
27 |
|
|
if ($maj < 2) { |
28 |
|
|
$form->setType('nature', 'select'); |
29 |
|
|
$form->setType('reference', 'hidden'); |
30 |
|
|
} |
31 |
|
|
} |
32 |
|
|
|
33 |
|
|
/** |
34 |
|
|
* [setSelect description] |
35 |
|
|
* @param [type] $form [description] |
36 |
|
|
* @param [type] $maj [description] |
37 |
|
|
* @param [type] $db [description] |
38 |
|
|
* @param [type] $debug [description] |
39 |
|
|
*/ |
40 |
|
|
function setSelect(&$form, $maj, $db, $debug) { |
41 |
|
|
// |
42 |
|
|
parent::setSelect($form, $maj, $db, $debug); |
43 |
|
|
|
44 |
|
|
// |
45 |
|
|
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) { |
46 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
47 |
|
|
} |
48 |
|
|
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) { |
49 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
// nature |
53 |
|
|
$form->setSelect("nature", $nature); |
54 |
|
|
} |
55 |
|
|
|
56 |
|
|
/** |
57 |
|
|
* [setLayout description] |
58 |
|
|
* @param [type] $form [description] |
59 |
|
|
* @param [type] $maj [description] |
60 |
|
|
*/ |
61 |
|
|
function setLayout(&$form, $maj) { |
62 |
|
|
|
63 |
|
|
// |
64 |
|
|
$form->setFieldset("libelle", "D", _("Contrainte")); |
65 |
|
|
$form->setFieldset("no_ordre", "F"); |
66 |
|
|
// |
67 |
|
|
$form->setFieldset("groupe", "D", _("Categorie")); |
68 |
|
|
$form->setFieldset("sousgroupe", "F"); |
69 |
|
|
// |
70 |
|
|
$form->setFieldset("texte", "D", _("Detail")); |
71 |
|
|
$form->setFieldset("om_validite_fin", "F"); |
72 |
|
|
|
73 |
|
|
} |
74 |
|
|
|
75 |
|
|
}// fin classe |
76 |
|
|
?> |