}
        $notification->save();
        $_POST["id_notification"] = $notification->getId();
        include "visu_notification.php";
        die;
    }
}
if ($modif == 'type') {
    $notification->setTypeNotification($_POST['type']);
    $notification->setStatutEnvoi(AbsenceEleveNotificationPeer::STATUT_ENVOI_ETAT_INITIAL);
} else {
    if ($modif == 'statut') {
        $notification->setStatutEnvoi($_POST["statut"]);
    } else {
        if ($modif == 'commentaire') {
            $notification->setCommentaire($_POST["commentaire"]);
        } elseif ($modif == 'enlever_responsable') {
            if (0 != JNotificationResponsableEleveQuery::create()->filterByAbsenceEleveNotification($notification)->filterByResponsableEleveId($_POST["pers_id"])->limit(1)->delete()) {
                $message_enregistrement .= '<span style="color:green">Responsable supprimé</span>';
            } else {
                $message_enregistrement .= '<span style="color:red">Suppression impossible</span>';
            }
            include "visu_notification.php";
            die;
        } elseif ($modif == 'ajout_responsable') {
            $responsable = ResponsableEleveQuery::create()->findOneByResponsableEleveId($_POST["pers_id"]);
            if ($responsable != null && !$notification->getResponsableEleves()->contains($responsable)) {
                $notification->addResponsableEleve($responsable);
                $notification->save();
                $message_enregistrement .= '<span style="color:green">Responsable ajouté</span>';
                include "visu_notification.php";