Re: [Maypole] addnew grabbing search_form parameters

From: Simon Flack (sf at flacks.net)
Date: Tue Jan 25 2005 - 12:29:00 GMT


Dave Howorth wrote:
> I wrote
>
>>>>> BUT on the list page it also appears to cause search parameters to
>>>>> be transferred to the addnew box after pressing 'search'. This
>>>>> seems wrong.
>
>
> Simon Flack wrote:
>
>>>> I noticed that, and I thought I'd fixed it by cloning the
>>>> HTML::Element returned by classmetadata.cgi.$col:
>>>> SET elem = classmetadata.cgi.$col.clone;
>>>> Do you have that line in your 'addnew' template?
>
>
> I wrote:
>
>>> That'll be what that line was for, then :) Sorry. I'll try it tomorrow.
>>
>>
>> I tried it but I still see the same symptom. Looking at the URL after
>> my search, I don't understand how cloning the element would stop the
>> request parameters matching?:
>>
>> http://localhost/cgi-bin/qd1.cgi/coords/search/?id=&name=gi&bio_database_id=&search=search
>
>
>
> I'm still seeing this in 2.08. I've just tried again with a conventional
> BeerDB.pm and the 2.08 factory templates. If I go to brewery/list, type
> the name of a brewery into the name field of the search form, then after
> I press search, I see the brewery name in the addnew form.
>
> So I think this is a problem in the distribution. Can somebody confirm
> whether or not you see the same symptoms please? TIA.

I see, I read your problem back-to-front. I thought that parameters were
appearing in the search form.

This is happening because F<factory/list> includes F<addnew> and F<search>.

I think we need something like:
        [% IF request.action = 'do_edit' %] ... [% END %]

...surrounding the manipulation of the cloned 'classmetadata.cgi.$col'

Simon

_______________________________________________
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