From 0b8970c5b73de628e625dd1128071a91df18d30a Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sun, 18 Feb 2018 21:58:56 +0000 Subject: [PATCH] lib/php/db/field.php --- lib/php/db/field.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/php/db/field.php b/lib/php/db/field.php index 5772fa78..7ea29a5a 100644 --- a/lib/php/db/field.php +++ b/lib/php/db/field.php @@ -122,7 +122,9 @@ class field extends nb { if ($type === null) $type = $this->html_type(); foreach ($values as $value) { - $html .= '
'; + $html .= '
' + .'' + ; if ($this->extras) { $html .= ''.$this->out($value).''; @@ -131,6 +133,7 @@ class field extends nb { $html .= $this->htmlYesNo($value); } else { + # NB 09.02.18: needed ? if ($tag == 'textarea' and $type != 'text') $tag = 'input'; if ($media = Mime::html($value,'')) { $tag = 'input'; @@ -138,18 +141,17 @@ class field extends nb { $html .= $media; } - # NB 09.02.18: needed ? - #$tag = 'textarea'; $html .= '<'.$tag .' name="'.$this->preffix.$this->name.$suff.'"' - # NB 06.02.18 .' id="'.$this->name.'"' .( ($size and $tag != 'textarea') ? ' size="'.$size.'"' : '') - #.' value="'.$value.'"' .($tag == 'textarea' ? '>'.$value.'' : ' type="'.$type.'" value="'.htmlspecialchars($value).'" />') ; } + # If more than one value, add js code to add more values + if ($suff) $html .= '+'; + $html .= '
'.NB_EOL; } -- 2.47.3