[interchange-cvs] interchange - racke modified code/UserTag/formel.tag

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Tue Jul 23 06:09:02 2002


User:      racke
Date:      2002-07-23 10:08:57 GMT
Modified:  code/UserTag formel.tag
Log:
fixed missing label for radio and checkbox types
new pseudo type display

Revision  Changes    Path
1.3       +10 -4     interchange/code/UserTag/formel.tag


rev 1.3, prev_rev 1.2
Index: formel.tag
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/code/UserTag/formel.tag,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- formel.tag	12 Apr 2002 12:32:44 -0000	1.2
+++ formel.tag	23 Jul 2002 10:08:55 -0000	1.3
@@ -19,7 +19,7 @@
 # MA  02111-1307  USA.
=20
 UserTag formel Order label name type size
-UserTag formel Version 0.08
+UserTag formel Version 0.09
 UserTag formel addAttr
 UserTag formel Routine <<EOF
 sub {
@@ -104,7 +104,7 @@
 			$elhtml .=3D qq{<input type=3D$type name=3D$name value=3D"${rvalue}"$se=
lect> $rlabel};
 		}
 		# delete error implicitly
-		&$labelproc();
+		$labelhtml =3D &$labelproc($label);
 		return sprintf ($fmt, $labelhtml, $elhtml);
 	}
=20
@@ -135,7 +135,10 @@
 			qq{<select name=3D$name>$elhtml</select>});
 	}
=20
-    if ($opt->{reset}) {
+	if ($type eq 'display') {
+		# try to handle widget with UI tag display
+		$elhtml =3D $Tag->display($opt->{table} || 'products', $name);
+	} elsif ($opt->{reset}) {
 		if ($type eq 'textarea') {
 	        $elhtml =3D qq{<textarea name=3D"${name}"$sizestr></textarea>};
 		} else {
@@ -184,7 +187,10 @@
 =3Ditem type
=20
 The type of the form element (supported are text, textarea,
-checkbox, radio and select).
+checkbox, radio, select and display). If the given type is display,
+the display tag will be called and the return value will be used as=20
+form element. Note that this tag might not be available depending=20
+on your configuration.
=20
 =3Ditem size
=20