use textarea for attribute field values if value > 80 chars

This commit is contained in:
Uwe Steinmann 2015-10-28 08:18:25 +01:00
parent aa1f10af1c
commit 50478ee3c7

View File

@ -1029,7 +1029,11 @@ function folderSelected<?php echo $formName ?>(id, name) {
}
echo "</select>";
} else {
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />";
if (strlen($objvalue) > 80) {
echo '<textarea class="input-xxlarge" name="'.$fieldname.'['.$attrdef->getId().']">'.htmlspecialchars($objvalue).'</textarea>';
} else {
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />";
}
}
} /* }}} */