pieforms-commit Mailing List for Pieforms
Status: Alpha
Brought to you by:
oracleshinoda
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(73) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(16) |
Feb
(19) |
Mar
(12) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(14) |
Sep
(2) |
Oct
(1) |
Nov
(2) |
Dec
(45) |
2008 |
Jan
(20) |
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
(5) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(7) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
(1) |
18
(30) |
19
(11) |
20
(13) |
21
(9) |
22
(3) |
23
(2) |
24
|
25
(1) |
26
|
27
|
28
(2) |
29
(1) |
30
|
|
|
From: <ora...@us...> - 2006-11-29 02:55:14
|
Revision: 73 http://svn.sourceforge.net/pieforms/?rev=73&view=rev Author: oracleshinoda Date: 2006-11-28 18:55:14 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Fix up obvious fuckups, remove restriction on needing to define the default submit function Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/submitcancel.php pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform/elements/submitcancel.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/submitcancel.php 2006-11-28 23:22:36 UTC (rev 72) +++ pieforms-php5/trunk/src/pieform/elements/submitcancel.php 2006-11-29 02:55:14 UTC (rev 73) @@ -42,8 +42,6 @@ } function pieform_render_submitcancel_set_attributes($element) { - // @todo change to 'submitelement' => true, more generic and can be used - // for working out which submit button was pressed $element['ajaxmessages'] = true; return $element; } Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2006-11-28 23:22:36 UTC (rev 72) +++ pieforms-php5/trunk/src/pieform.php 2006-11-29 02:55:14 UTC (rev 73) @@ -556,17 +556,19 @@ // Submit the form if things went OK if ($this->submit && !$this->has_errors()) { + $submitted = false; foreach ($this->get_elements() as $element) { // @todo Rename 'ajaxmessages' to 'submitelement' - if ($element['ajaxmessages'] == true && isset($values[$element['name']])) { + if (!empty($element['ajaxmessages']) == true && isset($values[$element['name']])) { $function = "{$this->name}_submit_{$element['name']}"; if (function_exists($function)) { $function($values); + $submitted = true; break; } } } - else if (function_exists($this->submitfunction)) { + if (!$submitted && function_exists($this->submitfunction)) { $function = $this->submitfunction; // Call the user defined function for processing a submit // This function should really redirect/exit after it has @@ -582,7 +584,7 @@ //} //throw new PieformException($message); } - else { + else if (!$submitted) { throw new PieformException('No function registered to handle form submission for form "' . $this->name . '"'); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |