[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 6088d8b46c64e423776d590318117214afbc175a
Stefan Hornburg
racke at rt.icdevgroup.org
Tue May 12 08:47:21 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 6088d8b46c64e423776d590318117214afbc175a (commit)
via 48990d53a0315fcf1e9c507e087a8c6d0b3a2c69 (commit)
from 70c99bcae5142f11a6b399c5a54b6dc7084cb1bf (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 6088d8b46c64e423776d590318117214afbc175a
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Tue May 12 10:46:42 2009 +0200
buttons can be specified in the database as form_elements
commit 48990d53a0315fcf1e9c507e087a8c6d0b3a2c69
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Tue May 12 10:05:50 2009 +0200
jump without a page returned
-----------------------------------------------------------------------
Summary of changes and diff:
code/form.tag | 13 +++++++++++--
code/theme_form_submit.sub | 15 +++++++++++++--
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/code/form.tag b/code/form.tag
index 047f21e..8dee8c6 100644
--- a/code/form.tag
+++ b/code/form.tag
@@ -102,6 +102,9 @@ sub {
}
return;
}
+ elsif ($hookret->{jump}) {
+ $CGI->{form_series_jump} = $hookret->{jump};
+ }
}
else {
Log("Hook $hook not found.");
@@ -152,7 +155,7 @@ sub {
}
# form elements
- my ($elset, $attrref, $attrset, $qcomp);
+ my ($elset, $attrref, $attrset, $qcomp, @buttons);
$qcomp = $Db{form_elements}->quote($opt->{part});
@@ -162,6 +165,12 @@ sub {
$attrref = $Scratch->{form_attributes}->{$opt->{series}} || {};
for my $elref (@$elset) {
+ if ($elref->{widget} eq 'button') {
+ # submit buttons are handled separately
+ push (@buttons, $elref);
+ next;
+ }
+
# fetch attributes for form element
my (%attributes, $required);
@@ -267,7 +276,7 @@ EOT
$fhash{body} .= join("\n", @out);
- $fhash{submit} = theme('form_submit', $opt->{series}, $form_name);
+ $fhash{submit} = theme('form_submit', $opt->{series}, $form_name, \@buttons);
$fhash{bottom} = q{</form>};
$fhash{required} = $required_fields;
diff --git a/code/theme_form_submit.sub b/code/theme_form_submit.sub
index 8775bf3..c4958b1 100644
--- a/code/theme_form_submit.sub
+++ b/code/theme_form_submit.sub
@@ -1,7 +1,18 @@
Sub theme_form_submit <<EOS
sub {
- my ($series, $part) = @_;
+ my ($series, $part, $buttons) = @_;
+ my $submit;
- return q{<input type="submit" name="submit" value="OK">};
+ if (@$buttons) {
+ for (@$buttons) {
+ $submit .= qq{<input type="submit" name="$_->{name}" value="$_->{label}">
+};
+ }
+ }
+ else {
+ $submit = q{<input type="submit" name="submit" value="OK">};
+ }
+
+ return $submit;
}
EOS
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list