various changes
This commit is contained in:
parent
5f3477be4a
commit
209732287e
6 changed files with 140 additions and 40 deletions
|
|
@ -46,6 +46,28 @@ These methods are available from this class:
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addSubmission
|
||||
|
||||
Creates an EMSSubmission object based on the params
|
||||
|
||||
=cut
|
||||
|
||||
sub addSubmission {
|
||||
my $self = shift;
|
||||
my $parent = $self->getParent;
|
||||
my $session = $self->session;
|
||||
my $params = shift || {};
|
||||
$self->validateSubmission($params);
|
||||
$parent->addChild({
|
||||
className => 'WebGUI::Asset::EMSSubmission',
|
||||
status => 'pending',
|
||||
title => $params->{title},
|
||||
# TODO add all the fields...
|
||||
});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addRevision
|
||||
|
||||
This method exists for demonstration purposes only. The superclass
|
||||
|
|
@ -235,6 +257,20 @@ sub view {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 validateSubmission ( )
|
||||
|
||||
=cut
|
||||
|
||||
sub validateSubmission {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
# compare fields passed with field definition
|
||||
# return true if ok, false if not ok
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_edit ( )
|
||||
|
||||
Web facing method which is the default edit page. Unless the method needs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue