support for CAPTCHAs
[mir.git] / etc / open / editcomment.template
index 817edcd..c5624f8 100755 (executable)
@@ -23,6 +23,20 @@ padding-bottom: 0px;
 padding-top: 0px;
 }
 
+.pformerrors
+{
+margin: none;
+border: none;
+padding: 8px;
+margin-top: 0px;
+margin-bottom: 6px;
+background-color: #FFFFFF;
+border-color: gray;
+border-width: 1px;
+border-style: solid;
+}
+
+
 h1 { padding-bottom: 0px; margin-bottom: 0px;}
 h2
 {
@@ -145,7 +159,7 @@ function to display error message at the input box  // occam, 2003-06-09
 <if errors>
 <list errors as e>
 <if e.field==aField>       
-${lang(e.message + "." + e.field)}
+${lang(e.message)}
 </if>
 </list>
 </if>
@@ -163,15 +177,31 @@ ${lang("comment.note")}
 ${lang("comment.formtitle")}
 </h1>
 
+<form enctype="multipart/form-data" action="${actionURL}&do=opensession&sessiontype=comment" method="post">
+<input type="hidden" name="to_media" value="${utility.encodeHTML(to_media)}">
+
     <if errors>
-<p class="error">${lang("comment.errors")}</p>
+<h2>
+${lang("content.errors")}
+</h2>
+<div class="pformstep01">
+          Your input had the following errors:<br><br>
+          <list errors as e>
+            <font color="red">
+              <if e.field>
+                ${lang("comment."+e.field)}:
+              </if>
+              ${lang(e.message)} <br>
+              <list e.parameters as p>
+                ${utility.prettyEncodeHTML(p)}<br>
+              </list>
+            </font>
+          </list>
+</div>
    </if>
 
-<form enctype="multipart/form-data" action="${actionURL}&do=opensession&sessiontype=comment" method="post">
-<input type="hidden" name="to_media" value="${to_media}">
-
 <h2>
-${lang("posting.step01")}
+${lang("content.step01")}
 </h2>
 <div class="pformstep01">
 
@@ -199,7 +229,7 @@ ${lang("comment.name")}
 
 <!-- CONTENT -->
 <h4>
-${lang("comment.text")}
+${lang("comment.description")}
 </h4>
 <textarea name="description" class="preq" rows="20" cols="74" wrap=virtual>${utility.encodeHTML(description)}</textarea>
 <if errors>
@@ -210,7 +240,7 @@ ${lang("comment.text")}
 </div>
 
 <h2>
-${lang("posting.step02")}
+${lang("content.step02")}
 </h2>
 <div class="pformstep02">
 <!-- EMAIL -->
@@ -255,61 +285,119 @@ ${lang("comment.language")}
 </div>
 
 <h2>
-${lang("posting.step03")}
+${lang("content.step03")}
 </h2>
+
+
 <div class="pformstep02">
+
+<list attachments as a>
+    <hr>
+    <h4>
+      ${utility.encodeHTML(a.filename)}
+    </h4>
+    <input type="checkbox" name="${a.fieldname}_cancel"> ${lang("content.media.cancel")}
+
+    <h4>
+      ${lang("content.media.title")} 
+    </h4>
+    <input type="text" class="preq" name="${a.fieldname}_title" size="40" maxlength="80" value="${utility.encodeHTML(a.title)}">
+</list>
+
+<hr>
+
 <table>
   <tr>
     <td>
-    ${lang("posting.media.title")} 1:
+    ${lang("content.media.title")} 1:
     </td>
     <td colspan="2">
       <input type="text" name="media1_title" size="40" maxlength="80" value=""><br>
     </td>
   </tr>
   <tr>
-    <td>${lang("posting.media.media")} 1</td>
+    <td>${lang("content.media.media")} 1</td>
     <td colspan="2">
       <INPUT TYPE="file" NAME="media1">
     </td>
   </tr>
   <tr>
     <td>
-    ${lang("posting.media.title")} 2:
+    ${lang("content.media.title")} 2:
     </td>
     <td colspan="2">
       <input type="text" name="media2_title" size="40" maxlength="80" value=""><br>
     </td>
   </tr>
   <tr>
-    <td>${lang("posting.media.media")} 2</td>
+    <td>${lang("content.media.media")} 2</td>
     <td colspan="2">
       <INPUT TYPE="file" NAME="media2">
     </td>
   </tr>
   <tr>
     <td>
-    ${lang("posting.media.title")} 3:
+    ${lang("content.media.title")} 3:
     </td>
     <td colspan="2">
       <input type="text" name="media3_title" size="40" maxlength="80" value=""><br>
     </td>
   </tr>
   <tr>
-    <td>${lang("posting.media.media")} 3</td>
+    <td>${lang("content.media.media")} 3</td>
     <td colspan="2">
       <INPUT TYPE="file" NAME="media3">
     </td>
   </tr>
 </table>
 
+<if config["Localizer.OpenSession.AllowFTPUploads"]!="0">
+  <if config["Localizer.OpenSession.AllowFTPUploadSelection"]!="0" && ftpfiles>
+    <hr>
+    <h4>
+      ${lang("content.media.ftpmedia")}
+    </h4>
+    <select name="ftpupload">
+      <option value="">&nbsp;</option>
+      <list ftpfiles as f>
+        <option value="${utility.encodeHTML(f)}">${f}</option>
+      </list>
+    </select>
+    
+    <h4>
+      ${lang("content.media.title")} 
+    </h4>
+    <input type="text" class="preq" name="ftpupload_title" size="40" maxlength="80" value="">
+  <else>
+    <hr>
+    <h4>
+      ${lang("content.media.ftpmedia")}
+    </h4>
+    <input type="text" name="ftpupload"  size="40" maxlength="80" value="">
+    <h4>
+      ${lang("content.media.title")} 
+    </h4>
+    <input type="text" class="preq" name="ftpupload_title" size="40" maxlength="80" value="">
+  </if>  
+</if>  
+
 </div>
 
 
 <h2>
-${lang("posting.step04")}
+${lang("content.step04")}
 </h2>
 <div class="pformstep06">
+<if password>
+<div class="ppassword">
+<img src="${actionURL}&amp;do=captcha"/>
+
+<p>${lang("content.password")}</p>
+
+<p><input type="text" name="password" size="10">
+<call showErrors("title")>
+</if>
+
 <div class="pbuttons">
 <input type="submit" name="post" class="psubmit" value="${lang("comment.submit")}">
 <input type="reset" class="preset" value="${lang("comment.reset")}">