diff --git a/class/client.php b/class/client.php index 71a774765887e684c13d0a051504711405a263a8..f4caeb13d70920a653ba2a6ae07a662c10afef40 100644 --- a/class/client.php +++ b/class/client.php @@ -2,6 +2,13 @@ class Client extends Personne { + + public $_specialFields = array( + "num_tel" => array( + "t" => "PhoneField", + "label" => "Numero de telephone", + )); + protected $num_tel; public function num_tel() @@ -13,4 +20,5 @@ class Client extends Personne { $this->num_tel = $num_tel; } + } \ No newline at end of file diff --git a/class/phonefield.php b/class/phonefield.php index 838b2e136b2a254309b1d09f246a5eb903817db0..ca8109821e3d165a22d843e05152c54877bc6b56 100644 --- a/class/phonefield.php +++ b/class/phonefield.php @@ -25,4 +25,13 @@ class PhoneField extends Field return false; } + public function show() { + $num = $this->value; + $html = ""; + for($i = 0; i < 5; i++) { + $html += substr($num, 2*$i, 2); + $html += "."; + } + return $html; + } }