--- vendor/trac/current/htdocs/js/trac.js	2006-03-01 12:26:49.232124500 +0100
+++ trunk/trac/htdocs/js/trac.js	2006-03-01 12:46:35.732124500 +0100
@@ -126,3 +126,28 @@
     addLinks(container.getElementsByTagName('h' + lvl));
   }
 }
+
+function confirmWiki() {
+  var comment = document.getElementById("comment");
+
+  if ( comment.value == '' ) {
+    var force;
+
+    force = confirm('Comment field is empty.\n' +
+                   'Are you sure to leave the modifications with no comments ?\n' +
+                   '(Comments are useful to get a quick overview of the changes)');
+
+    if ( force ) {
+      return true;
+    } 
+    else {
+      comment.focus();
+
+      return false;
+    }
+
+  }
+
+  return true;
+}
+

--- vendor/trac/current/templates/wiki.cs	2006-01-30 19:32:40.161777600 +0100
+++ trunk/trac/templates/wiki.cs	2006-01-30 19:37:41.042554400 +0100
@@ -264,7 +264,9 @@
       <input type="submit" name="save" value="Submit changes" disabled="disabled" />&nbsp;
      <?cs else ?>
       <input type="submit" name="preview" value="Preview" accesskey="r" />&nbsp;
-      <input type="submit" name="save" value="Submit changes" />&nbsp;
+      <?cs if wiki.action == "preview" ?> 
+       <input type="submit" name="save" value="Submit changes" onclick="return confirmWiki()"/>&nbsp;
+      <?cs /if ?>
      <?cs /if ?>
      <input type="submit" name="cancel" value="Cancel" />
     </div>

