diff --git a/VERSIONS_HOTLINE/65395 b/VERSIONS_HOTLINE/65395 new file mode 100644 index 0000000000000000000000000000000000000000..b71676b2d692bbe23219c8ae4674e9f00ed00460 --- /dev/null +++ b/VERSIONS_HOTLINE/65395 @@ -0,0 +1,2 @@ + - ticket #65395 : Administration : correction de la validation des boites. + \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Admin/Button.php b/library/ZendAfi/View/Helper/Admin/Button.php index 91f9d69613da7807f7533c7669b57def006f8858..32662d2cd536910520ca6dda471ed4cb5ca03b3a 100644 --- a/library/ZendAfi/View/Helper/Admin/Button.php +++ b/library/ZendAfi/View/Helper/Admin/Button.php @@ -42,10 +42,6 @@ class ZendAfi_View_Helper_Admin_Button extends ZendAfi_View_Helper_Button { $button->setAttribs(array_merge($button->getAttribs(), ['class' => ''])); - if($this->view->isPopup()) - $button->setAttribs(array_merge(['data-popup' => 'true'], - $button->getAttribs())); - $button->setAttribs(array_merge($button->getAttribs(), ['title' => $button->getTitle() ? $button->getTitle() : (isset($button->getAttribs()['title']) ? $button->getAttribs()['title'] : ''), 'class' => $button->getAttribs()['class'] . ' admin-button'])); diff --git a/tests/application/modules/admin/controllers/FileManagerControllerTest.php b/tests/application/modules/admin/controllers/FileManagerControllerTest.php index 6308e9e8b807a7c9d3546b819799c7ae1047bb79..0bb4f247728b6184658920dde6a06d14c91b29f8 100644 --- a/tests/application/modules/admin/controllers/FileManagerControllerTest.php +++ b/tests/application/modules/admin/controllers/FileManagerControllerTest.php @@ -631,24 +631,6 @@ class FileManagerControllerOversizedFolderDispatchTest extends FileManagerContro -class FileManagerControllerRenderPopupDispatchTest extends FileManagerControllerTestCase { - public function setUp() { - parent::setUp(); - - $this->dispatch('/admin/file-manager?browser=userfiles&render=popup', true); - } - - - /** @test */ - public function dataPopupButtonShouldBePresent() { - $this->assertContains('<button data-popup=\"true\" data-url=\"\/admin\/file-manager\/index?render=popup\" class=\" admin-button\"', $this->_response->getBody()); - } -} - - - - - class FileManagerControllerWallDispatchTest extends FileManagerControllerTestCase { public function setUp() { parent::setUp(); @@ -1473,4 +1455,22 @@ class FileManagerControllerAsModoBibTest extends Admin_AbstractControllerTestCas public function modoBibCouldAccessFileBrowser() { $this->assertXPathContentContains('//body[contains(@class, "admin")]//div', 'Explorateur de fichier'); } +} + + + + + +class FileManagerControllerIndexRenderPopupTest extends FileManagerControllerTestCase { + public function setUp() { + parent::setUp(); + + $this->dispatch('/admin/file-manager/create/render/popup?into=userfiles', true); + } + + + /** @test */ + public function createButtonShouldNotContainsDataPopup() { + $this->assertNotContains('data-popup=', $this->_response->getBody()); + } } \ No newline at end of file