diff --git a/VERSIONS_HOTLINE/180160 b/VERSIONS_HOTLINE/180160 new file mode 100644 index 0000000000000000000000000000000000000000..c0ea03954f080e853e2f6dff9ab10e8077ad681c --- /dev/null +++ b/VERSIONS_HOTLINE/180160 @@ -0,0 +1 @@ + - correctif #180160 : restaure les listes de genres et sections dans le formulaire d'usage PNB Dilicom \ No newline at end of file diff --git a/library/Class/Album/UsageReport/SearchCriteria.php b/library/Class/Album/UsageReport/SearchCriteria.php index 78fc4cae77887f0ad2263b491071266b1ade0bd4..0f30b5112085dbe24bd008cdc2c1309c4c0272ac 100644 --- a/library/Class/Album/UsageReport/SearchCriteria.php +++ b/library/Class/Album/UsageReport/SearchCriteria.php @@ -115,7 +115,7 @@ abstract class Class_Album_UsageReport_SearchCriteria_SelectElement extends Clas class Class_Album_UsageReport_SearchCriteria_Genre extends Class_Album_UsageReport_SearchCriteria_SelectElement { protected $_checkbox_name = ZendAfi_View_Helper_TagListeCoches::SOURCE_GENRE_PNB, - $_name = 'genres'; + $_name = 'genre_pnb'; protected function _getElement($id) { return Class_CodifGenre::find($id); @@ -138,7 +138,7 @@ class Class_Album_UsageReport_SearchCriteria_Genre extends Class_Album_UsageRepo class Class_Album_UsageReport_SearchCriteria_Section extends Class_Album_UsageReport_SearchCriteria_SelectElement { protected $_checkbox_name = ZendAfi_View_Helper_TagListeCoches::SOURCE_SECTION_PNB, - $_name = 'sections'; + $_name = 'section_pnb'; protected function _getElement($id) { return Class_CodifSection::find($id); diff --git a/tests/scenarios/PnbDilicom/PnbDilicomAdminTest.php b/tests/scenarios/PnbDilicom/PnbDilicomAdminTest.php index b32d4fbf182421eba85a3f39c2856789f3481de3..32d890ec395c3cf39c3ddc3bd87126108b836cd3 100644 --- a/tests/scenarios/PnbDilicom/PnbDilicomAdminTest.php +++ b/tests/scenarios/PnbDilicom/PnbDilicomAdminTest.php @@ -438,6 +438,8 @@ class PnbDilicomAdminUsageTest extends PnbDilicomAdminTestCase { public function setUp() { parent::setUp(); + Class_AdminVar::set('DILICOM_PNB_BOARD_DISPLAY_SECTION', true); + (new Class_Batch_DilicomJobGenerateUsageReport(new Class_Batch_Dilicom)) ->setLogger($this->getLogger()) ->run(); @@ -452,6 +454,17 @@ class PnbDilicomAdminUsageTest extends PnbDilicomAdminTestCase { } + /** @test */ + public function inputSearchGenreShouldBePresent() { + $this->assertXPath( '//div[@id="search_genre_pnb_aff"]'); + } + + /** @test */ + public function inputSearchSectionShouldBePresent() { + $this->assertXPath( '//div[@id="search_section_pnb_aff"]'); + } + + /** @test */ public function inputOrderDateShouldBeDisplay() { $this->assertXPath( '//input[@name="search_order_date_debut"]');