Thread: [Pieforms-commit] SF.net SVN: pieforms: [164] pieforms-php5/branches/0.2.0/src/pieform.php
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2007-01-07 21:12:15
|
Revision: 164 http://svn.sourceforge.net/pieforms/?rev=164&view=rev Author: oracleshinoda Date: 2007-01-07 13:12:16 -0800 (Sun, 07 Jan 2007) Log Message: ----------- Merged pieform_validate patch to 0.2.0 branch Modified Paths: -------------- pieforms-php5/branches/0.2.0/src/pieform.php Modified: pieforms-php5/branches/0.2.0/src/pieform.php =================================================================== --- pieforms-php5/branches/0.2.0/src/pieform.php 2007-01-07 21:05:58 UTC (rev 163) +++ pieforms-php5/branches/0.2.0/src/pieform.php 2007-01-07 21:12:16 UTC (rev 164) @@ -499,11 +499,6 @@ $values = $this->get_submitted_values(); // Perform general validation first $this->validate($values); - // Then user specific validation if a function is available for that - $function = $this->data['validatecallback']; - if (is_callable($function)) { - call_user_func_array($function, array($this, $values)); - } // Submit the form if things went OK if ($this->data['submit'] && !$this->has_errors()) { @@ -805,6 +800,12 @@ * @param array $values The submitted values from the form */ private function validate($values) { + // Call the overall validation function if it is available + if (function_exists('pieform_validate')) { + pieform_validate($this, $values); + } + + // Perform rule validation foreach ($this->get_elements() as $element) { if (isset($element['rules']) && is_array($element['rules'])) { foreach ($element['rules'] as $rule => $data) { @@ -829,6 +830,12 @@ } } } + + // Then user specific validation if a function is available for that + $function = $this->data['validatecallback']; + if (is_callable($function)) { + call_user_func_array($function, array($this, $values)); + } } private function whichbutton_js() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2007-02-09 08:38:04
|
Revision: 178 http://svn.sourceforge.net/pieforms/?rev=178&view=rev Author: oracleshinoda Date: 2007-02-09 00:38:01 -0800 (Fri, 09 Feb 2007) Log Message: ----------- Merged commit 177 from trunk Modified Paths: -------------- pieforms-php5/branches/0.2.0/src/pieform.php Modified: pieforms-php5/branches/0.2.0/src/pieform.php =================================================================== --- pieforms-php5/branches/0.2.0/src/pieform.php 2007-02-09 07:50:51 UTC (rev 177) +++ pieforms-php5/branches/0.2.0/src/pieform.php 2007-02-09 08:38:01 UTC (rev 178) @@ -890,8 +890,6 @@ * without the breakage. */ private function submit_js() { - $strprocessingform = get_string('processingform'); - $result = <<<EOF connect($('{$this->name}'), 'onsubmit', function(e) { if (typeof(tinyMCE) != 'undefined') { tinyMCE.triggerSave(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2007-02-14 08:37:03
|
Revision: 183 http://svn.sourceforge.net/pieforms/?rev=183&view=rev Author: oracleshinoda Date: 2007-02-14 00:37:02 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Fixed the rules-apply-differently-depending-on-element thing. Not sure how this fix wasn't already checked in... Modified Paths: -------------- pieforms-php5/branches/0.2.0/src/pieform.php Modified: pieforms-php5/branches/0.2.0/src/pieform.php =================================================================== --- pieforms-php5/branches/0.2.0/src/pieform.php 2007-02-11 09:43:21 UTC (rev 182) +++ pieforms-php5/branches/0.2.0/src/pieform.php 2007-02-14 08:37:02 UTC (rev 183) @@ -831,7 +831,7 @@ if (!$this->get_error($element['name'])) { // See if this element has a function that describes // how this rule should apply to it - $function = 'pieform_element_' . $element['name'] . '_rule_' . $rule; + $function = 'pieform_element_' . $element['type'] . '_rule_' . $rule; if (!function_exists($function)) { // Try instead the default rule function $function = 'pieform_rule_' . $rule; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2007-02-27 04:42:40
|
Revision: 190 http://svn.sourceforge.net/pieforms/?rev=190&view=rev Author: oracleshinoda Date: 2007-02-26 20:42:39 -0800 (Mon, 26 Feb 2007) Log Message: ----------- When the successcallback is overridden, allow each submit button to have its own success function named after the overridden name (thanks to Jeremy for that) Modified Paths: -------------- pieforms-php5/branches/0.2.0/src/pieform.php Modified: pieforms-php5/branches/0.2.0/src/pieform.php =================================================================== --- pieforms-php5/branches/0.2.0/src/pieform.php 2007-02-19 23:17:52 UTC (rev 189) +++ pieforms-php5/branches/0.2.0/src/pieform.php 2007-02-27 04:42:39 UTC (rev 190) @@ -524,7 +524,7 @@ $submitted = false; foreach ($this->get_elements() as $element) { if (!empty($element['submitelement']) && isset($global[$element['name']])) { - $function = "{$this->name}_submit_{$element['name']}"; + $function = "{$this->data['successcallback']}_{$element['name']}"; if (function_exists($function)) { $function($this, $values); $submitted = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |