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
(1) |
2
|
3
|
4
|
5
|
6
(3) |
7
(6) |
8
(3) |
9
|
10
(6) |
11
|
12
|
13
|
14
|
15
(6) |
16
|
17
(3) |
18
(3) |
19
|
20
|
21
|
22
|
23
(31) |
24
(8) |
25
(1) |
26
(3) |
27
(9) |
28
|
29
|
30
|
31
|
|
|
|
|
|
|
From: <ora...@us...> - 2006-12-18 01:12:20
|
Revision: 104 http://svn.sourceforge.net/pieforms/?rev=104&view=rev Author: oracleshinoda Date: 2006-12-17 17:12:20 -0800 (Sun, 17 Dec 2006) Log Message: ----------- Make sure the multicolumntable renderer doesn't try to pass on nonexistant values Modified Paths: -------------- pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php Modified: pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php =================================================================== --- pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php 2006-12-18 01:11:25 UTC (rev 103) +++ pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php 2006-12-18 01:12:20 UTC (rev 104) @@ -48,8 +48,8 @@ $formrenderermct->set_form($form); } -function pieform_renderer_multicolumntable_messages_js($id, $submitid) { - return pieform_renderer_table_messages_js($id, $submitid); +function pieform_renderer_multicolumntable_messages_js($id) { + return pieform_renderer_table_messages_js($id); } function pieform_renderer_multicolumntable_header() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2006-12-18 01:11:25
|
Revision: 103 http://svn.sourceforge.net/pieforms/?rev=103&view=rev Author: oracleshinoda Date: 2006-12-17 17:11:25 -0800 (Sun, 17 Dec 2006) Log Message: ----------- Actually make multiplebutton ajax submit work reasonably well now... Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2006-12-18 00:41:26 UTC (rev 102) +++ pieforms-php5/trunk/src/pieform.php 2006-12-18 01:11:25 UTC (rev 103) @@ -783,10 +783,13 @@ return $function($element, $this); } $global = ($this->method == 'get') ? $_GET : $_POST; - if (!empty($element['ajaxmessages']) && isset($global[$element['name']])) { + // If the element is a submit element and has its value in the request, return it + // Otherwise, we don't return the value if the form has been submitted, as they + // aren't normally returned using a standard form. + if (isset($element['value']) && !empty($element['ajaxmessages']) && isset($global[$element['name']])) { return $element['value']; } - if (isset($element['value'])) { + else if (isset($element['value']) && (!$this->is_submitted() || (empty($element['ajaxmessages'])))) { return $element['value']; } else if (isset($global[$element['name']]) && $element['type'] != 'submit') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2006-12-18 00:41:31
|
Revision: 102 http://svn.sourceforge.net/pieforms/?rev=102&view=rev Author: oracleshinoda Date: 2006-12-17 16:41:26 -0800 (Sun, 17 Dec 2006) Log Message: ----------- Allowed the form tag to be retrieved separately from the rest of the form, which allows more flexibility in how the form is built. Hopefully fix up the passing of the submit value for ajax calls now as well Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2006-12-17 23:27:39 UTC (rev 101) +++ pieforms-php5/trunk/src/pieform.php 2006-12-18 00:41:26 UTC (rev 102) @@ -679,6 +679,24 @@ } /** + * Returns the HTML for the <form...> tag + * + * @return string + */ + public function get_form_tag() { + $result = '<form'; + foreach (array('name', 'method', 'action') as $attribute) { + $result .= ' ' . $attribute . '="' . $this->{$attribute} . '"'; + } + $result .= ' id="' . $this->name . '"'; + if ($this->fileupload) { + $result .= ' enctype="multipart/form-data"'; + } + $result .= '>'; + return $result; + } + + /** * Returns whether the form has been submitted * * @return bool @@ -695,20 +713,15 @@ * the other hand, this means you must be careful about escaping the URL, * especially if it has data from an external source in it. * + * @param boolean Whether to include the <form...></form> tags in the output * @return string The form as HTML */ - public function build() { - $result = '<form'; - foreach (array('name', 'method', 'action') as $attribute) { - $result .= ' ' . $attribute . '="' . $this->{$attribute} . '"'; + public function build($outputformtags=true) { + $result = ''; + if ($outputformtags) { + $result = $this->get_form_tag() . "\n"; } - $result .= ' id="' . $this->name . '"'; - if ($this->fileupload) { - $result .= ' enctype="multipart/form-data"'; - } - $result .= ">\n"; - // @todo masks attempts in pieform_render_element, including the error handling there $this->include_plugin('renderer', $this->renderer); // Form header @@ -743,7 +756,9 @@ 'value' => '' ); $result .= pieform_render_hidden($element, $this); - $result .= "</form>\n"; + if ($outputformtags) { + $result .= "</form>\n"; + } if ($this->ajaxpost) { $result .= '<script language="javascript" type="text/javascript">'; @@ -768,6 +783,9 @@ return $function($element, $this); } $global = ($this->method == 'get') ? $_GET : $_POST; + if (!empty($element['ajaxmessages']) && isset($global[$element['name']])) { + return $element['value']; + } if (isset($element['value'])) { return $element['value']; } @@ -934,7 +952,7 @@ } // Add only the submit button that was clicked - $result .= " data['{$this->name}_' + {$this->name}_btn] = document.forms['$this->name'].elements['{$this->name}_' + {$this->name}_btn].value;\n"; + $result .= " data[{$this->name}_btn] = document.forms['$this->name'].elements['{$this->name}_' + {$this->name}_btn].value;\n"; // Add the hidden element for detecting form submission $result .= " data['pieform_{$this->name}'] = '';\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |