[html-formfu] A possible FormFu localization bug
Carl Franks
fireartist at gmail.com
Wed Aug 22 12:01:13 GMT 2012
On 17 August 2012 12:53, Jan Grmela <jan.grmela at imakers.cz> wrote:
> Hi there,
> I've noticed a weird FormFu behaviour when localising Checkboxgroup
> labels using 'localize_label' with a custom sub as a label_column
>
> When I set the form element config the following way:
>
> - type: Checkboxgroup
> label_loc: Roles
> name: roles
> model_config:
> localize_label: 1
> model: UsersRoles
> label_column: display_name
>
> The Catalyst app will crash on "No such column 'display_name' at
> /data/perl/perl5/lib/perl5/DBIx/Class/Schema.pm line 1088" though the
> schema has the display_name sub defined:
>
> sub display_name {
> my $self = shift;
> return $self->role_linked->description || '';
> }
>
> It is really weird because when I disable the 'localize_label'
> attribute, the form is loaded fine and the values are correctly
> processed using the display_name call.
>
> Is it by purpose or is it a bug?
This is now fixed on github, and will be included in the next cpan release.
https://github.com/fireartist/HTML-FormFu-Model-DBIC/commit/98439a7718dd209f53051372096e2ee6666395bb
Carl
More information about the HTML-FormFu
mailing list