Re: [Maypole] addnew grabbing search_form parameters

From: Dave Howorth (dhoworth at mrc-lmb.cam.ac.uk)
Date: Tue Jan 25 2005 - 15:03:39 GMT


Simon Flack wrote:
> I think we need something like:
> [% IF request.action = 'do_edit' %] ... [% END %]
>
> ...surrounding the manipulation of the cloned 'classmetadata.cgi.$col'

Yep. This fixes it for me ...

--- templates/factory/addnew Sun Jan 16 18:28:16 2005
+++ /var/www/beerdb_sav/factory/addnew Tue Jan 25 14:58:14 2005
@@ -20,10 +20,12 @@
              [%
              SET elem = classmetadata.cgi.$col.clone;
- IF elem.tag == "textarea";
- elem = elem.push_content(request.param(col));
- ELSE;
- elem.attr("value", request.param(col));
+ IF request.action == 'do_edit' ;
+ IF elem.tag == "textarea";
+ elem = elem.push_content(request.param(col));
+ ELSE;
+ elem.attr("value", request.param(col));
+ END;
              END;
              elem.as_XML; %]

Cheers, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT