[horde] Horde 6 Framework
J.M. Stoorvogel
jmstoorvogel at stoorvogelsoftware.nl
Thu Mar 13 09:19:31 UTC 2025
Citeren Brent <impuser at bitrealm.com>:
> Quoting Andreas Mauser <andreas at mauser.info>:
>
>> Am 12. März 2025 um 13:25 schrieb "Horst B Simon"
>> <[horst.simon2 at icloud.com](mailto:horst.simon2 at icloud.com?to=%22Horst%20B%20Simon%22%20%3Chorst.simon2%40icloud.com%3E)\>:
>>
>>> Quoting Brent <impuser at bitrealm.com>:
>>>
>>> Quoting Horst B Simon <horst.simon2 at icloud.com>:
>>
>> .....
>>> For the birthday/anniversary date thing, I fixed that myself. Here's
>>> what I did:
>>>
>>> In file:
>>> /var/www/horde/vendor/horde/core/lib/Horde/Core/Ui/VarRenderer/Html.php
>>>
>>> This is a hack. I don't know where "start\_year" is supposed to come
>>> from. On my system, it was "NULL". So, I hardcoded it to include
>>> dates from 1900.
>>>
>>> Line 529:
>>> Removed the $var->type->getProperty('start\_year') value with a
>>> hard-coded: 1900 (year)
>>>
>>> OLD: for ($i = $var->type->getProperty('start\_year'); $i
>>> <= $var->type->getProperty('end\_year'); $i++) { \*/
>>> NEW: for ($i = 1900; $i <=
>>> $var->type->getProperty('end\_year'); $i++) {
>>
>> This seems to be cut off and I cannot find the original. Can
>> someone please send the string again?
>>
>> Thank you,
>> Andreas
>>
>> --
>> Horde mailing list
>> Frequently Asked Questions: http://horde.org/faq/To unsubscribe,
>> mail: horde-unsubscribe at lists.horde.org
>
> It's not cut off, it just got split into two lines...all the text is there.
>
> OLD: for ($i = $var->type->getProperty('start_year'); $i <=
> $var->type->getProperty('end_year'); $i++) { */
> NEW:for ($i = 1900; $i <= $var->type->getProperty('end_year'); $i++) {
> --
In
horde6/bundle/vendor/horde/form/lib/Horde/Form/Type.php:
class Horde_Form_Type_monthdayyear extends Horde_Form_Type {
...
function init(...$params)
{
//$start_year = $params[0] ?? '';
$start_year = 1920;
$end_year = $params[1] ?? '';
$picker = $params[2] ?? true;
$format_in = $params[3] ?? null;
$format_out = $params[4] ?? '%x';
if (empty($start_year)) {
$start_year = date('Y');
}
if (empty($end_year)) {
$end_year = date('Y') + 10;
}
I resolved the issue (yesterday!) here by some hardcoding. But I think
it should be resolved somewhere else. Turba should have it's own form
renderer and issue the appropriate starting year when creating a
control for a birthday date.
And I prefer the dates reversed: from high to low, it's less scrolling
when entering birthday dates.
But the other links to this issue are very convenient, this list is
sooo usefull, thanx! Searching takes more time than the actual coding
itself.
--
Met vriendelijke groet,
J.M. Stoorvogel
06-23352273
More information about the horde
mailing list