[Catalyst] Catalyst::Plugin::FillInForm Patch (ignoring fields)
Rusty Conover
rconover at infogears.com
Tue May 31 09:30:21 CEST 2005
Catalyst People,
It seems that the FillInForm plug in doesn't allow a way for the user to
specify that certain fields should not be filled in. The
HTML::FillInForm module allows this by passing ignore_fields and an
arrayref to the fill() function.
I've patched the C::P::FillInForm module to add a new assessor called
fill_ignore_fields which allows this option to be specified for form fills.
Please apply to the plug in module if you desire, or if you think this
is the wrong approach please let me know.
Thanks,
Rusty
--
Rusty Conover
InfoGears Inc.
http://www.infogears.com
406-587-5432
-------------- next part --------------
Only in FillForm.fixed/: blib
diff -ur fill.form.vanilla/Changes FillForm.fixed/Changes
--- fill.form.vanilla/Changes 2005-05-31 01:20:53.000000000 -0600
+++ FillForm.fixed/Changes 2005-05-31 01:20:24.000000000 -0600
@@ -1,5 +1,9 @@
Revision history for Perl extension Catalyst::Plugin::FillInForm.
+0.06 2005-05-31
+ - $c->fill_ignore_fields is a new accessor function that allows an arrayref to
+ to be set of fields not to be filled.
+
0.05 2005-05-26 14:43:00
- $c->fillform now takes an optional hashref
diff -ur fill.form.vanilla/FillInForm.pm FillForm.fixed/FillInForm.pm
--- fill.form.vanilla/FillInForm.pm 2005-05-31 01:20:53.000000000 -0600
+++ FillForm.fixed/FillInForm.pm 2005-05-31 01:20:24.000000000 -0600
@@ -3,6 +3,11 @@
use strict;
use NEXT;
use HTML::FillInForm;
+use base qw/Class::Data::Inheritable Class::Accessor::Fast/;
+
+__PACKAGE__->mk_accessors('fill_ignore_fields');
+
+
our $VERSION = '0.05';
@@ -58,6 +63,7 @@
$c->response->output(
HTML::FillInForm->new->fill(
scalarref => \$c->response->{body},
+ ((defined($c->fill_ignore_fields)) ? (ignore_fields => $c->fill_ignore_fields) : ()),
fdat => $fdat
)
);
Only in FillForm.fixed/: Makefile
Only in FillForm.fixed/: pm_to_blib
More information about the Catalyst
mailing list