[%# views/components/error.tt Print an error for a specific component (only used in special-cases, e.g., when grouping related elements together and wanting only one error for the entire thing) Authors: Afuna Copyright (c) 2015 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference 'perldoc perlartistic' or 'perldoc perlgpl'. %] [%# errors are instances of DW::FormErrors %] [%- IF errors.exist && error_name.defined -%] [%- err = errors.get( error_name ) -%] [%- IF err -%]
[%- IF err.message # just one error -%] [%- err.message -%] [%- ELSE # multiple errors -%] [%- FOR e = err -%] [%- e.message -%] [%- END -%] [%- END -%]
[%- END -%] [%- END -%]