Update etemplate.php

some templates use options="<number>,..." with <number> > 1, instead of multiple="true"
This commit is contained in:
Ralf Becker 2024-01-30 11:22:45 +02:00 committed by nathan
parent d2e029c504
commit e9f5a1efc6

View File

@ -422,7 +422,8 @@ function send_template()
{
$tag = 'et2-tree'.($matches[1] ?? '');
$attrs = parseAttrs($matches[2]);
if (!empty($attrs['multiple']) && $attrs['multiple'] !== 'false')
if (!empty($attrs['multiple']) && $attrs['multiple'] !== 'false' ||
!empty($attrs['options']) && (int)$attrs['options'] > 1)
{
$tag .= '-multiple';
}