printAttributeEditField() outputs textarea for longer values

up to 30 chars it remains an input field
This commit is contained in:
Uwe Steinmann 2015-04-16 08:05:11 +02:00
parent a73d14e5a4
commit de40aa816a

View File

@ -1043,7 +1043,10 @@ function folderSelected<?php echo $form ?>(id, name) {
}
echo "</select>";
} else {
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".($attribute ? htmlspecialchars($attribute->getValue()) : '')."\" />";
if($attribute && strlen($attribute->getValue()) > 30)
echo "<textarea name=\"".$fieldname."[".$attrdef->getId()."]\">".htmlspecialchars($attribute->getValue())."</textarea>";
else
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".($attribute ? htmlspecialchars($attribute->getValue()) : '')."\" />";
}
} /* }}} */