diff --git a/application/modules/admin/controllers/AlbumController.php b/application/modules/admin/controllers/AlbumController.php index e66ac0e82af53157b62f21f8d9cc31235249c6d8..84e51d5531cd2826d96566f64b2b6562fe6ce558 100644 --- a/application/modules/admin/controllers/AlbumController.php +++ b/application/modules/admin/controllers/AlbumController.php @@ -434,9 +434,11 @@ class Admin_AlbumController extends Zend_Controller_Action { $album->updateAttributes($values); - if ($album->save() && $album->receiveFile() && $album->receivePDF()) { + if ($album->save() + && $album->receiveFile() + && $album->receivePDF()) { $this->_helper->notify('Album sauvegardé'); - $this->_redirect('admin/album/edit_album/id/'.$album->getId()); + $this->_redirect('admin/album/edit_album/id/' . $album->getId()); } } @@ -502,10 +504,14 @@ class Admin_AlbumController extends Zend_Controller_Action { */ protected function _renderAlbumForm($album, $titre) { $this->_validateAndSaveAlbum($album); - + $this->view->titre = $titre; $this->view->errors = $album->getErrors(); $this->view->album = $album; + $this->view->form->getElement('fichier') + ->setValue($album->getFichier()); + $this->view->form->getElement('pdf') + ->setValue($album->getPdf()); $this->render('album_form'); }