[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 66b9a5b6c8344a9fb271fbfb27eb7261c3d102ec
Stefan Hornburg
racke at rt.icdevgroup.org
Sun Mar 15 10:59:39 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 66b9a5b6c8344a9fb271fbfb27eb7261c3d102ec (commit)
from 010bc8864108a066ef6a3460fbab7d2364e9bf63 (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 66b9a5b6c8344a9fb271fbfb27eb7261c3d102ec
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Sun Mar 15 11:59:11 2009 +0100
theme the form title
-----------------------------------------------------------------------
Summary of changes and diff:
code/form.tag | 13 ++-----------
code/theme_form_title.sub | 17 +++++++++++++++++
2 files changed, 19 insertions(+), 11 deletions(-)
create mode 100644 code/theme_form_title.sub
diff --git a/code/form.tag b/code/form.tag
index f7f7066..b4aacf9 100644
--- a/code/form.tag
+++ b/code/form.tag
@@ -57,6 +57,7 @@ sub {
if ($_->{profile} && ! $back) {
unless ($Tag->run_profile({name => $_->{profile}, cgi => 1})) {
+ Log("Errors: " . uneval($Session->{errors}));
$Session->{form_series}->{$name} -= 1;
$Tag->tmp('series_part', $_->{part});
return $Tag->form({series => $name,
@@ -125,17 +126,7 @@ sub {
return;
}
- push(@out_title, '<fieldset>');
-
- # label for form elements
- if ($opt->{label}) {
- if ($opt->{anchor}) {
- push(@out_title, qq{<legend><a name="$opt->{anchor}">$opt->{label}</a></legend>});
- }
- else {
- push(@out_title, qq{<legend>$opt->{label}</legend>});
- }
- }
+ push(@out_title, theme('form_title', $name, $opt->{label}, $opt));
if ($opt->{prepend}) {
push(@out_title, $opt->{prepend});
diff --git a/code/theme_form_title.sub b/code/theme_form_title.sub
new file mode 100644
index 0000000..feacbdb
--- /dev/null
+++ b/code/theme_form_title.sub
@@ -0,0 +1,17 @@
+Sub theme_form_title <<EOS
+sub {
+ my ($form, $label, $attributes) = @_;
+ my $title;
+
+ if ($label) {
+ if ($attributes->{anchor}) {
+ $title = qq{<a name="$attributes->{anchor}">$label</a>};
+ }
+ else {
+ $title = $label;
+ }
+ }
+
+ return $title;
+}
+EOS
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list