From: Nicolas Boisselier Date: Sun, 18 Feb 2018 21:58:56 +0000 (+0000) Subject: lib/php/db/field.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=0b8970c5b73de628e625dd1128071a91df18d30a;p=nb.git lib/php/db/field.php --- 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; }