1 |
fraynaud |
168 |
<?php |
2 |
|
|
//$Id$ |
3 |
fraynaud |
170 |
//gen openMairie le 04/10/2011 17:45 |
4 |
fraynaud |
168 |
require_once ("../gen/obj/parametre.class.php"); |
5 |
|
|
|
6 |
|
|
class parametre extends parametre_gen { |
7 |
|
|
|
8 |
|
|
function parametre($id,&$db,$debug) { |
9 |
|
|
$this->constructeur($id,$db,$debug); |
10 |
|
|
}// fin constructeur |
11 |
|
|
|
12 |
fraynaud |
195 |
function setvalF($val){ |
13 |
|
|
parent::setvalF($val); |
14 |
|
|
if(!is_numeric($val['delai'])) unset ($this->valF['delai']); |
15 |
|
|
if(!is_numeric($val['longueur_champ'])) unset ($this->valF['longueur_champ']); |
16 |
|
|
} |
17 |
|
|
|
18 |
fraynaud |
170 |
function setType(&$form,$maj) { |
19 |
|
|
parent :: setType($form,$maj); |
20 |
|
|
if ($maj < 2) { //ajouter et modifier |
21 |
|
|
$form->setType('sitadel', 'checkbox'); |
22 |
|
|
$form->setType('actif', 'checkbox'); |
23 |
fraynaud |
195 |
$form->setType('type_champ', 'select'); |
24 |
fraynaud |
170 |
} |
25 |
|
|
} |
26 |
|
|
|
27 |
fraynaud |
195 |
function setMax(&$form,$maj){ |
28 |
|
|
parent :: setMax($form,$maj); |
29 |
|
|
$form->setMax('libelle', 50); |
30 |
|
|
$form->setMax('valeur_autorisee', 50); |
31 |
|
|
} |
32 |
fraynaud |
170 |
|
33 |
fraynaud |
195 |
function setTaille(&$form,$maj){ |
34 |
|
|
parent :: setTaille($form,$maj); |
35 |
|
|
$form->setTaille('libelle', 50); |
36 |
|
|
$form->setTaille('valeur_autorisee', 50); |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
function setSelect(&$form, $maj,&$db,$debug) { |
40 |
|
|
parent:: setSelect($form, $maj,$db,$debug) ; |
41 |
|
|
$contenu=array(); |
42 |
|
|
$contenu[0]=array('text','numeric','select'); |
43 |
|
|
$contenu[1]=array('text','numeric','select'); |
44 |
|
|
$form->setSelect("type_champ",$contenu); |
45 |
|
|
} |
46 |
fraynaud |
168 |
}// fin classe |
47 |
|
|
?> |