diff --git a/library/Class/WebService/SIGB/Koha/BuySuggestForm.php b/library/Class/WebService/SIGB/Koha/BuySuggestForm.php index 5e300532211fb0358f9d8dd5557d9668718f3790..3be75e7adf54eaecfb991fb25610bbdfe5ec0944 100644 --- a/library/Class/WebService/SIGB/Koha/BuySuggestForm.php +++ b/library/Class/WebService/SIGB/Koha/BuySuggestForm.php @@ -64,7 +64,7 @@ class Class_WebService_SIGB_Koha_BuySuggestForm extends ZendAfi_Form_SuggestionA ->addElement('text', 'BranchName', ['label' => $this->_('Site'), 'value' => Class_Users::getIdentity()->getLibraryLabel(), - 'disabled' => true]) + 'disabled' => 'disabled']) ->addElement('select', 'DocType', ['label' => $this->_('Type de document').' *', 'multioptions' => $sorted_type_docs, diff --git a/library/Class/WebService/SIGB/Nanook/BuySuggestForm.php b/library/Class/WebService/SIGB/Nanook/BuySuggestForm.php index 3d4a3e9b6bf003142d6671cf3472467650464302..74edf4ffc56e77a897024b916786c56523d8b980 100644 --- a/library/Class/WebService/SIGB/Nanook/BuySuggestForm.php +++ b/library/Class/WebService/SIGB/Nanook/BuySuggestForm.php @@ -74,7 +74,7 @@ class Class_WebService_SIGB_Nanook_BuySuggestForm extends ZendAfi_Form_Suggestio 'Library', ['label' => $this->_('Site'), 'value' => Class_Users::getIdentity()->getLibelleBib(), - 'disabled' => true]) + 'disabled' => 'disabled']) ->addElement('select', 'DocType', ['label' => $this->_('Type de document').' *', 'multioptions' => $sorted_type_docs, diff --git a/library/ZendAfi/View/Helper/Search/Display.php b/library/ZendAfi/View/Helper/Search/Display.php index 1e39463355ed9e7eba753ef9ffd0ddcf3b403e8c..44c21400187db8219448ebd04c05145331de923a 100644 --- a/library/ZendAfi/View/Helper/Search/Display.php +++ b/library/ZendAfi/View/Helper/Search/Display.php @@ -23,7 +23,7 @@ class ZendAfi_View_Helper_Search_Display extends ZendAfi_View_Helper_BaseHelper { public function search_Display($search_criteria) { - $element = (new Zend_Form) + $element = (new ZendAfi_Form) ->createElement('select', 'list_format', ['aria-label' => $this->_('Choisir le mode d\'affichage'), @@ -33,4 +33,3 @@ class ZendAfi_View_Helper_Search_Display extends ZendAfi_View_Helper_BaseHelper return $this->view->selectWidget($element); } } -?> diff --git a/library/ZendAfi/View/Helper/Search/Order.php b/library/ZendAfi/View/Helper/Search/Order.php index 0b1c50ae11da722e747e865045a2ebfea9e66f1d..30daedd0b7d23a773dd6775db2ff415d4edf44f8 100644 --- a/library/ZendAfi/View/Helper/Search/Order.php +++ b/library/ZendAfi/View/Helper/Search/Order.php @@ -33,7 +33,7 @@ class ZendAfi_View_Helper_Search_Order extends ZendAfi_View_Helper_BaseHelper { protected function _getSettings($search_criteria) : Zend_Form_Element { - return (new Zend_Form) + return (new ZendAfi_Form) ->createElement('select', 'tri', ['aria-label' => $this->_('Choisir l\'ordre des résultats affichés, recharge la page'), diff --git a/library/ZendAfi/View/Helper/Search/PageSize.php b/library/ZendAfi/View/Helper/Search/PageSize.php index 83486a804ae16cd27bd2eb2c31c69b95db2e9382..8fa6e4e45a7946c42b185115917e921a194b5fda 100644 --- a/library/ZendAfi/View/Helper/Search/PageSize.php +++ b/library/ZendAfi/View/Helper/Search/PageSize.php @@ -22,7 +22,7 @@ class ZendAfi_View_Helper_Search_PageSize extends ZendAfi_View_Helper_BaseHelper { public function search_PageSize($search_criteria) { - $element = (new Zend_Form) + $element = (new ZendAfi_Form) ->createElement('select', 'page_size', ['value' => $search_criteria->getPageSize(), diff --git a/library/ZendAfi/View/Helper/Search/SearchMode.php b/library/ZendAfi/View/Helper/Search/SearchMode.php index 821f9cdb156286b276ad7a187c80bf0a1c72f459..dd098fe590fd918ada85a43ca0b6491320d3c4ab 100644 --- a/library/ZendAfi/View/Helper/Search/SearchMode.php +++ b/library/ZendAfi/View/Helper/Search/SearchMode.php @@ -23,7 +23,7 @@ class ZendAfi_View_Helper_Search_SearchMode extends ZendAfi_View_Helper_BaseHelper { public function search_SearchMode($search_criteria) { - $element = (new Zend_Form) + $element = (new ZendAfi_Form) ->createElement('select', 'in_files', ['aria-label' => $this->_('Choisir les modes de recherche'), diff --git a/tests/application/modules/opac/controllers/AbonneControllerSuggestionAchatNanookTest.php b/tests/application/modules/opac/controllers/AbonneControllerSuggestionAchatNanookTest.php index deca69f9b7b4f3a4077ed1e13a10f1012e52306e..fadf79adbb4b04d7c487f3d3ce4e3f4f0ed876ee 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerSuggestionAchatNanookTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerSuggestionAchatNanookTest.php @@ -187,6 +187,13 @@ class AbonneControllerSuggestionAchatNanookAddTest extends AbstractAbonneControl } + /** @test */ + public function pageSuggestionNanookShouldBeHTML5Valid() + { + $this->assertHTML5(); + } + + /** @test */ public function formShouldContainsTextAreaForComment() { $this->assertXPath('//form//textarea[@name="Comment"]'); @@ -219,7 +226,7 @@ class AbonneControllerSuggestionAchatNanookAddTest extends AbstractAbonneControl /** @test */ public function formShouldContainsSite() { - $this->assertXPath('//form//input[@name="Library"][@value="Tatim bib"][@disabled="1"]'); + $this->assertXPath('//form//input[@name="Library"][@value="Tatim bib"][@disabled="disabled"]'); } /** @test */ @@ -241,6 +248,12 @@ class AbonneControllerSuggestionAchatNanookAddTest extends AbstractAbonneControl 'Livres'); } + + /** @test */ + public function submitInputSuggestionNanookShouldHaveAttributeNameSubmitValueEnvoyerAndAriaLabelProposer() + { + $this->assertXPath('//form//input[@type="submit"][@value="Envoyer"][@name="submit"]'); + } } diff --git a/tests/scenarios/RGAA/SearchResultsPageTest.php b/tests/scenarios/RGAA/SearchResultsPageTest.php index 54c534f3c7897b43a8361a23d0aeefa24effd21b..92d47df036b51ccffbbd5b45dc716c269799f7c7 100644 --- a/tests/scenarios/RGAA/SearchResultsPageTest.php +++ b/tests/scenarios/RGAA/SearchResultsPageTest.php @@ -57,4 +57,18 @@ class SearchResultsPageTest { $this->assertXPath('//ul[contains(@class, "result_tools_nav")]//li[contains(@class,"result_search_order")]//select[@title="Trier par"][@aria-label="Choisir l\'ordre des résultats affichés, recharge la page"]'); } + + + /** @test */ + public function orderFormElementShouldBeZendAfiFormElement() + { + $this->assertXPath('//div[contains(@class, "wrapper_zendafi_form_tri")][contains(@class, "inline_form_wrapper_zendafi_form_tri")]'); + } + + + /** @test */ + public function pagesizeFormElementShouldBeZendAfiFormElement() + { + $this->assertXPath('//div[contains(@class, "wrapper_zendafi_form_pagesize")][contains(@class, "inline_form_wrapper_zendafi_form_pagesize")]'); + } }