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

Stefan Hornburg racke at rt.icdevgroup.org
Wed May 13 09:53:26 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  cc536479c241db148110e080f870b7978754d693 (commit)
       via  1a69782011b67e8764e14028c9e90332d0a84ff1 (commit)
      from  a8f52f61947dec18bf854da7ad70a37475575936 (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 cc536479c241db148110e080f870b7978754d693
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Wed May 13 11:53:06 2009 +0200

    documentation on form components added

commit 1a69782011b67e8764e14028c9e90332d0a84ff1
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Wed May 13 11:51:37 2009 +0200

    support for review previews
    support for thanks page
    fixed wrong sku assignment in ActionMap

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

Summary of changes and diff:
 README                                     |   16 ++++++++++++++++
 plugins/reviews/code/form_reviews_load.sub |    4 +++-
 plugins/reviews/code/form_reviews_save.sub |   12 +++++++++++-
 plugins/reviews/code/reviews.sub           |    7 +++++--
 4 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/README b/README
index e355133..b71e3c9 100644
--- a/README
+++ b/README
@@ -163,6 +163,7 @@ The default template looks as follows:
 {SUBMIT}
 {BOTTOM}
 
+{PREPEND} is a placeholder which can be used for form components.
 {TOP} starts the HTML form.
 {BODY} contains the regular form elements.
 {SUBMIT} contains the button form elements (as specified in form_elements
@@ -250,6 +251,21 @@ theme_form_element_label
 theme_form_element_field
 theme_form_submit
 
+Components
+----------
+
+Regular components can also included in forms. Examples are 
+dynamic form parts and supplementary content.
+
+Form components are stored in the "form_components" table.
+
+name - form name
+part - form part (empty if component applies to all parts of the form)
+component - component name
+location - placeholder used to place the component, e.g prepend for
+	{PREPEND} placeholder 
+priority - sort order in placeholder (descending)
+
 Plugins
 *******
 
diff --git a/plugins/reviews/code/form_reviews_load.sub b/plugins/reviews/code/form_reviews_load.sub
index 60eb51e..2cb089f 100644
--- a/plugins/reviews/code/form_reviews_load.sub
+++ b/plugins/reviews/code/form_reviews_load.sub
@@ -1,6 +1,8 @@
 Sub form_reviews_load <<EOS
 sub {
-	$Tag->reviews('init');
+	unless ($CGI->{preview}) {
+		$Tag->reviews('init');
+	}
 
 	return;
 }
diff --git a/plugins/reviews/code/form_reviews_save.sub b/plugins/reviews/code/form_reviews_save.sub
index 25255ac..c8948ba 100644
--- a/plugins/reviews/code/form_reviews_save.sub
+++ b/plugins/reviews/code/form_reviews_save.sub
@@ -2,7 +2,17 @@ Sub form_reviews_save <<EOS
 sub {
 	my ($code);
 
-	$Tag->reviews('create');
+	if ($CGI->{preview}) {
+		# jumping back to reviews form and show review
+		return {page => 'reviews/create', jump => 'reviews'};
+	}
+
+	$code = $Tag->reviews('create');
+
+	if ($Variable->{REVIEWS_SHOW_THANKS}) {
+		$Tag->tmp('reviews_code', $code);
+		return {page => 'reviews/thanks'};
+	}
 
 	return {page => $Values->{sku}};
 }
diff --git a/plugins/reviews/code/reviews.sub b/plugins/reviews/code/reviews.sub
index a93e69f..183bf3f 100644
--- a/plugins/reviews/code/reviews.sub
+++ b/plugins/reviews/code/reviews.sub
@@ -4,7 +4,7 @@ sub {
 
 	if ($args[0] eq 'create'
 		&& $CGI->{sku}) {
-		$Values->{sku} = $args[0];
+		$Values->{sku} = $CGI->{sku};
 		$CGI->{mv_nextpage} = 'reviews/create';
 	}
 	elsif ($args[1] eq 'create') {
@@ -12,7 +12,10 @@ sub {
 		$CGI->{mv_nextpage} = 'reviews/create';
 		return 1;
 	}
-	else {
+	elsif ($args[0] eq 'thanks' && $Scratch->{reviews_code}) {
+		$CGI->{mv_nextpage} = 'reviews/thanks';
+		return 1;
+	} else {
 		Log("No action found for $name and @args");
 		return;
 	}


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list