Changeset 83 in text-formbuilder for trunk


Ignore:
Timestamp:
05/11/05 14:06:05 (20 years ago)
Author:
peichman
Message:

BUGFIX: typo in write_module where params were not getting passed in
reverted to FB style required field marking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Text/FormBuilder.pm

    r82 r83  
    4747    text_author   => 'Created by %s', 
    4848    text_madewith => 'Made with %s version %s', 
    49     text_required => '* denotes a <strong>required field</strong>.', 
     49    text_required => 'Fields that are <strong>highlighted</strong> are required.', 
    5050    text_invalid  => 'Missing or invalid value.', 
    5151); 
     
    438438 
    439439sub write_module { 
    440     my ($self, $package, $use_tidy); 
     440    my ($self, $package, $use_tidy) = @_; 
    441441     
    442442    my $module = $self->as_module($package, $use_tidy); 
    443443     
    444     _write_output_file($module, (split(/::/, $package))[-1] . '.pm'); 
     444    my $outfile = (split(/::/, $package))[-1]; 
     445    $outfile .= '.pm' unless $outfile =~ /\.pm$/; 
     446    _write_output_file($module, $outfile); 
    445447    return $self; 
    446448} 
     
    558560                    $OUT .= qq[<td></td>]; 
    559561                } else { 
    560                     $OUT .= '<td class="label">' . ($$_{required} ? qq[* <strong class="required">$$_{label}</strong>] : "$$_{label}") . '</td>'; 
     562                    $OUT .= '<td class="label">' . ($$_{required} ? qq[<strong class="required">$$_{label}</strong>] : "$$_{label}") . '</td>'; 
    561563                } 
    562564                 
     
    575577                 
    576578                $OUT .= '    <td class="label">'; 
    577                 $OUT .= (grep { $$_{required} } @group_fields) ? qq[* <strong class="required">$$line[1]{label}</strong>] : "$$line[1]{label}"; 
     579                $OUT .= (grep { $$_{required} } @group_fields) ? qq[<strong class="required">$$line[1]{label}</strong>] : "$$line[1]{label}"; 
    578580                $OUT .= qq[</td>\n]; 
    579581                 
     
    12891291=head2 Language/Parser 
    12901292 
    1291 Debug flag (that sets/unsets C<$::RD_TRACE> in the parser) 
     1293Support the C<multiple> attribute for a field. 
    12921294 
    12931295Make sure that multiple runs of the parser don't share data. 
     
    13061308=head2 Code generation/Templates 
    13071309 
    1308 Expose some of the currently private functions to be able to get the generated 
    1309 code text directly, without printing. 
    1310  
    13111310Revise the generated form constructing code to use the C<fieldopts> 
    13121311option to C<< FB->new >>; will require FB 3.02 to run. 
Note: See TracChangeset for help on using the changeset viewer.