- Timestamp:
- 03/16/05 11:47:57 (20 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r66 r72 5 5 * added support for limited growth 'growable' fields 6 6 * allow end of field line comments 7 * addded an external_css option to include external stylesheets 7 8 8 9 0.09 - 10 Mar 2005 -
trunk/lib/Text/FormBuilder.pm
r71 r72 106 106 # CSS Hint: to get multiple sections to all line up their fields, 107 107 # set a standard width for th.label 108 # external_css: scalar for a single external stylesheet; array for 109 # multiple sheets; prepended to the beginning of the CSS as @import 110 # statetments 108 111 my $css; 109 112 $css = $options{css} || $DEFAULT_CSS; 113 if ($options{external_css}) { 114 my $ref = ref $options{external_css}; 115 if ($ref eq 'ARRAY') { 116 # loop over the list of external sheets 117 my $external_sheets = join("\n", map { "\@import url($_);" } @{ $options{external_css} }); 118 $css = "$external_sheets\n$css"; 119 } elsif ($ref) { 120 croak '[' . (caller(0))[3] . "] Don't know how to handle $ref reference as an argument to external_css"; 121 } else { 122 $css = "\@import url($options{external_css});\n$css"; 123 } 124 } 110 125 $css .= $options{extra_css} if $options{extra_css}; 111 126 … … 721 736 css => '@import(my_external_stylesheet.css);' 722 737 738 =item C<external_css> 739 740 If you want to use multiple external stylesheets, or an external stylesheet 741 in conojunction with the default styles, use the C<external_css> option: 742 743 # single external sheet 744 external_css => 'my_styles.css' 745 746 # mutliple sheets 747 external_css => [ 748 'my_style_A.css', 749 'my_style_B.css', 750 ] 751 723 752 =item C<messages> 724 753 … … 792 821 $ perl -MText::FormBuilder -e"Text::FormBuilder->parse('formspec.txt')->write_module('My::Form')" 793 822 794 And then, in your CGI script, use the new module:823 B<FIXME> And then, in your CGI script, use the new module: 795 824 796 825 #!/usr/bin/perl -w … … 1169 1198 Document use of the parser as a standalone module 1170 1199 1200 Make sure that the docs match the generated code. 1201 1171 1202 Better tests! 1172 1203 … … 1184 1215 1185 1216 =head2 Code generation/Templates 1186 1187 Alternative format using C<< <fieldset> >> tags instead of C<< <h2> >>1188 section headers1189 1190 Make the generated modules into subclasses of CGI::FormBuilder1191 1217 1192 1218 Revise the generated form constructing code to use the C<fieldopts>
Note: See TracChangeset
for help on using the changeset viewer.