1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:31 |
4 |
|
|
require_once ("../gen/obj/blocnote.class.php"); |
5 |
|
|
|
6 |
|
|
class blocnote extends blocnote_gen { |
7 |
|
|
|
8 |
fraynaud |
20 |
function blocnote($id,&$db,$debug) { |
9 |
|
|
$this->constructeur($id,$db,$debug); |
10 |
|
|
}// fin constructeur |
11 |
|
|
|
12 |
|
|
function verifier(){ |
13 |
|
|
$this->correct=True; |
14 |
|
|
$imgv=""; |
15 |
|
|
$f=" ! "; |
16 |
fraynaud |
116 |
$imgv="<img src='../app/img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
17 |
fraynaud |
20 |
if ($this->valF['note']==""){ |
18 |
|
|
$this->correct=false; |
19 |
|
|
$this->msg= $this->msg.$imgv._("note")." "._("obligatoire").$f; |
20 |
|
|
} |
21 |
|
|
} |
22 |
fraynaud |
3 |
|
23 |
fraynaud |
20 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){ |
24 |
|
|
if ($validation==0) { |
25 |
|
|
if ($maj == 0){ |
26 |
|
|
$form->setVal("dossier", $idxformulaire); |
27 |
|
|
} |
28 |
|
|
} |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
function setType(&$form,$maj) { |
32 |
|
|
if ($maj < 2) { |
33 |
|
|
$form->setType('blocnote', 'hidden'); |
34 |
|
|
$form->setType('categorie', 'select'); |
35 |
|
|
$form->setType('note', 'textarea'); |
36 |
|
|
$form->setType('dossier', 'hiddenstatic'); |
37 |
|
|
if($maj==0) |
38 |
|
|
$form->setType('blocnote', 'hidden'); |
39 |
|
|
else |
40 |
|
|
$form->setType('blocnote', 'hiddenstatic'); |
41 |
|
|
}else{ |
42 |
|
|
$form->setType('blocnote', 'hiddenstatic'); |
43 |
|
|
$form->setType('destination', 'hiddenstatic'); |
44 |
|
|
$form->setType('dossier', 'hiddenstatic'); |
45 |
|
|
} |
46 |
|
|
} |
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
function setSelect(&$form, $maj,$db,$debug) { |
51 |
|
|
$contenu=array(); |
52 |
|
|
$contenu[0]=array(_('divers'),_('amenagement'), |
53 |
fraynaud |
273 |
_('construction'),_('demolition'),_('contentieux')); |
54 |
fraynaud |
20 |
$contenu[1]=array(_('divers'),_('amenagement'), |
55 |
fraynaud |
273 |
_('construction'),_('demolition'),_('contentieux')); |
56 |
fraynaud |
20 |
$form->setSelect("categorie",$contenu); |
57 |
|
|
} |
58 |
|
|
|
59 |
|
|
function setTaille(&$form,$maj){ |
60 |
|
|
$form->setTaille('blocnote', 8); |
61 |
|
|
$form->setTaille('categorie', 20); |
62 |
|
|
$form->setTaille('note', 100); |
63 |
|
|
$form->setTaille('dossier', 12); |
64 |
|
|
} |
65 |
|
|
|
66 |
|
|
function setMax(&$form,$maj){ |
67 |
|
|
$form->setMax('blocnote', 8); |
68 |
|
|
$form->setMax('categorie', 20); |
69 |
|
|
$form->setMax('dossier', 12); |
70 |
|
|
$form->setMax('note', 10); |
71 |
|
|
} |
72 |
fraynaud |
3 |
}// fin classe |
73 |
fraynaud |
273 |
?> |