[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. c03dd1276c2ce1e6510e0010c8692e00d10783b2

Stefan Hornburg racke at rt.icdevgroup.org
Thu Jan 29 21:08:56 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange wellwell catalog".

The branch, master has been updated
       via  c03dd1276c2ce1e6510e0010c8692e00d10783b2 (commit)
      from  8498fd1e0fa4f3c849bdf5011c8a77727cef3968 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c03dd1276c2ce1e6510e0010c8692e00d10783b2
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu Jan 29 22:08:23 2009 +0100

    theme_form_element function implemented

-----------------------------------------------------------------------

Summary of changes and diff:
 code/form.tag               |    4 +---
 code/theme_form_element.sub |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 code/theme_form_element.sub

diff --git a/code/form.tag b/code/form.tag
index 0e70d6e..3c1262a 100644
--- a/code/form.tag
+++ b/code/form.tag
@@ -177,8 +177,7 @@ sub {
 			my $error = $Tag->error({name => $elref->{name},
 				show_error => 1});
 
-			push (@out_fields, theme('form_element_label', $elref->{name}, $label));
-			push (@out_fields, theme('form_element_field', $elref->{name},
+			push (@out_fields, theme('form_element', $elref->{name}, $label,
 				   	$elref->{widget} || 'text',
 					$value,
 					{class => $required ? 'required' : '',
@@ -186,7 +185,6 @@ sub {
 					error => $error,
 					%attributes}));
 
-			push (@out_fields, '<br/>');
 		}
 
 		push(@out_end, '</fieldset>');
diff --git a/code/theme_form_element.sub b/code/theme_form_element.sub
new file mode 100644
index 0000000..f7b0a48
--- /dev/null
+++ b/code/theme_form_element.sub
@@ -0,0 +1,25 @@
+#
+# Parameters are:
+#
+# name - Element name
+# label - Element label
+# type - Element type
+# value - Element value
+# attributes - Hash with attributes
+
+Sub theme_form_element <<EOS
+sub {
+	my ($name, $label, $type, $value, $attributes) = @_;
+	my ($out);
+	
+	$out = theme('form_element_label', $elref->{name}, $label);
+	$out .= theme('form_element_field', $elref->{name},
+				   	$elref->{widget} || 'text',
+					$value,
+					$attributes);
+
+	$out .= '<br/>';
+	
+	return $out;
+}
+EOS
\ No newline at end of file


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list