pieforms-commit Mailing List for Pieforms (Page 2)
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
|
From: <ora...@us...> - 2008-11-15 23:37:21
|
Revision: 298 http://pieforms.svn.sourceforge.net/pieforms/?rev=298&view=rev Author: oracleshinoda Date: 2008-11-15 23:37:18 +0000 (Sat, 15 Nov 2008) Log Message: ----------- Allow elements to accept the 'autofocus' attribute Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-10-13 23:17:03 UTC (rev 297) +++ pieforms-php5/trunk/src/pieform.php 2008-11-15 23:37:18 UTC (rev 298) @@ -983,7 +983,7 @@ * @return string The attributes for the element */ public function element_attributes($element, $exclude=array()) {/*{{{*/ - static $attributes = array('accesskey', 'class', 'dir', 'id', 'lang', 'name', 'onclick', 'size', 'style', 'tabindex'); + static $attributes = array('accesskey', 'autocomplete', 'class', 'dir', 'id', 'lang', 'name', 'onclick', 'size', 'style', 'tabindex'); $elementattributes = array_diff($attributes, $exclude); $result = ''; foreach ($elementattributes as $attribute) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-10-13 23:17:13
|
Revision: 297 http://pieforms.svn.sourceforge.net/pieforms/?rev=297&view=rev Author: oracleshinoda Date: 2008-10-13 23:17:03 +0000 (Mon, 13 Oct 2008) Log Message: ----------- Don't call the Pieform js function on nonexistent form. Thanks to Richard Mansfield. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-07-23 22:55:36 UTC (rev 296) +++ pieforms-php5/trunk/src/pieform.php 2008-10-13 23:17:03 UTC (rev 297) @@ -668,8 +668,9 @@ // form has been submitted the javascript from the first page load is // still active in the document // 2) The form is NOT a JS form, but has a presubmitcallback - if (($this->data['jsform'] && !$this->submitted) - || (!$this->data['jsform'] && $this->data['presubmitcallback'])) { + if ($outputformtags && + (($this->data['jsform'] && !$this->submitted) + || (!$this->data['jsform'] && $this->data['presubmitcallback']))) { // Establish which buttons in the form are submit buttons. This is // used to detect which button was pressed to cause the form // submission This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-07-23 22:55:28
|
Revision: 296 http://pieforms.svn.sourceforge.net/pieforms/?rev=296&view=rev Author: oracleshinoda Date: 2008-07-23 22:55:36 +0000 (Wed, 23 Jul 2008) Log Message: ----------- Updated Japanese translation of bytes element from Mits. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/bytes.php Modified: pieforms-php5/trunk/src/pieform/elements/bytes.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/bytes.php 2008-07-13 03:58:37 UTC (rev 295) +++ pieforms-php5/trunk/src/pieform/elements/bytes.php 2008-07-23 22:55:36 UTC (rev 296) @@ -140,9 +140,9 @@ 'invalidvalue' => 'Valeur doit être un nombre', ), 'ja.utf8' => array( - 'bytes' => 'バイト', - 'kilobytes' => 'キロバイト', - 'megabytes' => 'メガバイト', + 'bytes' => 'B', + 'kilobytes' => 'KB', + 'megabytes' => 'MB', 'invalidvalue' => '値は数値にしてください', ), ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-07-13 03:58:28
|
Revision: 295 http://pieforms.svn.sourceforge.net/pieforms/?rev=295&view=rev Author: oracleshinoda Date: 2008-07-12 20:58:37 -0700 (Sat, 12 Jul 2008) Log Message: ----------- Added Japanese translation, thanks to Mits Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/bytes.php pieforms-php5/trunk/src/pieform/elements/calendar.php pieforms-php5/trunk/src/pieform/elements/date.php pieforms-php5/trunk/src/pieform/elements/expiry.php pieforms-php5/trunk/src/pieform/rules/before.php pieforms-php5/trunk/src/pieform/rules/email.php pieforms-php5/trunk/src/pieform/rules/integer.php pieforms-php5/trunk/src/pieform/rules/maxlength.php pieforms-php5/trunk/src/pieform/rules/maxvalue.php pieforms-php5/trunk/src/pieform/rules/minvalue.php pieforms-php5/trunk/src/pieform/rules/regex.php pieforms-php5/trunk/src/pieform/rules/required.php pieforms-php5/trunk/src/pieform/rules/validateoptions.php Modified: pieforms-php5/trunk/src/pieform/elements/bytes.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/bytes.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/elements/bytes.php 2008-07-13 03:58:37 UTC (rev 295) @@ -139,6 +139,12 @@ 'megabytes' => 'Mégaoctets', 'invalidvalue' => 'Valeur doit être un nombre', ), + 'ja.utf8' => array( + 'bytes' => 'バイト', + 'kilobytes' => 'キロバイト', + 'megabytes' => 'メガバイト', + 'invalidvalue' => '値は数値にしてください', + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/elements/calendar.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/calendar.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/elements/calendar.php 2008-07-13 03:58:37 UTC (rev 295) @@ -161,6 +161,9 @@ 'fr.utf8' => array( 'invalidvalue' => 'Date/Heure indiquée invalide' ), + 'ja.utf8' => array( + 'invalidvalue' => '無効な日付/時間が指定されました' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/elements/date.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/date.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/elements/date.php 2008-07-13 03:58:37 UTC (rev 295) @@ -141,6 +141,10 @@ 'or' => 'ou', 'notspecified' => 'Non indiqué' ), + 'ja.utf8' => array( + 'or' => 'or', + 'notspecified' => '指定なし' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/elements/expiry.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/expiry.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/elements/expiry.php 2008-07-13 03:58:37 UTC (rev 295) @@ -145,6 +145,13 @@ 'years' => 'Années', 'noenddate' => 'Pas de date de fin' ), + 'ja.utf8' => array( + 'days' => '日', + 'weeks' => '週', + 'months' => '月', + 'years' => '年', + 'noenddate' => '終了日なし' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/before.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/before.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/before.php 2008-07-13 03:58:37 UTC (rev 295) @@ -54,6 +54,9 @@ 'fr.utf8' => array( 'before' => 'Ceci ne peut pas être placé après le champ "%s"' ), + 'ja.utf8' => array( + 'before' => 'フィールド「 %s 」の後に設定することはできません' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/email.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/email.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/email.php 2008-07-13 03:58:37 UTC (rev 295) @@ -53,6 +53,9 @@ 'fr.utf8' => array( 'email' => 'Cette adresse de courriel n\'est pas valide' ), + 'ja.utf8' => array( + 'email' => 'メールアドレスが有効ではありません' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/integer.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/integer.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/integer.php 2008-07-13 03:58:37 UTC (rev 295) @@ -50,6 +50,9 @@ 'fr.utf8' => array( 'integer' => 'Ce champ doit être un nombre entier' ), + 'ja.utf8' => array( + 'integer' => 'フィールドは整数にしてください' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/maxlength.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/maxlength.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/maxlength.php 2008-07-13 03:58:37 UTC (rev 295) @@ -50,6 +50,9 @@ 'fr.utf8' => array( 'maxlength' => 'Ce champ ne peut pas contenir plus de %d signes' ), + 'ja.utf8' => array( + 'maxlength' => 'このフィールドは、最大半角 %d 文字にしてください' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/maxvalue.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/maxvalue.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/maxvalue.php 2008-07-13 03:58:37 UTC (rev 295) @@ -50,6 +50,9 @@ 'fr.utf8' => array( 'maxvalue' => 'Cette valeur ne peut pas supérieure à %d' ), + 'ja.utf8' => array( + 'maxvalue' => 'この値は %d 以下にしてください' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/minvalue.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/minvalue.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/minvalue.php 2008-07-13 03:58:37 UTC (rev 295) @@ -50,6 +50,9 @@ 'fr.utf8' => array( 'minvalue' => 'Cette valeur ne peut pas être inférieure à %d' ), + 'ja.utf8' => array( + 'minvalue' => 'この値は %d 以下にすることはできません' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/regex.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/regex.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/regex.php 2008-07-13 03:58:37 UTC (rev 295) @@ -51,6 +51,9 @@ 'fr.utf8' => array( 'regex' => 'Ce champ n\'a pas une forme correcte' ), + 'ja.utf8' => array( + 'regex' => 'このフィールドは正しい形式ではありません' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/required.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/required.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/required.php 2008-07-13 03:58:37 UTC (rev 295) @@ -50,6 +50,9 @@ 'fr.utf8' => array( 'required' => 'Ce champ est obligatoire' ), + 'ja.utf8' => array( + 'required' => 'このフィールドは、必須入力フィールドです。' + ), ); }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/validateoptions.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/validateoptions.php 2008-07-07 03:16:10 UTC (rev 294) +++ pieforms-php5/trunk/src/pieform/rules/validateoptions.php 2008-07-13 03:58:37 UTC (rev 295) @@ -58,6 +58,9 @@ 'fr.utf8' => array( 'validateoptions' => 'Cette option "%s" n\'est pas valide' ), + 'ja.utf8' => array( + 'validateoptions' => 'オプション「 %s 」が正しくありません' + ), ); }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-07-07 03:16:10
|
Revision: 294 http://pieforms.svn.sourceforge.net/pieforms/?rev=294&view=rev Author: oracleshinoda Date: 2008-07-06 20:16:10 -0700 (Sun, 06 Jul 2008) Log Message: ----------- Fix an old bug - only check for submitted values if the form has actually been submitted. Previously, the value was checked for regardless of whether the form had been submitted, leading to obscure problems when there was two forms on the page. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/calendar.php pieforms-php5/trunk/src/pieform/elements/date.php pieforms-php5/trunk/src/pieform/elements/image.php pieforms-php5/trunk/src/pieform/elements/password.php pieforms-php5/trunk/src/pieform/elements/select.php pieforms-php5/trunk/src/pieform/elements/textarea.php pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform/elements/calendar.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/calendar.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform/elements/calendar.php 2008-07-07 03:16:10 UTC (rev 294) @@ -126,7 +126,7 @@ return $element['value']; } - if (isset($global[$name])) { + if ($form->is_submitted() && isset($global[$name])) { if (trim($global[$name]) == '') { return null; } Modified: pieforms-php5/trunk/src/pieform/elements/date.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/date.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform/elements/date.php 2008-07-07 03:16:10 UTC (rev 294) @@ -116,7 +116,7 @@ function pieform_element_date_get_value(Pieform $form, $element) {/*{{{*/ $name = $element['name']; $global = ($form->get_property('method') == 'get') ? $_GET : $_POST; - if ( isset($global[$name . '_day']) && isset($global[$name . '_month']) && isset($global[$name . '_year']) ) { + if ($form->is_submitted() && isset($global[$name . '_day']) && isset($global[$name . '_month']) && isset($global[$name . '_year'])) { $time = mktime(0, 0, 0, $global[$name . '_month'], $global[$name . '_day'], $global[$name . '_year']); if (false === $time) { return null; Modified: pieforms-php5/trunk/src/pieform/elements/image.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/image.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform/elements/image.php 2008-07-07 03:16:10 UTC (rev 294) @@ -54,7 +54,7 @@ } $global = $form->get_property('method') == 'get' ? $_GET : $_POST; - if (isset($global[$element['name'] . '_x'])) { + if ($form->is_submitted() && isset($global[$element['name'] . '_x'])) { return true; } Modified: pieforms-php5/trunk/src/pieform/elements/password.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/password.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform/elements/password.php 2008-07-07 03:16:10 UTC (rev 294) @@ -39,7 +39,7 @@ function pieform_element_password_get_value(Pieform $form, $element) {/*{{{*/ $global = ($form->get_property('method') == 'get') ? $_GET : $_POST; - if (isset($global[$element['name']])) { + if ($form->is_submitted() && isset($global[$element['name']])) { return $global[$element['name']]; } if (isset($element['value'])) { Modified: pieforms-php5/trunk/src/pieform/elements/select.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/select.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform/elements/select.php 2008-07-07 03:16:10 UTC (rev 294) @@ -136,7 +136,7 @@ if (isset($element['value'])) { $values = (array) $element['value']; } - else if (isset($global[$element['name']])) { + else if ($form->is_submitted() && isset($global[$element['name']])) { $values = (array) $global[$element['name']]; } else if (isset($element['defaultvalue'])) { @@ -157,7 +157,7 @@ if (isset($element['value'])) { $values = (array) $element['value']; } - else if (isset($global[$element['name']])) { + else if ($form->is_submitted() && isset($global[$element['name']])) { $values = (array) $global[$element['name']]; } else if (!$form->is_submitted() && isset($element['defaultvalue'])) { Modified: pieforms-php5/trunk/src/pieform/elements/textarea.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/textarea.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform/elements/textarea.php 2008-07-07 03:16:10 UTC (rev 294) @@ -79,7 +79,7 @@ } $global = ($form->get_property('method') == 'get') ? $_GET : $_POST; - if (isset($global[$element['name']])) { + if ($form->is_submitted() && isset($global[$element['name']])) { return str_replace("\r\n", "\n", $global[$element['name']]); } Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-03-25 05:15:13 UTC (rev 293) +++ pieforms-php5/trunk/src/pieform.php 2008-07-07 03:16:10 UTC (rev 294) @@ -716,7 +716,7 @@ if (isset($element['value'])) { return $element['value']; } - else if (isset($global[$element['name']]) && $element['type'] != 'submit') { + else if ($this->submitted && isset($global[$element['name']]) && $element['type'] != 'submit') { return $global[$element['name']]; } else if (isset($element['defaultvalue'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-03-25 05:15:35
|
Revision: 293 http://pieforms.svn.sourceforge.net/pieforms/?rev=293&view=rev Author: oracleshinoda Date: 2008-03-24 22:15:13 -0700 (Mon, 24 Mar 2008) Log Message: ----------- Allow specifying a class for fieldset elements. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/fieldset.php Modified: pieforms-php5/trunk/src/pieform/elements/fieldset.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/fieldset.php 2008-03-09 23:41:29 UTC (rev 292) +++ pieforms-php5/trunk/src/pieform/elements/fieldset.php 2008-03-25 05:15:13 UTC (rev 293) @@ -34,7 +34,7 @@ */ function pieform_element_fieldset(Pieform $form, $element) {/*{{{*/ $result = "\n<fieldset"; - if (!empty($element['collapsible'])) { + if (!empty($element['collapsible']) || !empty($element['class'])) { if (!isset($element['legend']) || $element['legend'] === '') { Pieform::info('Collapsible fieldsets should have a legend so they can be toggled'); } @@ -50,6 +50,9 @@ if (!empty($element['collapsed']) && !$error) { $classes[] = 'collapsed'; } + if (!empty($element['class'])) { + $classes[] = $element['class']; + } $result .= ' class="' . implode(' ', $classes) . '"'; } $result .= ">\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-03-09 23:43:32
|
Revision: 292 http://pieforms.svn.sourceforge.net/pieforms/?rev=292&view=rev Author: oracleshinoda Date: 2008-03-09 16:41:29 -0700 (Sun, 09 Mar 2008) Log Message: ----------- Add support for two dimensional arrays to the hidden element. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/hidden.php Modified: pieforms-php5/trunk/src/pieform/elements/hidden.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/hidden.php 2008-02-28 08:43:47 UTC (rev 291) +++ pieforms-php5/trunk/src/pieform/elements/hidden.php 2008-03-09 23:41:29 UTC (rev 292) @@ -39,8 +39,16 @@ if (is_array($value)) { $result = ''; foreach ($value as $k => $v) { - $result .= '<input type="hidden" name="' . Pieform::hsc($element['name']) - . '[' . Pieform::hsc($k) . ']" value="' . Pieform::hsc($v) . "\">\n"; + if (is_array($v)) { + foreach ($v as $subk => $subv) { + $result .= '<input type="hidden" name="' . Pieform::hsc($element['name']) + . '[' . Pieform::hsc($k) . '][' . Pieform::hsc($subk) . ']" value="' . Pieform::hsc($subv) . "\">\n"; + } + } + else { + $result .= '<input type="hidden" name="' . Pieform::hsc($element['name']) + . '[' . Pieform::hsc($k) . ']" value="' . Pieform::hsc($v) . "\">\n"; + } } return $result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-02-28 08:43:49
|
Revision: 291 http://pieforms.svn.sourceforge.net/pieforms/?rev=291&view=rev Author: oracleshinoda Date: 2008-02-28 00:43:47 -0800 (Thu, 28 Feb 2008) Log Message: ----------- Fixed a warning caused by not making a variable a global properly. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/textarea.php Modified: pieforms-php5/trunk/src/pieform/elements/textarea.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/textarea.php 2008-02-26 22:13:42 UTC (rev 290) +++ pieforms-php5/trunk/src/pieform/elements/textarea.php 2008-02-28 08:43:47 UTC (rev 291) @@ -25,6 +25,7 @@ */ // TODO: plugins as classes... +global $_PIEFORM_TEXTAREAS; $_PIEFORM_TEXTAREAS = array(); /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-02-26 22:13:38
|
Revision: 290 http://pieforms.svn.sourceforge.net/pieforms/?rev=290&view=rev Author: oracleshinoda Date: 2008-02-26 14:13:42 -0800 (Tue, 26 Feb 2008) Log Message: ----------- Added 'submit' and 'cancel' classes to the buttons in the submitcancel element, making them easier to tell apart. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/submitcancel.php Modified: pieforms-php5/trunk/src/pieform/elements/submitcancel.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/submitcancel.php 2008-02-26 03:28:20 UTC (rev 289) +++ pieforms-php5/trunk/src/pieform/elements/submitcancel.php 2008-02-26 22:13:42 UTC (rev 290) @@ -39,8 +39,10 @@ $form->include_plugin('element', 'submit'); $form->include_plugin('element', 'cancel'); $submitelement = $element; + $submitelement['class'] = (isset($submitelement['class'])) ? $submitelement['class'] . ' submit' : 'submit'; $submitelement['value'] = $element['value'][0]; $cancelelement = $element; + $cancelelement['class'] = (isset($cancelelement['class'])) ? $cancelelement['class'] . ' cancel' : 'cancel'; $cancelelement['value'] = $element['value'][1]; if (isset($element['confirm']) && isset($element['confirm'][0])) { $submitelement['confirm'] = $element['confirm'][0]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-02-26 03:28:16
|
Revision: 289 http://pieforms.svn.sourceforge.net/pieforms/?rev=289&view=rev Author: oracleshinoda Date: 2008-02-25 19:28:20 -0800 (Mon, 25 Feb 2008) Log Message: ----------- Allow the description line to be output as two cells rather than just one with a colspan if the user wants. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/renderers/table.php Modified: pieforms-php5/trunk/src/pieform/renderers/table.php =================================================================== --- pieforms-php5/trunk/src/pieform/renderers/table.php 2008-01-30 02:33:29 UTC (rev 288) +++ pieforms-php5/trunk/src/pieform/renderers/table.php 2008-02-26 03:28:20 UTC (rev 289) @@ -80,7 +80,12 @@ // Description - optional description of the element, or other note that should be visible // on the form itself (without the user having to hover over contextual help if ((!$form->has_errors() || $form->get_property('showdescriptiononerror')) && !empty($element['description'])) { - $result .= "\t<tr>\n\t\t<td colspan=\"2\" class=\"description\">"; + if ($form->get_property('descriptionintwocells')) { + $result .= "\t<tr>\n\t\t<td></td><td class=\"description\">"; + } + else { + $result .= "\t<tr>\n\t\t<td colspan=\"2\" class=\"description\">"; + } $result .= $element['description']; $result .= "</td>\n\t</tr>\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-30 02:33:25
|
Revision: 288 http://pieforms.svn.sourceforge.net/pieforms/?rev=288&view=rev Author: oracleshinoda Date: 2008-01-29 18:33:29 -0800 (Tue, 29 Jan 2008) Log Message: ----------- Added a new method, 'reply', to handle JSON replying or calling a PHP reply callback. I'm sure this feature is badly designed and needs work, but it's in Mahara for now. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-01-29 04:27:29 UTC (rev 287) +++ pieforms-php5/trunk/src/pieform.php 2008-01-30 02:33:29 UTC (rev 288) @@ -222,6 +222,10 @@ $this->data['successcallback'] = $this->name . '_submit'; } + if (!$this->data['replycallback']) { + $this->data['replycallback'] = $this->name . '_reply'; + } + $this->data['configdirs'] = array_map( create_function('$a', 'return substr($a, -1) == "/" ? substr($a, 0, -1) : $a;'), (array) $this->data['configdirs']); @@ -426,7 +430,7 @@ call_user_func_array($function, array($this, $values)); if ($this->data['dieaftersubmit']) { if ($this->data['jsform']) { - $message = 'Your ' . $this->name . '_submit function should use $form->json_reply to send a response'; + $message = 'Your ' . $this->name . '_submit function should use $form->reply to send a response, which should redirect or exit when it is done. Perhaps you want to make your reply callback do this?'; } else { $message = 'Your ' . $this->name . '_submit function should redirect or exit when it is done'; @@ -763,6 +767,20 @@ }/*}}}*/ /** + * Sends a message back to a form + */ + public function reply($returncode, $message) { + if ($this->submitted_by_js()) { + $this->json_reply($returncode, $message); + } + + $function = $this->get_property('replycallback'); + if (function_exists($function)) { + call_user_func_array($function, array($returncode, $message)); + } + } + + /** * Sends a message back to a jsform. * * The message can contain almost any data, although how it is used is up to @@ -1307,6 +1325,10 @@ // button in the form 'successcallback' => '', + // The PHP callback called to handle replying to the form after + // either a success or fail. Optional + 'replycallback' => '', + // The PHP callback called if there is any validation error. Optional 'errorcallback' => '', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:27:24
|
Revision: 287 http://pieforms.svn.sourceforge.net/pieforms/?rev=287&view=rev Author: oracleshinoda Date: 2008-01-28 20:27:29 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Removed stupid BOMs from files. Modified Paths: -------------- pieforms-php5/trunk/src/static/jscalendar/lang/calendar-br.js pieforms-php5/trunk/src/static/jscalendar/lang/calendar-el.js pieforms-php5/trunk/src/static/jscalendar/lang/calendar-fi.js pieforms-php5/trunk/src/static/jscalendar/lang/calendar-pl-utf8.js Modified: pieforms-php5/trunk/src/static/jscalendar/lang/calendar-br.js =================================================================== --- pieforms-php5/trunk/src/static/jscalendar/lang/calendar-br.js 2008-01-29 04:26:57 UTC (rev 286) +++ pieforms-php5/trunk/src/static/jscalendar/lang/calendar-br.js 2008-01-29 04:27:29 UTC (rev 287) @@ -1,4 +1,4 @@ -// ** I18N +// ** I18N // Calendar pt-BR language // Author: Fernando Dourado, <fer...@ig...> Modified: pieforms-php5/trunk/src/static/jscalendar/lang/calendar-el.js =================================================================== --- pieforms-php5/trunk/src/static/jscalendar/lang/calendar-el.js 2008-01-29 04:26:57 UTC (rev 286) +++ pieforms-php5/trunk/src/static/jscalendar/lang/calendar-el.js 2008-01-29 04:27:29 UTC (rev 287) @@ -1,4 +1,4 @@ -// ** I18N +// ** I18N Calendar._DN = new Array ("Κυριακή", "Δευτέρα", Modified: pieforms-php5/trunk/src/static/jscalendar/lang/calendar-fi.js =================================================================== --- pieforms-php5/trunk/src/static/jscalendar/lang/calendar-fi.js 2008-01-29 04:26:57 UTC (rev 286) +++ pieforms-php5/trunk/src/static/jscalendar/lang/calendar-fi.js 2008-01-29 04:27:29 UTC (rev 287) @@ -1,4 +1,4 @@ -// ** I18N +// ** I18N // Calendar FI language (Finnish, Suomi) // Author: Jarno Käyhkö, <ga...@ph...> Modified: pieforms-php5/trunk/src/static/jscalendar/lang/calendar-pl-utf8.js =================================================================== --- pieforms-php5/trunk/src/static/jscalendar/lang/calendar-pl-utf8.js 2008-01-29 04:26:57 UTC (rev 286) +++ pieforms-php5/trunk/src/static/jscalendar/lang/calendar-pl-utf8.js 2008-01-29 04:27:29 UTC (rev 287) @@ -1,4 +1,4 @@ -// ** I18N +// ** I18N // Calendar PL language // Author: Dariusz Pietrzak, <ey...@gh...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:26:55
|
Revision: 286 http://pieforms.svn.sourceforge.net/pieforms/?rev=286&view=rev Author: oracleshinoda Date: 2008-01-28 20:26:57 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Add support to the submitcancel element for confirming either button press. Thanks to Clare Lenihan. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/submitcancel.php Modified: pieforms-php5/trunk/src/pieform/elements/submitcancel.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/submitcancel.php 2008-01-29 04:26:11 UTC (rev 285) +++ pieforms-php5/trunk/src/pieform/elements/submitcancel.php 2008-01-29 04:26:57 UTC (rev 286) @@ -42,6 +42,18 @@ $submitelement['value'] = $element['value'][0]; $cancelelement = $element; $cancelelement['value'] = $element['value'][1]; + if (isset($element['confirm']) && isset($element['confirm'][0])) { + $submitelement['confirm'] = $element['confirm'][0]; + } + else { + unset($submitelement['confirm']); + } + if (isset($element['confirm']) && isset($element['confirm'][1])) { + $cancelelement['confirm'] = $element['confirm'][1]; + } + else { + unset($cancelelement['confirm']); + } return pieform_element_submit($form, $submitelement) . ' ' . pieform_element_cancel($form, $cancelelement); }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:26:06
|
Revision: 285 http://pieforms.svn.sourceforge.net/pieforms/?rev=285&view=rev Author: oracleshinoda Date: 2008-01-28 20:26:11 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Add support for confirming a cancel button. Thanks to Clare Lenihan. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/cancel.php Modified: pieforms-php5/trunk/src/pieform/elements/cancel.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/cancel.php 2008-01-29 04:25:39 UTC (rev 284) +++ pieforms-php5/trunk/src/pieform/elements/cancel.php 2008-01-29 04:26:11 UTC (rev 285) @@ -38,6 +38,10 @@ throw new PieformException('Cancel elements must have a value'); } + if (isset($element['confirm'])) { + $element['onclick'] = 'return confirm(' . json_encode($element['confirm']) . ');'; + } + $attributes = $form->element_attributes($element); $attributes = preg_replace('/name="(.*)"/', 'name="cancel_$1"', $attributes); $attributes = preg_replace('/id="(.*)"/', 'id="cancel_$1"', $attributes); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:25:35
|
Revision: 284 http://pieforms.svn.sourceforge.net/pieforms/?rev=284&view=rev Author: oracleshinoda Date: 2008-01-28 20:25:39 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Use the proper foldmarkers. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/fieldset.php Modified: pieforms-php5/trunk/src/pieform/elements/fieldset.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/fieldset.php 2008-01-29 04:25:16 UTC (rev 283) +++ pieforms-php5/trunk/src/pieform/elements/fieldset.php 2008-01-29 04:25:39 UTC (rev 284) @@ -32,7 +32,7 @@ * @param array $element The element to render * @return string The HTML for the element */ -function pieform_element_fieldset(Pieform $form, $element) { // {{{ +function pieform_element_fieldset(Pieform $form, $element) {/*{{{*/ $result = "\n<fieldset"; if (!empty($element['collapsible'])) { if (!isset($element['legend']) || $element['legend'] === '') { @@ -78,6 +78,6 @@ $result .= "</fieldset>\n"; return $result; -} // }}} +}/*}}}*/ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:25:11
|
Revision: 283 http://pieforms.svn.sourceforge.net/pieforms/?rev=283&view=rev Author: oracleshinoda Date: 2008-01-28 20:25:16 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Make the e-mail validation case-insensitive. Should have merged this ages ago. Thanks to Penny Leach. Modified Paths: -------------- pieforms-php5/trunk/src/pieform/rules/email.php Modified: pieforms-php5/trunk/src/pieform/rules/email.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/email.php 2008-01-29 04:24:46 UTC (rev 282) +++ pieforms-php5/trunk/src/pieform/rules/email.php 2008-01-29 04:25:16 UTC (rev 283) @@ -37,7 +37,7 @@ * the address. */ function pieform_rule_email(Pieform $form, $value, $element) {/*{{{*/ - if (!preg_match('/^[a-z0-9\._%-]+@(?:[a-z0-9-]+\.)+[a-z]{2,4}$/', $value)) { + if (!preg_match('/^[A-Za-z0-9\._%-]+@(?:[A-Za-z0-9-]+\.)+[a-z]{2,4}$/', $value)) { return $form->i18n('rule', 'email', 'email', $element); } }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:24:41
|
Revision: 282 http://pieforms.svn.sourceforge.net/pieforms/?rev=282&view=rev Author: oracleshinoda Date: 2008-01-28 20:24:46 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Added a new signal/slot, 'onreply', which is triggered just before the old form is replaced by the new form in the DOM. Useful for the WYSIWYG element, so it can call tinyMCE.execCommand('removeEditor', ...) then, to correctly clean up tinyMCE. Because of the new signal/slot mechanism, the hack to force saving of tinyMCE instances isn't required any more either. Modified Paths: -------------- pieforms-php5/trunk/src/static/core/pieforms.js Modified: pieforms-php5/trunk/src/static/core/pieforms.js =================================================================== --- pieforms-php5/trunk/src/static/core/pieforms.js 2008-01-29 04:22:47 UTC (rev 281) +++ pieforms-php5/trunk/src/static/core/pieforms.js 2008-01-29 04:24:46 UTC (rev 282) @@ -110,7 +110,8 @@ this.observers = { 'onload' : [], // when elements are loaded - 'onsubmit': [] // when a form is submitted + 'onsubmit': [], // when a form is submitted + 'onreply' : [] // when a response is received }; addLoadEvent(self.init); @@ -133,10 +134,6 @@ }//}}} this.processForm = function(e) {//{{{ - // HACK: save any tinyMCE elements on the page. - // TODO: allow elements to export javascript to run at certain times - - // like now, when the form is being submitted - if (typeof(tinyMCE) != 'undefined') { tinyMCE.triggerSave(); } PieformManager.signal('onsubmit', self.data.name); // Call the presubmit callback, if there is one @@ -170,6 +167,8 @@ return; } + PieformManager.signal('onreply', self.data.name); + var tmp = DIV(); tmp.innerHTML = data.replaceHTML; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-29 04:22:43
|
Revision: 281 http://pieforms.svn.sourceforge.net/pieforms/?rev=281&view=rev Author: oracleshinoda Date: 2008-01-28 20:22:47 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Some whitespace/spelling fixes. Prevent the markup element causing fatal errors. Prevent calling pieform_get_headdata() with no forms causing a fatal error. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-01-03 10:59:30 UTC (rev 280) +++ pieforms-php5/trunk/src/pieform.php 2008-01-29 04:22:47 UTC (rev 281) @@ -155,7 +155,7 @@ * @var bool */ private $submitted_by_js = false; - + /*}}}*/ /** @@ -620,7 +620,7 @@ } $this->include_plugin('renderer', $this->data['renderer']); - + // Form header $function = 'pieform_renderer_' . $this->data['renderer'] . '_header'; if (function_exists($function)) { @@ -662,7 +662,7 @@ // 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 + // still active in the document // 2) The form is NOT a JS form, but has a presubmitcallback if (($this->data['jsform'] && !$this->submitted) || (!$this->data['jsform'] && $this->data['presubmitcallback'])) { @@ -1226,6 +1226,11 @@ $element['id'] = $this->make_id($element); $element['class'] = $this->make_class($element); + // If the element is pure markup, don't pass it to the renderer + if ($element['type'] == 'markup') { + return $element['value'] . "\n"; + } + // Build the element html $function = 'pieform_element_' . $element['type']; $element['html'] = $function($this, $element); @@ -1453,10 +1458,12 @@ } // TODO: jsdirectory should be independent of ANY form - array_unshift($htmlelements, '<script type="text/javascript" src="' - . Pieform::hsc($form->get_property('jsdirectory')) . 'pieforms.js"></script>'); - array_unshift($htmlelements, '<script type="text/javascript">pieformPath = "' - . Pieform::hsc($form->get_property('jsdirectory')) . '";</script>'); + if ($GLOBALS['_PIEFORM_REGISTRY']) { + array_unshift($htmlelements, '<script type="text/javascript" src="' + . Pieform::hsc($form->get_property('jsdirectory')) . 'pieforms.js"></script>'); + array_unshift($htmlelements, '<script type="text/javascript">pieformPath = "' + . Pieform::hsc($form->get_property('jsdirectory')) . '";</script>'); + } return array_unique($htmlelements); }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 10:59:27
|
Revision: 280 http://pieforms.svn.sourceforge.net/pieforms/?rev=280&view=rev Author: oracleshinoda Date: 2008-01-03 02:59:30 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Added TODO file in the documentation with a non-exhaustive list of stuff I want to do on Pieforms. Added Paths: ----------- pieforms-php5/trunk/doc/html/dev/ pieforms-php5/trunk/doc/html/dev/todo.html pieforms-php5/trunk/doc/rst/dev/ pieforms-php5/trunk/doc/rst/dev/todo.rst Added: pieforms-php5/trunk/doc/html/dev/todo.html =================================================================== --- pieforms-php5/trunk/doc/html/dev/todo.html (rev 0) +++ pieforms-php5/trunk/doc/html/dev/todo.html 2008-01-03 10:59:30 UTC (rev 280) @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns=http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" /> +<title>Pieforms TODO List</title> + +<link rel="stylesheet" type="text/css" href="../style.css" /> +</head> +<body> +<div class="document" id="pieforms-todo-list"> +<h1 class="title">Pieforms TODO List</h1> +<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> » <a href="../">Documentation Home</a> » <a href="">Pieforms TODO List</a></div></p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Author:</th><td class="field-body">Nigel McNie</td> +</tr> +<tr class="field"><th class="field-name">Contact:</th><td class="field-body"><a class="reference" href="mailto:nigel@catalyst.net.nz">nigel@catalyst.net.nz</a></td> +</tr> +<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">This document has been placed in the public domain</td> +</tr> +</tbody> +</table> +<div class="section"> +<h1><a id="more-form-elements" name="more-form-elements">More Form Elements</a></h1> +<p>To start with, a "WYSIWYG" element bundled with Pieforms makes sense. After that, I guess it's up to popularity.</p> +</div> +<div class="section"> +<h1><a id="data-processing-before-validation" name="data-processing-before-validation">Data Processing Before Validation</a></h1> +<p>E.g. running submitted values through <tt class="docutils literal"><span class="pre">strtoupper()</span></tt>, <tt class="docutils literal"><span class="pre">trim()</span></tt> etc. before applying validation. A useful addition.</p> +</div> +<div class="section"> +<h1><a id="multipage-forms" name="multipage-forms">Multipage Forms</a></h1> +<p>The idea here is that you have one pieform per "page", but yet it's easy to go +back and forth between the pages.</p> +<p>In theory, validation is checked each time a page is submitted, and the final +'submit' happens when the last page is submitted.</p> +<p>This needs planning.</p> +</div> +<div class="section"> +<h1><a id="forms-with-a-tabbed-interface" name="forms-with-a-tabbed-interface">Forms With a Tabbed Interface</a></h1> +<p>This could probably be done with fieldsets + javascript, or some other fancy trickery.</p> +</div> +<div class="section"> +<h1><a id="i18n-ise-error-messages" name="i18n-ise-error-messages">I18n'ise Error Messages</a></h1> +<p>Currently they're in English only. I'm kind of OK with this.</p> +</div> +<div class="section"> +<h1><a id="i18n-system-improvements" name="i18n-system-improvements">I18n System Improvements</a></h1> +<p>Use some kind of positional parameters or separate the data from the string +itself in some way so messages can be translated naturally.</p> +</div> +<div class="section"> +<h1><a id="make-plugins-have-a-class-based-interface" name="make-plugins-have-a-class-based-interface">Make Plugins Have A Class Based Interface</a></h1> +<p>See <a class="reference" href="http://sourceforge.net/tracker/index.php?func=detail&aid=1695539&group_id=182497&atid=901456">bug 1695539</a>. This would remove some hacks, especially in the textarea +element and multicolumntable renderer (although the latter may be removed from +pieforms at some stage anyway).</p> +</div> +<div class="section"> +<h1><a id="remove-the-dependency-on-mochikit" name="remove-the-dependency-on-mochikit">Remove The Dependency On MochiKit</a></h1> +<p>There are two ways this could be done - one is to write all the javascript +"raw", so to speak. The other is to rewrite the parts that are in MochiKit in +JQuery instead. See <a class="reference" href="http://sourceforge.net/tracker/index.php?func=detail&aid=1863018&group_id=182497&atid=901453">bug 1863018</a>.</p> +</div> +<div class="section"> +<h1><a id="read-only-mode-for-form-display" name="read-only-mode-for-form-display">Read-Only Mode for Form Display</a></h1> +<p>Given Pieforms has now switched to AHAH, this will actually be quite easy. This +is planned for 0.4.0.</p> +</div> +<div class="section"> +<h1><a id="documentation-improvements" name="documentation-improvements">Documentation Improvements</a></h1> +<p>Are ongoing. APIs are still in flux at the moment, making things tricky.</p> +</div> +<div class="section"> +<h1><a id="test-suite" name="test-suite">Test Suite</a></h1> +<p>Would be nice to have one of these. I will have to investigate PHP test suites, +but I get the feeling selenium will play a significant part here as well, given +the nature of what is being tested.</p> +<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> » <a href="../">Documentation Home</a> » <a href="">Pieforms TODO List</a></div></p> +</div> +</div> + +<div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>, +© 2006 - 2008 <a href="http://www.catalyst.net.nz/">Catalyst IT Ltd</a>. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div> +</body> +</html> Added: pieforms-php5/trunk/doc/rst/dev/todo.rst =================================================================== --- pieforms-php5/trunk/doc/rst/dev/todo.rst (rev 0) +++ pieforms-php5/trunk/doc/rst/dev/todo.rst 2008-01-03 10:59:30 UTC (rev 280) @@ -0,0 +1,83 @@ +==================== + Pieforms TODO List +==================== +:breadcrumbs:`Documentation Home > Pieforms TODO List` + +:Author: Nigel McNie +:Contact: ni...@ca... +:Copyright: This document has been placed in the public domain + +More Form Elements +------------------ + +To start with, a "WYSIWYG" element bundled with Pieforms makes sense. After that, I guess it's up to popularity. + +Data Processing Before Validation +--------------------------------- + +E.g. running submitted values through ``strtoupper()``, ``trim()`` etc. before applying validation. A useful addition. + +Multipage Forms +--------------- + +The idea here is that you have one pieform per "page", but yet it's easy to go +back and forth between the pages. + +In theory, validation is checked each time a page is submitted, and the final +'submit' happens when the last page is submitted. + +This needs planning. + +Forms With a Tabbed Interface +----------------------------- + +This could probably be done with fieldsets + javascript, or some other fancy trickery. + +I18n'ise Error Messages +----------------------- + +Currently they're in English only. I'm kind of OK with this. + +I18n System Improvements +------------------------ + +Use some kind of positional parameters or separate the data from the string +itself in some way so messages can be translated naturally. + +Make Plugins Have A Class Based Interface +----------------------------------------- + +See `bug 1695539`_. This would remove some hacks, especially in the textarea +element and multicolumntable renderer (although the latter may be removed from +pieforms at some stage anyway). + +.. _bug 1695539: http://sourceforge.net/tracker/index.php?func=detail&aid=1695539&group_id=182497&atid=901456 + +Remove The Dependency On MochiKit +--------------------------------- + +There are two ways this could be done - one is to write all the javascript +"raw", so to speak. The other is to rewrite the parts that are in MochiKit in +JQuery instead. See `bug 1863018`_. + +.. _bug 1863018: http://sourceforge.net/tracker/index.php?func=detail&aid=1863018&group_id=182497&atid=901453 + +Read-Only Mode for Form Display +------------------------------- + +Given Pieforms has now switched to AHAH, this will actually be quite easy. This +is planned for 0.4.0. + +Documentation Improvements +-------------------------- + +Are ongoing. APIs are still in flux at the moment, making things tricky. + +Test Suite +---------- + +Would be nice to have one of these. I will have to investigate PHP test suites, +but I get the feeling selenium will play a significant part here as well, given +the nature of what is being tested. + +:breadcrumbs:`Documentation Home > Pieforms TODO List` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 10:33:30
|
Revision: 279 http://pieforms.svn.sourceforge.net/pieforms/?rev=279&view=rev Author: oracleshinoda Date: 2008-01-03 02:33:35 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Added an install step saying about pieform_configure(), which also mentions jsdirectory. Hopefully, this should make setting up pieforms for the first time easier. Also reduced the number of steps to do when including pieforms on a page (removed some obvious ones), and explained about pieform_get_headdata() in more detail. Modified Paths: -------------- pieforms-php5/trunk/INSTALL Modified: pieforms-php5/trunk/INSTALL =================================================================== --- pieforms-php5/trunk/INSTALL 2008-01-03 10:33:18 UTC (rev 278) +++ pieforms-php5/trunk/INSTALL 2008-01-03 10:33:35 UTC (rev 279) @@ -33,6 +33,19 @@ submission, copy the 'static' directory (or the contents of it) to some place where your pages can link in the appropriate javascript files. + 3) In a library file that you know will always be included, put a function + called pieform_configure. This function should return a hash representing how + you want your pieforms configured by default. Here is an example: + + function pieform_configure() { + return array( + // Make forms submit by POST by default + 'method' => 'post', + // URL to the directory where pieforms.js resides + 'jsdirectory' => '/js/pieforms/' + ); + } + And you're done! Using Pieforms on a Page @@ -42,11 +55,10 @@ * Make sure that the MochiKit javascript file is sourced by a <script> tag in the output of the page. - * Some more advanced widgets use pieforms.js. Make sure to include this also - if you're after this support - * Include the 'pieform.php' file - * You need to call pieform_get_headdata() somewhere. This will return an array - of <script> tags, <link> tags and other things that need to go in the <head> - of your document somewhere. + * You need to call pieform_get_headdata() somewhere AFTER you have defined all + of your forms. This will return an array of <script> tags, <link> tags and + other things that need to go in the <head> of your document somewhere. A + good place to call this is in your header template file, should you be using + some kind of templating system. -- Nigel McNie <ni...@ca...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 10:33:13
|
Revision: 278 http://pieforms.svn.sourceforge.net/pieforms/?rev=278&view=rev Author: oracleshinoda Date: 2008-01-03 02:33:18 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Some minor typographical changes to the README. Modified Paths: -------------- pieforms-php5/trunk/README Modified: pieforms-php5/trunk/README =================================================================== --- pieforms-php5/trunk/README 2008-01-03 10:32:58 UTC (rev 277) +++ pieforms-php5/trunk/README 2008-01-03 10:33:18 UTC (rev 278) @@ -9,11 +9,10 @@ -------------- Pieforms provides a simple, unified way to create, validate and process web -forms all with a common look and feel. It supports many more types of form -controls (elements) than the standard HTML controls, for example date pickers -and ajax comboboxes. In addition, each element can have pluggable rules applied -to it, and the form can be layed out as consistently or flexibly as you -require. +forms with a common look and feel. It supports many more types of form controls +(elements) than the standard HTML controls, for example date pickers and ajax +comboboxes. In addition, each element can have pluggable rules applied to it, +and the form can be layed out as consistently or flexibly as you require. Pieforms also has a really simple API that makes writing forms very easy. For most cases, you will simply define a hash describing your form and provide a @@ -41,7 +40,7 @@ ------------ You've downloaded the PHP5 version of Pieforms. With some reasonably minimal -hacking it could be made to work with PHP4, I am not going to do the work +hacking it could be made to work with PHP4, but I am not going to do the work involved unless I need it. If you want, you could get it working and provide a patch, which I would maintain as a separate tree. But in reality, you should think about moving your project to PHP5. @@ -54,11 +53,11 @@ Pieforms is copyright (C) 2006 - 2008 Catalyst IT Ltd. -Pieforms includes parts of MochiKit [1], which is required for the AJAX post +Pieforms includes parts of MochiKit [1], which is required for the XHR post functionality. MochiKit is dual licensed under the MIT license or Academic Free License, v2.1. -Pieforms includes Services_JSON [2], which is required for AJAX post +Pieforms includes Services_JSON [2], which is required for XHR post functionality, if the json extension for PHP is not installed or enabled. Services_JSON is licensed under the BSD license. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 10:32:53
|
Revision: 277 http://pieforms.svn.sourceforge.net/pieforms/?rev=277&view=rev Author: oracleshinoda Date: 2008-01-03 02:32:58 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Renamed the 'jsincludepath' configuration parameter to 'jsdirectory', which makes a little more sense to me. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-01-03 10:00:07 UTC (rev 276) +++ pieforms-php5/trunk/src/pieform.php 2008-01-03 10:32:58 UTC (rev 277) @@ -1313,7 +1313,7 @@ // The URL where pieforms.js and other related pieforms javascript // files can be accessed. Best specified as an absolute path in // pieform_configure() - 'jsincludepath' => '', + 'jsdirectory' => '', // The javascript function called before submission of a form // (regardless of whether the form is a jsform) @@ -1452,11 +1452,11 @@ } } - // TODO: jsincludepath should be independent of ANY form + // TODO: jsdirectory should be independent of ANY form array_unshift($htmlelements, '<script type="text/javascript" src="' - . Pieform::hsc($form->get_property('jsincludepath')) . 'pieforms.js"></script>'); + . Pieform::hsc($form->get_property('jsdirectory')) . 'pieforms.js"></script>'); array_unshift($htmlelements, '<script type="text/javascript">pieformPath = "' - . Pieform::hsc($form->get_property('jsincludepath')) . '";</script>'); + . Pieform::hsc($form->get_property('jsdirectory')) . '";</script>'); return array_unique($htmlelements); }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 10:00:02
|
Revision: 276 http://pieforms.svn.sourceforge.net/pieforms/?rev=276&view=rev Author: oracleshinoda Date: 2008-01-03 02:00:07 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Re-ordered some methods in pieform.php so they're in a more logical order. Now private methods are all at the bottom, and all the error related methods are together. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-01-03 09:10:57 UTC (rev 275) +++ pieforms-php5/trunk/src/pieform.php 2008-01-03 10:00:07 UTC (rev 276) @@ -763,89 +763,6 @@ }/*}}}*/ /** - * Retrieves submitted values from the request for the elements of this form. - * - * This takes into account that some elements may not even have been set, - * for example if they were check boxes that were not checked upon - * submission. - * - * A value is returned for every element (except fieldsets of course). If - * an element was not set, the value set is <kbd>null</kbd>. - * - * @return array The submitted values - */ - private function get_submitted_values() {/*{{{*/ - $result = array(); - $global = ($this->data['method'] == 'get') ? $_GET : $_POST; - foreach ($this->elementrefs as $element) { - if ($element['type'] != 'markup') { - if ( - (empty($element['submitelement']) && empty($element['cancelelement'])) || - ( - (!empty($element['submitelement']) || !empty($element['cancelelement'])) - && isset($global[$element['name']]) - ) - ) { - $result[$element['name']] = $this->get_value($element); - } - } - } - return $result; - }/*}}}*/ - - /** - * Performs simple validation based off the definition array. - * - * Rules can be added to <kbd>pieform/rules/</kbd> directory, and then - * re-used in the 'rules' index of each element in the form definition - * hash. - * - * More complicated validation is possible by defining an optional - * callback with the name {$form->name}_validate. See the documentation for - * more information. - * - * @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->elementrefs as $element) { - if (isset($element['rules']) && is_array($element['rules'])) { - foreach ($element['rules'] as $rule => $data) { - 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['type'] . '_rule_' . $rule; - if (!function_exists($function)) { - // Try instead the default rule function - $function = 'pieform_rule_' . $rule; - if (!function_exists($function)) { - $this->include_plugin('rule', $rule); - if (!function_exists($function)) { - throw new PieformException('No such form rule "' . $rule . '"'); - } - } - } - if ($error = $function($this, $values[$element['name']], $element, $data)) { - $this->set_error($element['name'], $error); - } - } - } - } - } - - // 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)); - } - }/*}}}*/ - - /** * Sends a message back to a jsform. * * The message can contain almost any data, although how it is used is up to @@ -937,6 +854,36 @@ }/*}}}*/ /** + * Checks if there are errors on any of the form elements. + * + * @return bool Whether there are errors with the form + */ + public function has_errors() {/*{{{*/ + foreach ($this->elementrefs as $element) { + if (isset($element['error'])) { + return true; + } + } + return false; + }/*}}}*/ + + /** + * Returns elements with errors on them + * + * @return array An array of elements with errors on them, the empty array + * in the result of no errors. + */ + public function get_errors() {/*{{{*/ + $result = array(); + foreach ($this->elementrefs as $element) { + if (isset($element['error'])) { + $result[] = $element; + } + } + return $result; + }/*}}}*/ + + /** * Makes an ID for an element. * * Element IDs are used for <label>s, so use this method to ensure that @@ -1043,20 +990,6 @@ }/*}}}*/ /** - * Checks if there are errors on any of the form elements. - * - * @return bool Whether there are errors with the form - */ - public function has_errors() {/*{{{*/ - foreach ($this->elementrefs as $element) { - if (isset($element['error'])) { - return true; - } - } - return false; - }/*}}}*/ - - /** * Includes a plugin file, checking any configured plugin directories. * * @param string $type The type of plugin to include: 'element', 'renderer' or 'rule' @@ -1168,22 +1101,89 @@ }/*}}}*/ /** - * Returns elements with errors on them + * Retrieves submitted values from the request for the elements of this form. * - * @return array An array of elements with errors on them, the empty array - * in the result of no errors. + * This takes into account that some elements may not even have been set, + * for example if they were check boxes that were not checked upon + * submission. + * + * A value is returned for every element (except fieldsets of course). If + * an element was not set, the value set is <kbd>null</kbd>. + * + * @return array The submitted values */ - public function get_errors() {/*{{{*/ + private function get_submitted_values() {/*{{{*/ $result = array(); + $global = ($this->data['method'] == 'get') ? $_GET : $_POST; foreach ($this->elementrefs as $element) { - if (isset($element['error'])) { - $result[] = $element; + if ($element['type'] != 'markup') { + if ( + (empty($element['submitelement']) && empty($element['cancelelement'])) || + ( + (!empty($element['submitelement']) || !empty($element['cancelelement'])) + && isset($global[$element['name']]) + ) + ) { + $result[$element['name']] = $this->get_value($element); + } } } return $result; }/*}}}*/ /** + * Performs simple validation based off the definition array. + * + * Rules can be added to <kbd>pieform/rules/</kbd> directory, and then + * re-used in the 'rules' index of each element in the form definition + * hash. + * + * More complicated validation is possible by defining an optional + * callback with the name {$form->name}_validate. See the documentation for + * more information. + * + * @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->elementrefs as $element) { + if (isset($element['rules']) && is_array($element['rules'])) { + foreach ($element['rules'] as $rule => $data) { + 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['type'] . '_rule_' . $rule; + if (!function_exists($function)) { + // Try instead the default rule function + $function = 'pieform_rule_' . $rule; + if (!function_exists($function)) { + $this->include_plugin('rule', $rule); + if (!function_exists($function)) { + throw new PieformException('No such form rule "' . $rule . '"'); + } + } + } + if ($error = $function($this, $values[$element['name']], $element, $data)) { + $this->set_error($element['name'], $error); + } + } + } + } + } + + // 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)); + } + }/*}}}*/ + + /** * Sets the 'autofocus' property on the first element encountered that has * an error on it */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 09:10:56
|
Revision: 275 http://pieforms.svn.sourceforge.net/pieforms/?rev=275&view=rev Author: oracleshinoda Date: 2008-01-03 01:10:57 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Fix a problem with jsforms in opera - data.goto is apparently illegal because goto is reserved. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php pieforms-php5/trunk/src/static/core/pieforms.js Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-01-03 09:10:27 UTC (rev 274) +++ pieforms-php5/trunk/src/pieform.php 2008-01-03 09:10:57 UTC (rev 275) @@ -390,7 +390,7 @@ throw new PieformException('Cancel element "' . $element['name'] . '" has no page to go to'); } if ($this->submitted_by_js) { - $this->json_reply(PIEFORM_CANCEL, array('goto' => $element['goto']), false); + $this->json_reply(PIEFORM_CANCEL, array('location' => $element['goto']), false); } header('HTTP/1.1 303 See Other'); header('Location:' . $element['goto']); Modified: pieforms-php5/trunk/src/static/core/pieforms.js =================================================================== --- pieforms-php5/trunk/src/static/core/pieforms.js 2008-01-03 09:10:27 UTC (rev 274) +++ pieforms-php5/trunk/src/static/core/pieforms.js 2008-01-03 09:10:57 UTC (rev 275) @@ -166,7 +166,7 @@ window.pieformHandlers[self.data.name] = function(data) { // If canceling the form, redirect away if (data.returnCode == -2) { - window.location = data.goto; + window.location = data.location; return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2008-01-03 09:10:23
|
Revision: 274 http://pieforms.svn.sourceforge.net/pieforms/?rev=274&view=rev Author: oracleshinoda Date: 2008-01-03 01:10:27 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Rename some reference loop variables now I know about the unset() trick. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2008-01-03 08:57:53 UTC (rev 273) +++ pieforms-php5/trunk/src/pieform.php 2008-01-03 09:10:27 UTC (rev 274) @@ -554,16 +554,18 @@ // Builds the HTML each element (see the build_element_html method for // more information) - foreach ($this->data['elements'] as &$elem) { - if ($elem['type'] == 'fieldset') { - foreach ($elem['elements'] as &$subelem) { - $this->build_element_html($subelem); + foreach ($this->data['elements'] as &$element) { + if ($element['type'] == 'fieldset') { + foreach ($element['elements'] as &$subelement) { + $this->build_element_html($subelement); } + unset($subelement); } else { - $this->build_element_html($elem); + $this->build_element_html($element); } } + unset($element); // If a template is to be used, use it instead of a renderer if (!empty($this->data['template'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |