Skip to content
Snippets Groups Projects
Commit 714f58b4 authored by goujonpa's avatar goujonpa
Browse files

date ma gueule blabla bldiojdihidzgadzadzgzgadzgdgaadgzadzigu

parent 4f2a01bd
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,13 @@ class Animal extends Objet
),
"date_naissance" => array(
"i" => 8,
"label" => "Date de naissance"
"label" => "Date de naissance",
"t" => "DateField"
),
"date_deces" => array(
"i" => 9,
"label" => "Date de deces"
"label" => "Date de deces",
"t" => "DateField"
),
"sterile" => array(
"t" => "BoolField",
......
......@@ -2,6 +2,7 @@
class Client extends Personne
{
protected $num_tel;
public $_specialFields = array(
"num_tel" => array(
......@@ -9,8 +10,6 @@ class Client extends Personne
"label" => "Numero de telephone",
));
protected $num_tel;
public function num_tel()
{
return $this->num_tel;
......
......@@ -6,28 +6,18 @@ class DateField extends Field
// Todo, if isset($_POST[$this->name]) && !$this->validate() => Show a error msg explanation for this line.
$html = '<div class="form-group">
<label for="form'.$this->name.'">'.$this->label.'</label>
<input type="number" class="form-control" name="'.$this->name.'" value="'.$this->value.'">
<input type="date" class="form-control" name="'.$this->name.'" value="'.$this->value.'">
</div>';
return $html;
}
public function validate()
{
if (isset($_POST[$this->name]))
{
$this->value = $_POST[$this->name];
if ($this->value > -1) {
return true;
}
}
return false;
$this->value = $_POST[$this->name];
return true;
}
public function show() {
$prix = $this->value;
$html = (string)$prix;
$html .= "€";
return $html;
return $this->value;
}
}
......@@ -18,11 +18,13 @@ class Facture extends Objet
),
"date_edition" => array(
"label" => "Date d'édition",
"i" => 8
"i" => 8,
"t" => "DateField"
),
"date_paiement" => array(
"label" => "Date de paiement",
"i" => 8
"i" => 8,
"t" => "DateField"
),
"moyen_paiement" => array(
"label" => "Moyen de paiement",
......
......@@ -12,7 +12,8 @@ class Ordonnance extends Objet
"i" => 1
),
"date" => array(
"i" => 2
"i" => 2,
"t" => "DateField"
),
"animal" => array(
"i" => 3
......
......@@ -27,7 +27,7 @@ class PriceField extends Field
public function show() {
$prix = $this->value;
$html = (string)$prix;
$html .= "€";
$html .= " €";
return $html;
}
}
......@@ -20,7 +20,8 @@ class Rdv extends Objet
"i" => 1
),
"date" => array(
"i" => 4
"i" => 4,
"t" => "DateField"
),
"duree" => array(
"i" => 5
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment