Skip to content
Snippets Groups Projects
Commit ba804758 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Fix ZendAfi Form Call

parent 59326d3d
Branches
Tags
1 merge request!5155[RTok] Fix ZendAfi Form Call
Pipeline #46722 passed with stage
in 35 minutes and 4 seconds
......@@ -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,
......
......@@ -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,
......
......@@ -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);
}
}
?>
......@@ -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'),
......
......@@ -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(),
......
......@@ -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'),
......
......@@ -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"]');
}
}
......
......@@ -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")]');
}
}
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