[html-formfu] Label element

Mario Minati mario.minati at googlemail.com
Wed Jul 1 21:14:28 GMT 2009


Hi Carl,

I would like to bring this topic up again, as you didn't answer Moritz mail.

The bug with the test failing if rendering with 'tt' has just been fixed in 
1544.

Are still any wishes or concerns against the Label element?


Greets,

Mario

Am Freitag 20 März 2009 14:02:30 schrieb Moritz Onken:
> Hi Carl,
>
> comments are in-line.
>
> Am 20.03.2009 um 12:26 schrieb Carl Franks:
> > Moritz,
> >
> > I see a Label element appeared in svn at some point! ;)
> > There's a few problems with it...
> >
> > The tests fail when run with ENV var HTML_FORMFU_RENDER_METHOD=tt
> > This is because there's no TT template for it in share/templates/tt/
> > xhtml
>
> I added label_tag (since label already existed) and added some code.
> Unfortunately I cannot access self.tag in there. Any ideas?
>
> > There should be a link to it from the HTML/Element.pm pod section
> > "OTHER CORE ELEMENTS"
>
> done
>
> > Someone could still submit a name=value pair for it.
> > The model_config->{read_only} = 1 handles that for Model-DBIC, but it
> > could cause problems for other things.
> > I'm not sure it should really inherit from Element/_Field - though
> > dealing with that would be troublesome.
> > I'd suggest it should at least do something like:
> >
> >    sub process_input {
> >        my ( $self, $input ) = @_;
> >
> >        my $form = $self->form;
> >        my $name = $self->nested_name;
> >
> >        if ( $form->submitted && $form->nested_hash_key_exists(
> > $input, $name ) ) {
> >            $form->delete_nested_hash_value( $input, $name );
> >        }
> >
> >        return;
> >    }
>
> Ok, I added those lines, but I have no idea what they do actually :-)
> I'd like to write a test for that, but I don't know what I should test.
> Label inherits from _Field because I thought that Model::DBIC only
> fills in those elements.
>
> > These will need dealt with before Label.pm can be pushed to cpan.
> >
> > I'd also prefer it if the test file followed the same conventions as
> > others:
> > Have the form config in a separate config file - t/elements/label.yml
> > .t files shouldn't have a shbang line
> > and should use strict + warnings
>
> done.
>
> Committed revision 1380.
>
>
> Those FormatNumber modules should still be skipped. Format::Number still
> fails on many system which base on BSD or are 64bit.
>
>
> cheers,
>
> Moritz
>
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu





More information about the HTML-FormFu mailing list