Skip to content
Snippets Groups Projects
Commit d696d47e authored by llaffont's avatar llaffont
Browse files

Correction affichage lieu sur l'ajout d'un article uniquement

parent 894c0c9c
Branches
Tags
No related merge requests found
......@@ -177,6 +177,7 @@ class Admin_CmsController extends Zend_Controller_Action {
$this->view->article = $article;
$this->view->titre = 'Ajouter un article';
$this->view->combo_cat = $this->_getArticleCategoryInput($category);
$this->view->combo_lieu_options = $this->comboLieuOptions();
}
......@@ -198,11 +199,7 @@ class Admin_CmsController extends Zend_Controller_Action {
$this->view->article = $article;
$this->view->combo_cat = $this->_getArticleCategoryInput($article->getCategorie());
$combo_lieu_options = ['0' => $this->_('Aucun')];
foreach(Class_Lieu::findAllBy(['order' => 'libelle']) as $lieu)
$combo_lieu_options[$lieu->getId()] = $lieu->getLibelle();
$this->view->combo_lieu_options = $combo_lieu_options;
$this->view->combo_lieu_options = $this->comboLieuOptions();
if ($article->isTraduction()) {
$this->view->titre = 'Traduire un article';
......@@ -214,6 +211,14 @@ class Admin_CmsController extends Zend_Controller_Action {
}
protected function comboLieuOptions() {
$combo_lieu_options = ['0' => $this->_('Aucun')];
foreach(Class_Lieu::findAllBy(['order' => 'libelle']) as $lieu)
$combo_lieu_options[$lieu->getId()] = $lieu->getLibelle();
return $combo_lieu_options;
}
/**
* @param Class_Article $article
* @return bool
......
......@@ -721,10 +721,16 @@ class CmsControllerNewsAddActionTest extends CmsControllerTestCase {
$this->_response->getBody());
}
/** @test */
public function selectIdLieuShouldContainsBonlieu() {
$this->assertXPath('//select[@name="id_lieu"]//option[not(@selected)][@label="Bonlieu"][@value="3"]');
}
}
class CmsControllerNewsAddActionWithoutWorkflowTest extends CmsControllerTestCase {
public function setUp() {
parent::setUp();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment