thchazot1 2 years ago
parent 4d19f270ee
commit 0bee2dcc22

@ -24,7 +24,7 @@
<div class="check"> <div class="check">
<text>Private</text> <text>Private</text>
<input type="checkbox" name="private"></input> <input type="checkbox" name="private"/>
</div> </div>
<input type="submit" value="Submit"/> <input type="submit" value="Submit"/>

@ -33,7 +33,7 @@
?> ?>
<div class="check"> <div class="check">
<text>Complete</text> <text>Complete</text>
<input type="checkbox" name="completed" checked></input> <input type="checkbox" name="completed" checked/>
</div> </div>
<?php <?php
} }
@ -41,7 +41,7 @@
?> ?>
<div class="check"> <div class="check">
<text>Complete</text> <text>Complete</text>
<input type="checkbox" name="completed"></input> <input type="checkbox" name="completed"/>
</div> </div>
<?php <?php
} }
@ -49,8 +49,8 @@
<input type="submit" value="Submit"/> <input type="submit" value="Submit"/>
<input type="hidden" name='task' value="<?=$dataView->getId()?>"/>
<input type="hidden" name="action" value="modifyTask"/> <input type="hidden" name="action" value="modifyTask"/>
<input type="hidden" name="list" value="<?=$dataView->getId()?>"/>
</form> </form>
</div> </div>

@ -2,9 +2,9 @@
$rep = __DIR__ . '/../'; $rep = __DIR__ . '/../';
$login="root"; $login="thchazot1";
$password="root"; $password="achanger";
$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut) $dsn="mysql:host=localhost;dbname=dbthchazot1";// chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
//$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; //$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite";
/* /*
$login="thchazot1"; $login="thchazot1";

@ -233,14 +233,20 @@ class VisitorController {
function UpdateTask($dVueEreur) { function UpdateTask($dVueEreur) {
global $rep,$vues,$dataView; global $rep,$vues,$dataView;
$idTache=$_POST['task']; $tache=$_POST['task'];
$name=$_POST['name']; $name=$_POST['name'];
$content=$_POST['content']; $content=$_POST['content'];
$completed=$_POST['completed']; if ($_POST['completed']===null){
$completed=false;
}
else{
$completed=true;
}
$model = new MdlTache(); $model = new MdlTache();
$model->update($idTache, $name, $content, $completed); $tache=$model->findById($_POST['task']);
$_REQUEST['action']="accessListInfos"; $model->update($tache, $name, $content, $completed);
$this->accessListInfos($dVueEreur); $_REQUEST['action']="goHome";
$this->Reinit();
$dVueEreur= array(); $dVueEreur= array();
} }
} }

@ -34,7 +34,7 @@ class MdlTache{
$gate->update($tache); $gate->update($tache);
} }
public function findById(int $id){ public function findById(int $id): Tache{
$gate=new TacheGateway($this->con); $gate=new TacheGateway($this->con);
return $gate->findById($id); return $gate->findById($id);

Loading…
Cancel
Save