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

Stefan Hornburg racke at rt.icdevgroup.org
Sun Mar 22 19:00:50 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  e49e0f873fe263bcfa5a9aa2965bee4e0c11a254 (commit)
      from  5afbf38a042d84507d8549b715257a5fe7b5cd82 (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 e49e0f873fe263bcfa5a9aa2965bee4e0c11a254
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Sun Mar 22 20:00:01 2009 +0100

    fix one off and reset error in series jump
    add a bit documentation about form parts

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

Summary of changes and diff:
 README        |   13 +++++++++++++
 code/form.tag |   12 ++++++++----
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/README b/README
index 4a6439c..e4ff362 100644
--- a/README
+++ b/README
@@ -50,6 +50,19 @@ MV_ATTRIBUTE_AUTO
 Forms
 *****
 
+Parts
+-----
+
+Each form consists of one or subforms, called parts. The parts are stored
+in the "form_series" table:
+
+name     Form name
+part     Part name
+label    Label displayed on top of the form (optional)
+template Template (optional)
+profile  Profile to check input in this part (optional)
+position Position of part (1,2,3,...)
+
 Template
 --------
 
diff --git a/code/form.tag b/code/form.tag
index e1cec14..d71c753 100644
--- a/code/form.tag
+++ b/code/form.tag
@@ -28,7 +28,7 @@ sub {
 			if (@line) {
 				if ($line[0]->{position} < $Session->{form_series}->{$name}) {
 					# backward jumps are fine
-					$back = $Session->{form_series}->{$name} - $line[0]->{position};
+					$back = $Session->{form_series}->{$name} - $line[0]->{position} - 1;
 				}
 				else {
 					# ignore invalid jump
@@ -39,6 +39,9 @@ sub {
 				# ignore invalid jump
 				Log ("Invalid jump to $CGI->{form_series}->{$name} detected.");
 			}
+
+			# clear jump target
+			delete $CGI->{form_series_jump};
 		} elsif ($CGI->{series} eq $name) {
 			if ($Session->{form_series}->{$name} <= $pos_max) {
 				$Session->{form_series}->{$name} += 1;
@@ -55,9 +58,10 @@ sub {
 			$back = 1;
 		}
 
-		if ($back) {
-			if ($Session->{form_series}->{$name} > 2) {
-				$Session->{form_series}->{$name} -= 2;
+		if (defined $back) {
+			if ($Session->{form_series}->{$name} > $back + 1) {
+				$Session->{form_series}->{$name} -= $back + 1;
+				$back = 1;
 			} else {
 				$back = 0;
 			}


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list