All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

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"] != "" && ...@@ -421,11 +421,14 @@ if (isset($formfields["mbr_version"]) && $formfields["mbr_version"] != "" &&
$formfields["mbr_version"] != $image->mbr_version()) { $formfields["mbr_version"] != $image->mbr_version()) {
$args["mbr_version"] = $formfields["mbr_version"]; $args["mbr_version"] = $formfields["mbr_version"];
} }
if ($formfields["notes"] != "" && !TBvalid_description($formfields["notes"])) {
if (isset($formfields["notes"])) {
if (!TBvalid_fulltext($formfields["notes"])) {
$errors["Notes"] = TBFieldErrorString(); $errors["Notes"] = TBFieldErrorString();
} }
else { else {
$args["notes"] = $formfields["notes"]; $args["notes"] = $formfields["notes"];
}
} }
# The mtype_* checkboxes are dynamically generated. # The mtype_* checkboxes are dynamically generated.
...@@ -446,7 +449,7 @@ foreach ($mtypes_array as $type) { ...@@ -446,7 +449,7 @@ foreach ($mtypes_array as $type) {
# long form. # long form.
# Can't check this unless we have at least one mtype! # 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); SPITFORM($image, $formfields, $errors);
PAGEFOOTER(); PAGEFOOTER();
return; return;
......
...@@ -936,7 +936,10 @@ class Image ...@@ -936,7 +936,10 @@ class Image
echo "<tr> echo "<tr>
<td>Notes: </td> <td>Notes: </td>
<td>$notes</td> <td class=left>
<textarea rows=4 cols=60 readonly>" .
str_replace("\r", "", $notes) .
"</textarea></td>
</tr>\n"; </tr>\n";
if ($imagefile_url) { 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