diff --git a/VERSIONS_HOTLINE/112372 b/VERSIONS_HOTLINE/112372 new file mode 100644 index 0000000000000000000000000000000000000000..e06b2ad00e81e2e3b62e31b2a230ce96abc461ab --- /dev/null +++ b/VERSIONS_HOTLINE/112372 @@ -0,0 +1 @@ + - ticket #112372 : Magasin de thème : iPad / iOS 10.3 Correction de l'affichage de la boîte de connexion \ No newline at end of file diff --git a/library/templates/Intonation/Library/Widget/Login/View.php b/library/templates/Intonation/Library/Widget/Login/View.php index 2e28ff3a87d213682572308d35644a82197413d2..4022e2242e648cb21b1dca454a1b9fc625f82706 100644 --- a/library/templates/Intonation/Library/Widget/Login/View.php +++ b/library/templates/Intonation/Library/Widget/Login/View.php @@ -360,4 +360,9 @@ class IntonationLoginRenderToggle extends IntonationLoginRenderAbstract { '', 'dropdown-menu-right'); } + + + protected function _renderForm($form) { + return $this->_view->renderStackedForm($form); + } } diff --git a/library/templates/Intonation/View/RenderForm.php b/library/templates/Intonation/View/RenderForm.php index 0075ebfaed20d493b23e1f833297e8b3dc592128..b1d21ddf7bbf72a32f0e3a0b57e4195c2c9d441e 100644 --- a/library/templates/Intonation/View/RenderForm.php +++ b/library/templates/Intonation/View/RenderForm.php @@ -47,6 +47,11 @@ class Intonation_View_RenderForm extends ZendAfi_View_Helper_RenderForm { } + protected function _getLabelHtmlTagClass() { + return 'row justify-content-between no-gutters'; + } + + protected function _labelForTableRendering($element, $decorator, $newDecorators, $name) { $newDecorators[] = [['input_data' => 'HtmlTag'], ['tag' => 'div', @@ -57,7 +62,7 @@ class Intonation_View_RenderForm extends ZendAfi_View_Helper_RenderForm { $newDecorators[] = ['HtmlTag', ['tag' => 'div', - 'class' => 'row justify-content-between no-gutters']]; + 'class' => $this->_getLabelHtmlTagClass()]]; $newDecorators[] = ['HtmlTagWrapper', ['tag' => 'div', diff --git a/library/templates/Intonation/View/RenderStackedForm.php b/library/templates/Intonation/View/RenderStackedForm.php new file mode 100644 index 0000000000000000000000000000000000000000..74665712b73bdedeb15c72268c2a385a80fc3f14 --- /dev/null +++ b/library/templates/Intonation/View/RenderStackedForm.php @@ -0,0 +1,37 @@ +<?php +/** + * Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class Intonation_View_RenderStackedForm extends Intonation_View_RenderForm { + public function renderStackedForm($form, $buttons =[]) { + return parent::renderForm($form, $buttons); + } + + + protected function _getDefaultFormClass() { + return 'form'; + } + + + protected function _getLabelHtmlTagClass() { + return 'justify-content-between no-gutters'; + } +} \ No newline at end of file diff --git a/tests/scenarios/Templates/TemplatesTest.php b/tests/scenarios/Templates/TemplatesTest.php index 242ba2ec4d35885da6667325561374e1bf8ea371..f860a8e8c9496025fe6929de0f60123fd7c45485 100644 --- a/tests/scenarios/Templates/TemplatesTest.php +++ b/tests/scenarios/Templates/TemplatesTest.php @@ -1379,6 +1379,15 @@ class TemplatesDispatchIntonationUnloggedWithToggleLoginTest extends TemplatesIn public function loginFormShouldBeWrappedDropdownMenu() { $this->assertXPath('//div[contains(@class,"boite login")]//div[@class="dropdown-menu dropdown-menu-right"]//form'); } + + + /** + * @test + * @see http://forge.afi-sa.fr/issues/112372 + **/ + public function formChildDivShouldNotHaveRowClass() { + $this->assertNotXPath('//div[contains(@class,"boite login")]//form//div[contains(@class, "row")]', $this->_response->getBody()); + } }