Commit c0601827 authored by Leigh B Stoller's avatar Leigh B Stoller

Allow newlines in notes, and fix bug that was preventing errors from

being displayed.
parent 17578579
......@@ -421,11 +421,14 @@ if (isset($formfields["mbr_version"]) && $formfields["mbr_version"] != "" &&
$formfields["mbr_version"] != $image->mbr_version()) {
$args["mbr_version"] = $formfields["mbr_version"];
}
if ($formfields["notes"] != "" && !TBvalid_description($formfields["notes"])) {
$errors["Notes"] = TBFieldErrorString();
}
else {
$args["notes"] = $formfields["notes"];
if (isset($formfields["notes"])) {
if (!TBvalid_fulltext($formfields["notes"])) {
$errors["Notes"] = TBFieldErrorString();
}
else {
$args["notes"] = $formfields["notes"];
}
}
# The mtype_* checkboxes are dynamically generated.
......@@ -446,7 +449,7 @@ foreach ($mtypes_array as $type) {
# long form.
# Can't check this unless we have at least one mtype!
if (!count($mtypes_array)) {
if (!count($mtypes_array) || count($errors)) {
SPITFORM($image, $formfields, $errors);
PAGEFOOTER();
return;
......
......@@ -936,7 +936,10 @@ class Image
echo "<tr>
<td>Notes: </td>
<td>$notes</td>
<td class=left>
<textarea rows=4 cols=60 readonly>" .
str_replace("\r", "", $notes) .
"</textarea></td>
</tr>\n";
if ($imagefile_url) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment