aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/Field
diff options
context:
space:
mode:
authorwreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-07-24 21:36:20 +0000
committerwreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-07-24 21:36:20 +0000
commit8d06fb1f1f13c9576bdd842262538aa50568dead (patch)
tree6a6e6baf634ee0911927f808342da76d9d419151 /lib/Reaction/UI/Widget/Field
parentf4f019bca352c4fd050313a819de7576bcfd3a6c (diff)
downloadreaction-8d06fb1f1f13c9576bdd842262538aa50568dead.tar.gz
reaction-8d06fb1f1f13c9576bdd842262538aa50568dead.zip
moving logic to widget class
Diffstat (limited to 'lib/Reaction/UI/Widget/Field')
-rw-r--r--lib/Reaction/UI/Widget/Field/Mutable.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Reaction/UI/Widget/Field/Mutable.pm b/lib/Reaction/UI/Widget/Field/Mutable.pm
index c4d2e44..15f6a04 100644
--- a/lib/Reaction/UI/Widget/Field/Mutable.pm
+++ b/lib/Reaction/UI/Widget/Field/Mutable.pm
@@ -6,8 +6,12 @@ class Mutable is 'Reaction::UI::Widget::Field', which {
before fragment widget {
arg 'field_id' => event_id 'value_string';
- arg 'field_name' => event_id 'value_string' unless defined $_{field_name};
+ my $field_name = event_id 'value_string' unless defined $_{field_name};
+ arg 'field_name' => $field_name;
arg 'field_type' => 'text';
+ my $field_class = $field_name;
+ $field_class =~ s/\d\-//;
+ arg 'field_class' => $field_class;
# these two are to fire force_events in viewports
# where you can end up without an event for e.g.