1 |
<?php |
2 |
/** |
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 |
|
11 |
require_once "../gen/obj/phase.class.php"; |
12 |
|
13 |
class phase extends phase_gen { |
14 |
|
15 |
/** |
16 |
* SETTER_FORM - setVal (setVal). |
17 |
* |
18 |
* @return void |
19 |
*/ |
20 |
function setVal(&$form, $maj, $validation, &$dnu1 = null, $dnu2 = null) { |
21 |
parent::setVal($form, $maj, $validation); |
22 |
// |
23 |
$this->set_om_validite_debut_today($form, $maj, $validation); |
24 |
} |
25 |
|
26 |
/** |
27 |
* SETTER_FORM - setValsousformulaire (setVal). |
28 |
* |
29 |
* @return void |
30 |
*/ |
31 |
function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$dnu1 = null, $dnu2 = null) { |
32 |
parent::setValsousformulaire($form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire); |
33 |
// |
34 |
$this->set_om_validite_debut_today($form, $maj, $validation); |
35 |
} |
36 |
|
37 |
/** |
38 |
* SETTER_FORM - set_om_validite_debut_today (setVal). |
39 |
* |
40 |
* @return void |
41 |
*/ |
42 |
private function set_om_validite_debut_today(&$form, $maj, $validation) { |
43 |
if ($validation == 0 && $maj == 0) { |
44 |
$form->setVal("om_validite_debut", date("d/m/Y")); |
45 |
} |
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 |
$ent = __("parametrage")." -> ".__("Gestion des dossiers")." -> ".__("phase"); |
59 |
|
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 |
$ent .= " ".mb_strtoupper($this->getVal("code"), 'UTF-8'); |
68 |
} |
69 |
|
70 |
// Change le fil d'Ariane |
71 |
return $ent; |
72 |
} |
73 |
|
74 |
} |
75 |
|
76 |
|