# Copyright (c) 1999-2001 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: FileAttachment.pm,v 1.3 2007/05/22 00:29:24 nagler Exp $ package Bivio::UI::HTML::Widget::FileAttachment; use strict; $Bivio::UI::HTML::Widget::FileAttachment::VERSION = sprintf('%d.%02d', q$Revision: 1.3 $ =~ /\d+/g); $_ = $Bivio::UI::HTML::Widget::FileAttachment::VERSION; =head1 NAME Bivio::UI::HTML::Widget::FileAttachment - a file widget for attaching files to email =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::UI::HTML::Widget::FileAttachment; =cut =head1 EXTENDS L =cut use Bivio::UI::Widget; @Bivio::UI::HTML::Widget::FileAttachment::ISA = ('Bivio::UI::Widget'); =head1 DESCRIPTION C is a file field for forms. =head1 ATTRIBUTES =over 4 =back =cut #=IMPORTS #=VARIABLES my($_IDI) = __PACKAGE__->instance_data_index; =head1 FACTORIES =cut =for html =head2 static new() : Bivio::UI::HTML::Widget::FileAttachment Creates a FileAttachment widget. =cut sub new { my($self) = shift->SUPER::new(@_); $self->[$_IDI] = {}; return $self; } =head1 METHODS =cut =for html =head2 initialize() Initializes from configuration attributes. =cut sub initialize { my($self) = @_; my($fields) = $self->[$_IDI]; return; } =for html =head2 render(any source, string_ref buffer) =cut sub render { my($self, $source, $buffer) = @_; # my($fields) = $self->[$_IDI]; # my($form) = $source->get_request->get_widget_value(@{$fields->{model}}); # my($field) = $fields->{field}; # first render initialization # if ($fields->{is_first_render}) { # my($type) = $fields->{type} = $form->get_field_type($field); # $fields->{prefix} = ''; return; } #=PRIVATE METHODS =head1 COPYRIGHT Copyright (c) 1999-2001 bivio Software, Inc. All rights reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: FileAttachment.pm,v 1.3 2007/05/22 00:29:24 nagler Exp $ =cut 1;