On Feb 12, 2008, at 11:14 AM, Carl Franks wrote:

On 11/02/2008, Andreas Marienborg <[EMAIL PROTECTED]> wrote:
Hey again :p

empty_first is nice, but I was wondering if its possible to have a
label for it? specificaly label_loc :p

That sounds reasonable.

It'll need to be added to Element/_Group.pm
Import mk_output_accessors() from HTML::FormFu::Attribute
then do:
   __PACKAGE__->mk_output_accessors(qw/ empty_first_label /);


So far so good. This now works.

And it'll also automatically create methods for
empty_first_label_loc() and empty_first_label_xml()


Ahh, the magic is endless :p calling $self->empty_first_label gives me the translated one if there is one it seems :) I was trying to check for a set one and translate myself, but it just works (tm).

The more difficult bit will be searching through _Group.pm for all
uses of empty_first and making sure it's handled properly.


There doesn't seem to be any tests for empty_first either? atleast grepping t/ doesn't show anything.

And tests too, of course :p


I'll add some tests in elements/select_empty_first_label.t


I attach a patch here, for review before I commit, just to make sure the code-style is ok, tests are correctly done etc.

Attachment: empty_first_label.diff
Description: Binary data




- andreas

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to