[Bast-commits] r3727 - in trunk/DBIx-Class-HTMLWidget: .
lib/DBIx/Class
omega at dev.catalyst.perl.org
omega at dev.catalyst.perl.org
Sun Sep 9 01:12:46 GMT 2007
Author: omega
Date: 2007-09-09 01:12:46 +0100 (Sun, 09 Sep 2007)
New Revision: 3727
Modified:
trunk/DBIx-Class-HTMLWidget/
trunk/DBIx-Class-HTMLWidget/Changes
trunk/DBIx-Class-HTMLWidget/lib/DBIx/Class/HTMLWidget.pm
Log:
r2935 at am-mbook: andremar | 2007-09-09 01:34:46 +0200
0.11 release
Property changes on: trunk/DBIx-Class-HTMLWidget
___________________________________________________________________
Name: svk:merge
- 4548d020-06a0-4b37-8aa3-720a432dc893:/local/dbic-htmlwidget:2497
+ 4548d020-06a0-4b37-8aa3-720a432dc893:/local/dbic-htmlwidget:2935
Modified: trunk/DBIx-Class-HTMLWidget/Changes
===================================================================
--- trunk/DBIx-Class-HTMLWidget/Changes 2007-09-08 16:58:56 UTC (rev 3726)
+++ trunk/DBIx-Class-HTMLWidget/Changes 2007-09-09 00:12:46 UTC (rev 3727)
@@ -1,4 +1,11 @@
Revision history for DBIx-Class-HTMLWidget
+0.11
+ - Backwards incompatible change: If an element has a value when fill_form is run, it
+ will not be overwritten with a new value.
+
+0.10
+ - Fix problem with undefing values not properly updating on postgres
+
0.09
- Changed from using set_column($col, $value) to $col($value)
(Thanks to Matt S. Trout for report)
Modified: trunk/DBIx-Class-HTMLWidget/lib/DBIx/Class/HTMLWidget.pm
===================================================================
--- trunk/DBIx-Class-HTMLWidget/lib/DBIx/Class/HTMLWidget.pm 2007-09-08 16:58:56 UTC (rev 3726)
+++ trunk/DBIx-Class-HTMLWidget/lib/DBIx/Class/HTMLWidget.pm 2007-09-09 00:12:46 UTC (rev 3727)
@@ -3,7 +3,7 @@
use warnings;
use Carp;
-our $VERSION = '0.09';
+our $VERSION = '0.11';
# pod after __END__
sub fill_widget {
@@ -16,6 +16,7 @@
foreach my $element ( @real_elements ) {
my $name=$element->name;
next unless $name && $dbic->can($name) && $element->can('value');
+ next if ($element->value());
if($element->isa('HTML::Widget::Element::Checkbox')) {
$element->checked($dbic->$name?1:0);
} else {
@@ -45,12 +46,13 @@
if ($col_info->{data_type} and $col_info->{data_type} =~ m/^timestamp|date|integer|numeric/i
and defined $value and $value eq '') {
$value = undef;
+ $dbic->$col(undef);
}
if (defined($value) and !ref($value) and $value eq 'undef') {
+ $dbic->$col(undef);
$value = undef;
}
-
$dbic->$col($value)
if defined $value || exists $cb{$col};
}
More information about the Bast-commits
mailing list