more changes

This commit is contained in:
daviddelikat 2009-10-04 10:06:23 -05:00
parent e6d95ec533
commit 6bbd832668
4 changed files with 172 additions and 87 deletions

View file

@ -32,6 +32,16 @@ Describe your New Asset's functionality and features here.
use WebGUI::Asset::EMSSubmission;
=head1 TODO
the comments tab may need to be added in a getEditForm function like Sku::EMSTicket
make a button/link for the admin to view the submission as the owner sees it.
the www_edit function should see if the userid is the owner and call a seperate function
else if it is not in the admin group return insufitient priviledges
else call the getEditForm function like sku::EMSTicket does...
=head1 METHODS
@ -76,74 +86,116 @@ sub definition {
my $i18n = WebGUI::International->new( $session, "Asset_EMSSubmission" );
my $EMS_i18n = WebGUI::International->new($session, "Asset_EventManagementSystem");
tie my %properties, 'Tie::IxHash', (
submissionId => {
noFormPost => 1,
fieldType => "hidden",
submissionId => {
noFormPost => 1,
fieldType => "hidden",
defaultValue => undef,
},
description => {
tab => "properties",
fieldType => "HTMLArea",
defaultValue => undef,
label => $i18n->get("description"),
hoverHelp => $i18n->get("description help")
},
sku => {
tab => "shop",
fieldType => "text",
defaultValue => $session->id->generate,
label => $i18n->get("sku"),
hoverHelp => $i18n->get("sku help")
},
displayTitle => {
tab => "display",
fieldType => "yesNo",
defaultValue => 1,
label => $i18n->get("display title"),
hoverHelp => $i18n->get("display title help")
},
vendorId => {
tab => "shop",
fieldType => "vendor",
defaultValue => 'defaultvendor000000000',
label => $i18n->get("vendor"),
hoverHelp => $i18n->get("vendor help")
},
shipsSeparately => {
tab => 'shop',
fieldType => 'yesNo',
defaultValue => 0,
label => $i18n->get('shipsSeparately'),
hoverHelp => $i18n->get('shipsSeparately help'),
},
price => {
tab => "shop",
fieldType => "float",
defaultValue => 0.00,
label => $EMS_i18n->get("price"),
hoverHelp => $EMS_i18n->get("price help"),
},
seatsAvailable => {
tab => "shop",
fieldType => "integer",
defaultValue => 25,
label => $EMS_i18n->get("seats available"),
hoverHelp => $EMS_i18n->get("seats available help"),
},
startDate => {
noFormPost => 1,
fieldType => "hidden",
defaultValue => '',
label => $EMS_i18n->get("add/edit event start date"),
hoverHelp => $EMS_i18n->get("add/edit event start date help"),
autoGenerate => 0,
},
duration => {
tab => "properties",
fieldType => "float",
defaultValue => 1.0,
subtext => $EMS_i18n->get('hours'),
label => $EMS_i18n->get("duration"),
hoverHelp => $EMS_i18n->get("duration help"),
},
location => {
fieldType => "combo",
tab => "properties",
customDrawMethod=> 'drawLocationField',
label => $EMS_i18n->get("location"),
hoverHelp => $EMS_i18n->get("location help"),
},
relatedBadgeGroup => {
tab => "properties",
fieldType => "checkList",
customDrawMethod=> 'drawRelatedBadgeGroupsField',
label => $EMS_i18n->get("related badge groups"),
hoverHelp => $EMS_i18n->get("related badge groups ticket help"),
},
relatedRibbons => {
tab => "properties",
fieldType => "checkList",
customDrawMethod=> 'drawRelatedRibbonsField',
label => $EMS_i18n->get("related ribbons"),
hoverHelp => $EMS_i18n->get("related ribbons help"),
},
eventMetaData => {
noFormPost => 1,
fieldType => "hidden",
defaultValue => '{}',
},
sendEmailOnChange => {
tab => "properties",
fieldType => "text",
defaultValue => undef,
},
price => {
tab => "shop",
fieldType => "float",
defaultValue => 0.00,
label => $EMS_i18n->get("price"),
hoverHelp => $EMS_i18n->get("price help"),
},
seatsAvailable => {
tab => "shop",
fieldType => "integer",
defaultValue => 25,
label => $EMS_i18n->get("seats available"),
hoverHelp => $EMS_i18n->get("seats available help"),
},
startDate => {
noFormPost => 1,
fieldType => "hidden",
defaultValue => '',
label => $EMS_i18n->get("add/edit event start date"),
hoverHelp => $EMS_i18n->get("add/edit event start date help"),
autoGenerate => 0,
},
duration => {
tab => "properties",
fieldType => "float",
defaultValue => 1.0,
subtext => $EMS_i18n->get('hours'),
label => $EMS_i18n->get("duration"),
hoverHelp => $EMS_i18n->get("duration help"),
},
location => {
fieldType => "combo",
tab => "properties",
customDrawMethod=> 'drawLocationField',
label => $EMS_i18n->get("location"),
hoverHelp => $EMS_i18n->get("location help"),
},
relatedBadgeGroup => {
tab => "properties",
fieldType => "checkList",
customDrawMethod=> 'drawRelatedBadgeGroupsField',
label => $EMS_i18n->get("related badge groups"),
hoverHelp => $EMS_i18n->get("related badge groups ticket help"),
},
relatedRibbons => {
tab => "properties",
fieldType => "checkList",
customDrawMethod=> 'drawRelatedRibbonsField',
label => $EMS_i18n->get("related ribbons"),
hoverHelp => $EMS_i18n->get("related ribbons help"),
},
eventMetaData => {
noFormPost => 1,
fieldType => "hidden",
defaultValue => '{}',
},
sendEmailOnChange => {
tab => "properties",
fieldType => "text",
defaultValue => undef,
label => $i18n->get("foo label"),
hoverHelp => $i18n->get("foo label help")
},
label => $i18n->get("send email label"),
hoverHelp => $i18n->get("send email label help")
},
commentTab => {
noFormPost => 1,
tab => "comments",
fieldType => "hidden",
customDrawMethod => 'drawComments',
}
);
push @{$definition}, {
assetName => $i18n->get('assetName'),

View file

@ -38,6 +38,12 @@ and then become EMSTicket's.
use WebGUI::Asset::EMSSubmissionForm;
=head1 TODO
add a lastSubmissionDate -- after that the submission form will be closed
the link will still exist but the form will just say '<title> submissions closed as of <date>'
=head1 METHODS
These methods are available from this class:
@ -235,10 +241,10 @@ This method is called when data is purged by the system.
=cut
sub purgeRevision {
my $self = shift;
return $self->SUPER::purgeRevision;
}
#sub purgeRevision {
# my $self = shift;
# return $self->SUPER::purgeRevision;
#}
#-------------------------------------------------------------------

View file

@ -9,6 +9,16 @@ our $I18N = { ##hashref of hashes
lastUpdated => 1131394072,
context => q|Then name of the Asset ( Event Management System - Event Submission ).|
},
'send email label' => {
message => q|Send Email when Submission Editted|,
lastUpdated => 1131394072,
context => q|This is the lable for the flag for setting the option to send email to the owner when the submission is eddited.|
},
'send email label help' => {
message => q|Check this box if you would like to recieve email for all changes made to your submission|,
lastUpdated => 1131394072,
context => q|This is the help text for the 'send email' flag. If set to 'Yes', the user will recieve email for every change made to the submission.|
},
# 'TODO' => {
# message => q|TODO|,