Skip to content
Snippets Groups Projects
Commit 2d3c7929 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #40650 fix tests failures

parent 63195668
Branches
Tags
3 merge requests!2334Master,!2161Dev#40650 contractuel 5255 dole preinscription en ligne bressuire concarneau ccvh,!2149Dev#40650 contractuel 5255 dole preinscription en ligne bressuire concarneau ccvh
Pipeline #1467 failed with stage
in 10 minutes and 57 seconds
......@@ -26,9 +26,10 @@ class ZendAfi_View_Helper_DatePicker extends ZendAfi_View_Helper_BaseHelper {
* @param $maxYear maximum year to display
* @return html for the date picker
*/
public function datePicker($name, $varDate, $dateOnly=true, $allDaySwitch='',$disabled=false, $date_format = 'dd/MM/YYYY') {
public function datePicker($name, $varDate, $dateOnly=true, $allDaySwitch='',$disabled=false) {
$locale = Zend_Registry::get('locale');
$optionsdateonly = $optionswithhours = ['dateFormat' => $date_format,
$optionsdateonly = $optionswithhours = ['dateFormat' => 'dd/MM/YYYY',
'locale' => substr($locale,0,2),
'firstDayOfWeek' => 1,
'minuteInterval' => 15,
......@@ -36,7 +37,7 @@ class ZendAfi_View_Helper_DatePicker extends ZendAfi_View_Helper_BaseHelper {
'autodateOnStart' => false,
'dateOnly' => true];
$optionswithhours['dateFormat'] = $date_format.' hh:mm';
$optionswithhours['dateFormat'] = 'dd/MM/YYYY hh:mm';
$optionswithhours['dateOnly'] = false;
$optionswithhours['minuteInterval'] = 15;
......@@ -77,12 +78,10 @@ $("#' . $allDaySwitch . '").click(function() {
}
$option=[];
if ($disabled)
$option=['disabled' => 'disabled'];
return $this->view->formText($name,
$this->formatDate($varDate, $options['dateFormat']),
$this->formatDate($varDate, 'dd/MM/yyyy'. ($dateOnly ? '' : ' HH:mm')),
array_merge (['id' => $name,
'maxlength' => $dateOnly ? 10 : 16
],$option));
......
......@@ -117,7 +117,7 @@ class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPr
['data' => json_encode(['branchcode' => 'GRA',
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15/09/1940',
'dateofbirth' => '15-09-1940',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com'])])
......@@ -160,7 +160,7 @@ class AuthControllerPreRegistrationKohaPostDispatchWithErrorReturnedTest extends
['data' => json_encode(['branchcode' => 'GRA',
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15/09/1940',
'dateofbirth' => '15-09-1940',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com'])])
......
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