changeset 904:c4bff14a8a50

Fix previous commit to be nicer.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 27 Nov 2014 08:55:22 +0200
parents bc2267ee7788
children 2e2d3d9ab205
files admajax.php
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Thu Nov 27 08:53:54 2014 +0200
+++ b/admajax.php	Thu Nov 27 08:55:22 2014 +0200
@@ -177,7 +177,7 @@
 function stGetFileUploadAndSelector($mode, $entry, $type, $file_id, $title)
 {
   if ($mode == 2)
-    return "<div>File(s) will be uploaded after adding entry.</div>";
+    return "";
 
   $eid = $entry["id"];
   $str = "<div class=\"editControl\"><span class=\"editControlTitle\">".chentities($title)."</span>\n";
@@ -250,6 +250,7 @@
       "   ".stGetEditFormTextInput($mode, "Author", 20, SET_LEN_ENTRY_AUTHOR, "author", $eid, $prefix, $item["author"])."\n".
       "   </div>\n".
       "   <div class=\"entryCell entryFiles\">\n".
+      ($mode == 2 ? "Files can be uploaded after adding the entry" : "").
       stGetFileUploadAndSelector($mode, $item, "entry", "file_id", "Entry file").
       stGetFileUploadAndSelector($mode, $item, "preview", "preview_id", "Preview file").
       "   </div>\n".