#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package BookPub::Admin::EditContributorForm;

use strict;
use warnings;

use lib '/app/tools/common/lib';
use Common::Assert;

use lib '/app/tools/bookpub/lib';
use BookPub::Catalog::Contributor;

use Common::FormObject;
use base 'Common::FormObject';

sub _init {
    my ( $self, %args ) = @_;

    $self->SUPER::_init(%args);

    if ( $args{contributorID} ) {
        $self->{Contributor} = BookPub::Catalog::Contributor->new( contributorID => $args{contributorID} );
    } else {
        $self->{Contributor} = BookPub::Catalog::Contributor->new();
    }

    return $self;
}

sub save {
    my ($self) = @_;

    $self->{Contributor}->save();
}

###
1;    #
###
