tkrebs / ep3-bs

Online booking system for courts
http://bs.hbsys.de/
MIT License
181 stars 108 forks source link

Session duration & export #75

Open PepereLoulou opened 6 years ago

PepereLoulou commented 6 years ago

Hello,

How to modifie the duration of session ? Actualy, i'm disconnected very quickly.

There is a module to export to PDF (for secure backup) or to csv ?

tkrebs commented 6 years ago

The duration of the session depends on many things, among other

'session_config' => array( 'gc_maxlifetime' => 60 * 60 * 24 )

tkrebs commented 6 years ago

An export can be done from the database itself, i. e. with phpMyAdmin. Currently there is no dedicated export module in the booking system.

PepereLoulou commented 6 years ago

okey. Thanks a lot tkrebs :-)

I have a new problem: i have done a french traduction based into deutsch language, but the date have bad syntax in french... and occured an error.

English format: Dec 2, 2017 Deutsch format: 02.12.2017 French format: 2 dèc. 2017

How to put the date for french lang, like in deutsch ?

tkrebs commented 6 years ago

There is a translation string for the date:

https://github.com/tkrebs/ep3-bs/blob/master/data/res/i18n/de-DE/base.php#L52

You can put the french date in there, according to the PHP date syntax described here:

http://php.net/manual/de/function.date.php

PepereLoulou commented 6 years ago

The traduction into base.php is done. But the problem always the same.

The file /vendor/zendframework/zendframework/library/Zend/I18n/View/Helper/DateFormat.php line 78 to 90:

` $timezone = $this->getTimezone(); $formatterId = md5($dateType . "\0" . $timeType . "\0" . $locale ."\0" . $pattern);

    if (!isset($this->formatters[$formatterId])) {
        $this->formatters[$formatterId] = new IntlDateFormatter(
            $locale,
            $dateType,
            $timeType,
            $timezone,
            IntlDateFormatter::GREGORIAN,
            $pattern
        );
    }`

It use "new IntlDateFormatter $locale":

IntlDateFormatter MEDIUM for french is d MMM y (cf http://demo.icu-project.org/icu-bin/locexp?d_=fr&_=fr)

and for deutsch is dd.MM.y (cf http://demo.icu-project.org/icu-bin/locexp?d_=fr&_=de)

So if i setup fr-FR the script use d MMM y and not dd.MM.y

Into EditForm.php, a verification of the date format it's done, but i don't understand how it's done and how to modify for french date format, because it's that fonction return error with the date format. /module/Backend/src/Backend/Form/Booking/EditForm.php (line 218 to 246 ? for date start)

PepereLoulou commented 6 years ago

The error returned:

DateTime::__construct(): Failed to parse time string (2 déc. 2017) at position 0 (2): Unexpected character

tkrebs commented 6 years ago

Indeed, the form processing is incompatible with those letters in the date string. I think I have to implement another validation logic for dates there.

PepereLoulou commented 6 years ago

The modification it's into StringTrim.php ?

/vendor/zendframework/zendframework/library/Zend/Filter/StringTrim.php

tkrebs commented 6 years ago

Everything in /vendor/ directory is third party software that is used in the booking system, but never modified manually. Thus bugs are only fixed in the actual booking system files under /module/.

I will try to fix that datetime issue soon.

PepereLoulou commented 6 years ago

Ok ! Thanks for you good work on that script !!!

PepereLoulou commented 6 years ago

Hello,

On the last version , is that datetime issue fixed ?

tkrebs commented 6 years ago

Hello, unfortunately not. I tried it, but realized that it's more complicated than I originally thought. It is still on the to-do list though.