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
(6) |
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
(1) |
28
|
29
|
30
|
|
|
|
|
|
From: <ora...@us...> - 2009-11-27 02:11:14
|
Revision: 322 http://pieforms.svn.sourceforge.net/pieforms/?rev=322&view=rev Author: oracleshinoda Date: 2009-11-27 02:11:04 +0000 (Fri, 27 Nov 2009) Log Message: ----------- Make $element optional in i18n() calls Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2009-11-10 03:32:43 UTC (rev 321) +++ pieforms-php5/trunk/src/pieform.php 2009-11-27 02:11:04 UTC (rev 322) @@ -1060,7 +1060,7 @@ * can specify there own i18n strings for rules * @return string The internationalised string */ - public function i18n($plugin, $pluginname, $key, $element) {/*{{{*/ + public function i18n($plugin, $pluginname, $key, $element=null) {/*{{{*/ if (!in_array($plugin, array('element', 'renderer', 'rule'))) { throw new PieformException("Invalid plugin name '$plugin'"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2009-11-10 03:32:54
|
Revision: 321 http://pieforms.svn.sourceforge.net/pieforms/?rev=321&view=rev Author: oracleshinoda Date: 2009-11-10 03:32:43 +0000 (Tue, 10 Nov 2009) Log Message: ----------- Allow + in e-mail addresses. Signed-off-by: Nigel McNie <ni...@ca...> 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 2009-11-10 03:31:47 UTC (rev 320) +++ pieforms-php5/trunk/src/pieform/rules/email.php 2009-11-10 03:32:43 UTC (rev 321) @@ -37,7 +37,7 @@ * the address. */ function pieform_rule_email(Pieform $form, $value, $element) {/*{{{*/ - if (!preg_match('/^[A-Za-z0-9\._%-]+@(?:[A-Za-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...> - 2009-11-10 03:32:02
|
Revision: 320 http://pieforms.svn.sourceforge.net/pieforms/?rev=320&view=rev Author: oracleshinoda Date: 2009-11-10 03:31:47 +0000 (Tue, 10 Nov 2009) Log Message: ----------- Make the bytes element support "gigabytes". I even had a go at doing the translations for all the languages. Also, fix a bug where specifying a value that was exactly 1GB ended up showing up as 1024MB. This happens at the other unit boundaries too. Signed-off-by: Nigel McNie <ni...@ca...> 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 2009-11-10 03:29:47 UTC (rev 319) +++ pieforms-php5/trunk/src/pieform/elements/bytes.php 2009-11-10 03:31:47 UTC (rev 320) @@ -26,7 +26,7 @@ /** * Provides a size chooser, with a text box for a number and a - * select box to choose the units, in bytes, kilobytes, or megabytes + * select box to choose the units, in bytes, kilobytes, megabytes or gigabytes * * @param Pieform $form The form to render the element for * @param array $element The element to render @@ -108,6 +108,9 @@ function pieform_element_bytes_in($units) {/*{{{*/ switch ($units) { + case 'gigabytes': + return 1073741824; + break; case 'megabytes': return 1048576; break; @@ -126,48 +129,56 @@ 'bytes' => 'Bytes', 'kilobytes' => 'Kilobytes', 'megabytes' => 'Megabytes', + 'gigabytes' => 'Gigabytes', 'invalidvalue' => 'Value must be a number', ), 'de.utf8' => array( 'bytes' => 'Bytes', 'kilobytes' => 'Kilobytes', 'megabytes' => 'Megabytes', + 'gigabytes' => 'Gigabytes', 'invalidvalue' => 'Wert muss eine Zahl sein', ), 'fr.utf8' => array( 'bytes' => 'Octets', 'kilobytes' => 'Kilooctets', 'megabytes' => 'Mégaoctets', + 'gigabytes' => 'Gigaoctets', 'invalidvalue' => 'Valeur doit être un nombre', ), 'ja.utf8' => array( 'bytes' => 'B', 'kilobytes' => 'KB', 'megabytes' => 'MB', + 'gigabytes' => 'GB', 'invalidvalue' => '値は数値にしてください', ), 'es.utf8' => array( 'bytes' => 'Bytes', 'kilobytes' => 'Kilobytes', 'megabytes' => 'Megabytes', + 'gigabytes' => 'Gigabytes', 'invalidvalue' => 'El valor debe ser un número', ), 'sl.utf8' => array( 'bytes' => 'B', 'kilobytes' => 'kB', 'megabytes' => 'MB', + 'gigabytes' => 'GB', 'invalidvalue' => 'Vrednost mora biti število', ), 'nl.utf8' => array( 'bytes' => 'Bytes', 'kilobytes' => 'Kilobytes', 'megabytes' => 'Megabytes', + 'gigabytes' => 'Gigabytes', 'invalidvalue' => 'Waarde moet een getal zijn', ), 'cs.utf8' => array( 'bytes' => 'B', 'kilobytes' => 'kB', 'megabytes' => 'MB', + 'gigabytes' => 'GB', 'invalidvalue' => 'Hodnota musí být číselná', ), 'zh_tw.utf8' => array( @@ -181,7 +192,7 @@ }/*}}}*/ function pieform_element_bytes_get_bytes_units() {/*{{{*/ - return array('bytes', 'kilobytes', 'megabytes'); + return array('bytes', 'kilobytes', 'megabytes', 'gigabytes'); }/*}}}*/ function pieform_element_bytes_get_bytes_from_bytes($bytes) {/*{{{*/ @@ -189,8 +200,8 @@ return array('number' => '0', 'units' => 'bytes'); } - foreach (array('megabytes', 'kilobytes') as $units) { - if ( $bytes > pieform_element_bytes_in($units) ) { + foreach (array('gigabytes', 'megabytes', 'kilobytes') as $units) { + if ( $bytes >= pieform_element_bytes_in($units) ) { return array('number' => $bytes / pieform_element_bytes_in($units) , 'units' => $units); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2009-11-10 03:29:58
|
Revision: 319 http://pieforms.svn.sourceforge.net/pieforms/?rev=319&view=rev Author: oracleshinoda Date: 2009-11-10 03:29:47 +0000 (Tue, 10 Nov 2009) Log Message: ----------- Support "elementtitle" so you can set a hover title on most elements. At the suggestion of Andrew McMillan. Signed-off-by: Nigel McNie <ni...@ca...> Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2009-11-10 03:26:54 UTC (rev 318) +++ pieforms-php5/trunk/src/pieform.php 2009-11-10 03:29:47 UTC (rev 319) @@ -999,6 +999,10 @@ } } + if (isset($element['elementtitle'])) { + $result .= ' title="' . self::hsc($element['elementtitle']) . '"'; + } + if (!in_array('maxlength', $exclude) && isset($element['rules']['maxlength'])) { $result .= ' maxlength="' . intval($element['rules']['maxlength']) . '"'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2009-11-10 03:27:00
|
Revision: 318 http://pieforms.svn.sourceforge.net/pieforms/?rev=318&view=rev Author: oracleshinoda Date: 2009-11-10 03:26:54 +0000 (Tue, 10 Nov 2009) Log Message: ----------- Better check for integers that doesn't fail on 32bit systems. Now at least "integer" means "the largest integer a float can handle", which is a much higher limit. Signed-off-by: Nigel McNie <ni...@ca...> Modified Paths: -------------- pieforms-php5/trunk/src/pieform/rules/integer.php Modified: pieforms-php5/trunk/src/pieform/rules/integer.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/integer.php 2009-11-10 03:25:17 UTC (rev 317) +++ pieforms-php5/trunk/src/pieform/rules/integer.php 2009-11-10 03:26:54 UTC (rev 318) @@ -34,7 +34,7 @@ * the address. */ function pieform_rule_integer(Pieform $form, $value, $element) {/*{{{*/ - if (!is_numeric($value) || $value != (int)$value) { + if (!is_numeric($value) || floor($value) != $value) { return $form->i18n('rule', 'integer', 'integer', $element); } }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2009-11-10 03:25:25
|
Revision: 317 http://pieforms.svn.sourceforge.net/pieforms/?rev=317&view=rev Author: oracleshinoda Date: 2009-11-10 03:25:17 +0000 (Tue, 10 Nov 2009) Log Message: ----------- Allow minvalue and maxvalue to work with much larger numbers. intval() will fail horribly on 32 bit systems with numbers over 2GB :( Signed-off-by: Nigel McNie <ni...@ca...> Modified Paths: -------------- pieforms-php5/trunk/src/pieform/rules/maxvalue.php pieforms-php5/trunk/src/pieform/rules/minvalue.php Modified: pieforms-php5/trunk/src/pieform/rules/maxvalue.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/maxvalue.php 2009-11-10 03:23:05 UTC (rev 316) +++ pieforms-php5/trunk/src/pieform/rules/maxvalue.php 2009-11-10 03:25:17 UTC (rev 317) @@ -34,7 +34,7 @@ * @return string The error message, if the value is invalid. */ function pieform_rule_maxvalue(Pieform $form, $value, $element, $maxvalue) {/*{{{*/ - if ($value != '' && intval($value) > $maxvalue) { + if ($value != '' && doubleval($value) > $maxvalue) { return sprintf($form->i18n('rule', 'maxvalue', 'maxvalue', $element), $maxvalue); } }/*}}}*/ Modified: pieforms-php5/trunk/src/pieform/rules/minvalue.php =================================================================== --- pieforms-php5/trunk/src/pieform/rules/minvalue.php 2009-11-10 03:23:05 UTC (rev 316) +++ pieforms-php5/trunk/src/pieform/rules/minvalue.php 2009-11-10 03:25:17 UTC (rev 317) @@ -34,7 +34,7 @@ * @return string The error message, if the value is invalid. */ function pieform_rule_minvalue(Pieform $form, $value, $element, $minvalue) {/*{{{*/ - if ($value != '' && intval($value) < $minvalue) { + if ($value != '' && doubleval($value) < $minvalue) { return sprintf($form->i18n('rule', 'minvalue', 'minvalue', $element), $minvalue); } }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ora...@us...> - 2009-11-10 03:23:30
|
Revision: 316 http://pieforms.svn.sourceforge.net/pieforms/?rev=316&view=rev Author: oracleshinoda Date: 2009-11-10 03:23:05 +0000 (Tue, 10 Nov 2009) Log Message: ----------- Make the input box for the bytes element a little shorter. It doesn't need to be 8 characters long. I guess people who want to give someone a billion terabytes of storage might complain, but it's only a cosmetic thing anyway. Signed-off-by: Nigel McNie <ni...@ca...> 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 2009-09-20 23:46:49 UTC (rev 315) +++ pieforms-php5/trunk/src/pieform/elements/bytes.php 2009-11-10 03:23:05 UTC (rev 316) @@ -66,7 +66,7 @@ // @todo probably create with an actual input element, as tabindex doesn't work here for one thing // Same with the select. And do the events using mochikit signal instead of dom events $numberinput = '<input'; - $numberinput .= ' type="text" size="8" name="' . $name . '"'; + $numberinput .= ' type="text" size="6" name="' . $name . '"'; $numberinput .= ' id="' . $formname . '_' . $name . '" value="' . $values['number'] . '" tabindex="' . $element['tabindex'] . '"'; $numberinput .= (isset($element['error']) ? ' class="error"' : '') . ">\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |