[Pieforms-commit] SF.net SVN: pieforms: [261] pieforms-php5/trunk/src/pieform.php
Status: Alpha
Brought to you by:
oracleshinoda
|
From: <ora...@us...> - 2007-12-31 12:13:11
|
Revision: 261
http://pieforms.svn.sourceforge.net/pieforms/?rev=261&view=rev
Author: oracleshinoda
Date: 2007-12-31 04:13:15 -0800 (Mon, 31 Dec 2007)
Log Message:
-----------
Tidy up a couple of comments. Make the javascript for the form output itself on one line.
Modified Paths:
--------------
pieforms-php5/trunk/src/pieform.php
Modified: pieforms-php5/trunk/src/pieform.php
===================================================================
--- pieforms-php5/trunk/src/pieform.php 2007-12-31 09:05:31 UTC (rev 260)
+++ pieforms-php5/trunk/src/pieform.php 2007-12-31 12:13:15 UTC (rev 261)
@@ -622,14 +622,17 @@
}
}
- // Output the javascript to wire things up, but only if it is needed. The two cases where it is needed is when:
+ // Output the javascript to wire things up, but only if it is needed.
+ // The two cases where it is needed is when:
// 1) The form is a JS form that hasn't been submitted yet. When the
// form has been submitted the javascript from the first page load is
// still active in the documente
// 2) The form is NOT a JS form, but has a presubmitcallback
if (($this->data['jsform'] && !$this->submitted)
|| (!$this->data['jsform'] && $this->data['presubmitcallback'])) {
- $result .= '<script type="text/javascript">';
+ // Establish which buttons in the form are submit buttons. This is
+ // used to detect which button was pressed to cause the form
+ // submission
$submitbuttons = array();
foreach ($this->elementrefs as $element) {
if (!empty($element['submitelement'])) {
@@ -648,8 +651,7 @@
'globalJsErrorCallback' => $this->data['globaljserrorcallback'],
'postSubmitCallback' => $this->data['postsubmitcallback'],
));
- $result .= "new Pieform($data);\n";
- $result .= "</script>\n";
+ $result .= "<script type=\"text/javascript\">new Pieform($data);</script>\n";
}
return $result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|