1 |
mbroquet |
3730 |
<?php |
2 |
|
|
//$Id: service.class.php 5226 2015-09-29 08:55:21Z nmeucci $ |
3 |
|
|
//gen openMairie le 10/02/2011 20:36 |
4 |
|
|
require_once ("../gen/obj/service.class.php"); |
5 |
|
|
|
6 |
|
|
class service extends service_gen { |
7 |
|
|
|
8 |
|
|
function service($id,&$db,$debug) { |
9 |
|
|
$this->constructeur($id,$db,$debug); |
10 |
|
|
}// fin constructeur |
11 |
|
|
|
12 |
|
|
function setType(&$form,$maj) { |
13 |
|
|
parent::setType($form,$maj); |
14 |
|
|
if ($maj < 2) { |
15 |
|
|
$form->setType('type_consultation', 'select'); |
16 |
|
|
$form->setType('edition', 'select'); |
17 |
|
|
$form->setType('delai_type', 'select'); |
18 |
|
|
} |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
function setSelect(&$form, $maj,$db,$debug) { |
22 |
|
|
parent::setSelect($form, $maj, $db, $debug) ; |
23 |
|
|
|
24 |
|
|
$contenu=array(); |
25 |
|
|
|
26 |
|
|
$contenu[0]=array( |
27 |
|
|
'avec_avis_attendu', |
28 |
|
|
'pour_conformite', |
29 |
|
|
'pour_information', |
30 |
|
|
); |
31 |
|
|
|
32 |
|
|
$contenu[1]=array( |
33 |
|
|
_('Avec avis attendu'), |
34 |
|
|
_('Pour conformite'), |
35 |
|
|
_('Pour information'), |
36 |
|
|
|
37 |
|
|
); |
38 |
|
|
$form->setSelect("type_consultation",$contenu); |
39 |
|
|
|
40 |
|
|
// |
41 |
|
|
$contenu = array(); |
42 |
|
|
$contenu[0] = array('mois','jour'); |
43 |
|
|
$contenu[1] = array(_('mois'), _('jour')); |
44 |
|
|
$form->setSelect("delai_type", $contenu); |
45 |
|
|
} |
46 |
|
|
|
47 |
|
|
function setVal(&$form,$maj,$validation){ |
48 |
|
|
parent::setVal($form, $maj, $validation); |
49 |
|
|
|
50 |
|
|
if ($maj > 1){ |
51 |
|
|
//Traitement des données pour l'affichage du select |
52 |
|
|
$temp = $this->val[array_search('type_consultation', array_keys($form->val))]; |
53 |
|
|
|
54 |
|
|
if ( strcmp($temp, 'pour_information') == 0 ){ |
55 |
|
|
|
56 |
|
|
$temp = _('Pour information'); |
57 |
|
|
|
58 |
|
|
}elseif( strcmp($temp, 'avec_avis_attendu') == 0 ) { |
59 |
|
|
|
60 |
|
|
$temp = _('Avec avis attendu'); |
61 |
|
|
|
62 |
|
|
}elseif( strcmp($temp, 'pour_conformite') == 0 ) { |
63 |
|
|
|
64 |
|
|
$temp = _('Pour conformite'); |
65 |
|
|
|
66 |
|
|
} |
67 |
|
|
|
68 |
|
|
$form->setVal('type_consultation', $temp); |
69 |
|
|
} |
70 |
|
|
} |
71 |
|
|
|
72 |
|
|
function setLib(&$form,$maj) { |
73 |
|
|
// |
74 |
|
|
parent::setLib($form, $maj); |
75 |
|
|
$form->setLib("edition",_("type d'edition de la consultation")); |
76 |
|
|
} |
77 |
|
|
}// fin classe |
78 |
|
|
?> |