diff --git a/class/form.php b/class/form.php index cc5e90cb6b72339e87e7dd180bd380448aaf5981..fcc957b32301bc48ea307116a10b0700a018a2ef 100644 --- a/class/form.php +++ b/class/form.php @@ -14,4 +14,12 @@ class Form { return "Ajouter un ".get_class($this->object); } + public function getSubmitText() { + return "Ajouter"; + } + + public function getFields() { + return Array(); + } + } \ No newline at end of file diff --git a/view/form.php b/view/form.php index d9d7897ed73de25bb0b8d6c73e65986ac3e0b656..298d1ef0f04aa53e59cbbd70454fbf8e06d95b28 100644 --- a/view/form.php +++ b/view/form.php @@ -3,4 +3,10 @@ <div class="page-header"> <h1><?php echo $formConf->getTitle(); ?></h1> </div> + <form role="form"> + <?php foreach($formConf->getFields() as $field): ?> + <?php echo $field->html(); ?> + <?php endforeach; ?> + <button type="submit" class="btn btn-default"><?php echo $formConf->getSubmitText(); ?></button> + </form> </div> \ No newline at end of file