r1557 - xwiki/trunk/web/standard/src/main/webapp/skins/xwiki10

Ludovic Dubost ludovic at users.forge.objectweb.org
Tue Nov 14 22:58:04 CET 2006


Author: ludovic
Date: 2006-11-14 22:58:03 +0100 (Tue, 14 Nov 2006)
New Revision: 1557

Modified:
   xwiki/trunk/web/standard/src/main/webapp/skins/xwiki10/editactions.vm
Log:
Fixed editactions.vm to not use this.form but document.forms.${formname}

Modified: xwiki/trunk/web/standard/src/main/webapp/skins/xwiki10/editactions.vm
===================================================================
--- xwiki/trunk/web/standard/src/main/webapp/skins/xwiki10/editactions.vm	2006-11-14 18:11:43 UTC (rev 1556)
+++ xwiki/trunk/web/standard/src/main/webapp/skins/xwiki10/editactions.vm	2006-11-14 21:58:03 UTC (rev 1557)
@@ -4,7 +4,7 @@
 #if((!$showactions)||($showactions==1))
 <script type="text/javascript">
 function checkDocumentContent() {
-  if (this.form.content) {
+  if (document.forms.${formname}.content) {
     var content = this.form.content.value;
     if (content == null || content == "") {
       alert("$msg.get('wikicontentcannotbeempty')");
@@ -19,9 +19,9 @@
    #set($param = "section=$sectionNumber")
 #end
 ##<div class="layoutsubsection editactions">
-  <button class="button" type="submit" name="formaction" value="_cancel_" onclick="this.form.action='$doc.getURL("cancel")'; if (this.form.onsubmit) this.form.onsubmit();if (checkDocumentContent()) this.form.submit(); return false;">$msg.get("cancel")</button>
-#if($previewenabled)  <button class="button" type="submit" name="formaction" value="_preview_" onclick="this.form.action='$doc.getURL("preview", $param)'; if (this.form.onsubmit) this.form.onsubmit();if (checkDocumentContent()) this.form.submit(); return false;">$msg.get("preview")</button>#end
-  <button class="button" type="submit" name="formaction" value="_saveandcontinue_" onclick="this.form.action='$doc.getURL("saveandcontinue", $param)'; if (this.form.onsubmit) this.form.onsubmit();if (checkDocumentContent()) this.form.submit(); return false;">$msg.get("saveandcontinue")</button>
-  <button  class="button" type="submit" name="formaction" value="_save_" onclick="this.form.action='$doc.getURL("${saveaction}", $param)'; if (this.form.onsubmit) this.form.onsubmit();if (checkDocumentContent()) this.form.submit(); return false;" >$msg.get("saveandview")</button>
+  <button class="button" type="submit" name="formaction" value="_cancel_" onclick="this.form.action='$doc.getURL("cancel")'; if (document.forms.${formname}.onsubmit) document.forms.${formname}.onsubmit();if (checkDocumentContent()) document.forms.${formname}.submit(); return false;">$msg.get("cancel")</button>
+#if($previewenabled)  <button class="button" type="submit" name="formaction" value="_preview_" onclick="document.forms.${formname}.action='$doc.getURL("preview", $param)'; if (document.forms.${formname}.onsubmit) document.forms.${formname}.onsubmit();if (checkDocumentContent()) document.forms.${formname}.submit(); return false;">$msg.get("preview")</button>#end
+  <button class="button" type="submit" name="formaction" value="_saveandcontinue_" onclick="document.forms.${formname}.action='$doc.getURL("saveandcontinue", $param)'; if (document.forms.${formname}.onsubmit) document.forms.${formname}.onsubmit();if (checkDocumentContent()) document.forms.${formname}.submit(); return false;">$msg.get("saveandcontinue")</button>
+  <button  class="button" type="submit" name="formaction" value="_save_" onclick="document.forms.${formname}.action='$doc.getURL("${saveaction}", $param)'; if (document.forms.${formname}.onsubmit) document.forms.${formname}.onsubmit();if (checkDocumentContent()) document.forms.${formname}.submit(); return false;" >$msg.get("saveandview")</button>
 ##</div>
 #end





More information about the Xwiki-notifications mailing list