1 |
softime |
3834 |
<?php |
2 |
nhaye |
5254 |
/** |
3 |
|
|
* DBFORM - 'phase' - Surcharge gen. |
4 |
|
|
* |
5 |
|
|
* Ce script permet de définir la classe 'phase'. |
6 |
|
|
* |
7 |
|
|
* @package openads |
8 |
|
|
* @version SVN : $Id$ |
9 |
|
|
*/ |
10 |
softime |
3834 |
|
11 |
|
|
require_once "../gen/obj/phase.class.php"; |
12 |
|
|
|
13 |
|
|
class phase extends phase_gen { |
14 |
|
|
|
15 |
nhaye |
5254 |
/** |
16 |
softime |
8989 |
* SETTER_FORM - setVal (setVal). |
17 |
softime |
3834 |
* |
18 |
|
|
* @return void |
19 |
|
|
*/ |
20 |
softime |
8989 |
function setVal(&$form, $maj, $validation, &$dnu1 = null, $dnu2 = null) { |
21 |
|
|
parent::setVal($form, $maj, $validation); |
22 |
softime |
3834 |
// |
23 |
|
|
$this->set_om_validite_debut_today($form, $maj, $validation); |
24 |
|
|
} |
25 |
|
|
|
26 |
|
|
/** |
27 |
softime |
8989 |
* SETTER_FORM - setValsousformulaire (setVal). |
28 |
softime |
3834 |
* |
29 |
|
|
* @return void |
30 |
|
|
*/ |
31 |
softime |
8989 |
function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$dnu1 = null, $dnu2 = null) { |
32 |
|
|
parent::setValsousformulaire($form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire); |
33 |
softime |
3834 |
// |
34 |
|
|
$this->set_om_validite_debut_today($form, $maj, $validation); |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
/** |
38 |
softime |
8989 |
* SETTER_FORM - set_om_validite_debut_today (setVal). |
39 |
softime |
3834 |
* |
40 |
|
|
* @return void |
41 |
|
|
*/ |
42 |
|
|
private function set_om_validite_debut_today(&$form, $maj, $validation) { |
43 |
|
|
if ($validation == 0 && $maj == 0) { |
44 |
softime |
8989 |
$form->setVal("om_validite_debut", date("d/m/Y")); |
45 |
softime |
3834 |
} |
46 |
|
|
} |
47 |
|
|
|
48 |
|
|
/** |
49 |
|
|
* Permet de modifier le fil d'Ariane. |
50 |
|
|
* |
51 |
|
|
* @param string $ent Fil d'Ariane. |
52 |
|
|
* |
53 |
|
|
* @return string |
54 |
|
|
*/ |
55 |
|
|
public function getFormTitle($ent) { |
56 |
|
|
|
57 |
|
|
// Fil d'ariane par défaut |
58 |
softime |
18876 |
$ent = __("parametrage")." -> ".__("Gestion des dossiers")." -> ".__("phase"); |
59 |
softime |
3834 |
|
60 |
|
|
// Si différent de l'ajout |
61 |
|
|
if($this->getParameter("maj") != 0) { |
62 |
|
|
|
63 |
|
|
// Affiche la clé primaire |
64 |
|
|
$ent .= " -> ".$this->getVal("phase"); |
65 |
|
|
|
66 |
|
|
// Affiche le libellé de la phase |
67 |
jymadier |
3884 |
$ent .= " ".mb_strtoupper($this->getVal("code"), 'UTF-8'); |
68 |
softime |
3834 |
} |
69 |
|
|
|
70 |
|
|
// Change le fil d'Ariane |
71 |
|
|
return $ent; |
72 |
|
|
} |
73 |
|
|
|
74 |
|
|
} |
75 |
|
|
|
76 |
softime |
7996 |
|