more tests, started coding for real...
This commit is contained in:
parent
3ed18c775b
commit
ccc9e36e25
4 changed files with 121 additions and 22 deletions
|
|
@ -36,6 +36,22 @@ use Tie::IxHash;
|
|||
use Data::Dumper;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 canSubmit
|
||||
|
||||
returns true is the current user can submit to any form attached to this EMS
|
||||
|
||||
=cut
|
||||
|
||||
sub canSubmit {
|
||||
my $self = shift;
|
||||
my $user = $self->session->user;
|
||||
for my $groupId (split ' ', $self->get('eventSubmissionGroups')) {
|
||||
return 1 if $user->isInGroup($groupId);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
|
|
@ -109,27 +125,27 @@ sub definition {
|
|||
},
|
||||
eventSubmissionTemplateId => {
|
||||
fieldType => 'template',
|
||||
defaultValue => 'yBwydfooiLvhEFawJb0VTQ',
|
||||
defaultValue => 'eventSubmissionTmplt01',
|
||||
tab => 'display',
|
||||
label => $i18n->get('print ticket template'),
|
||||
hoverHelp => $i18n->get('print ticket template help'),
|
||||
namespace => 'EMS/PrintTicket',
|
||||
namespace => 'EMS/SubmissionForm',
|
||||
},
|
||||
viewEventSubmissionQueueTemplateId => {
|
||||
fieldType => 'template',
|
||||
defaultValue => 'yBwydfooiLvhEFawJb0VTQ',
|
||||
defaultValue => 'eventQueueTmplate00001',
|
||||
tab => 'display',
|
||||
label => $i18n->get('print ticket template'),
|
||||
hoverHelp => $i18n->get('print ticket template help'),
|
||||
namespace => 'EMS/PrintTicket',
|
||||
namespace => 'EMS/SubmissionQueue',
|
||||
},
|
||||
editEventSubmissionTemplateId => {
|
||||
fieldType => 'template',
|
||||
defaultValue => 'yBwydfooiLvhEFawJb0VTQ',
|
||||
defaultValue => 'editEventSubmissionT01',
|
||||
tab => 'display',
|
||||
label => $i18n->get('print ticket template'),
|
||||
hoverHelp => $i18n->get('print ticket template help'),
|
||||
namespace => 'EMS/PrintTicket',
|
||||
namespace => 'EMS/EditSubmission',
|
||||
},
|
||||
badgeInstructions => {
|
||||
fieldType => 'HTMLArea',
|
||||
|
|
@ -403,6 +419,28 @@ sub getTokens {
|
|||
return $self->getLineage(['children'],{returnObjects=>1, includeOnlyClasses=>['WebGUI::Asset::Sku::EMSToken']});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 hasForms
|
||||
|
||||
returns true if the EMS has subission forms attached
|
||||
|
||||
=cut
|
||||
|
||||
sub hasForms {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 hasSubmissions
|
||||
|
||||
returns true if the current user has submission forms in this EMS
|
||||
|
||||
=cut
|
||||
|
||||
sub hasSubmissions {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 isRegistrationStaff ( [ user ] )
|
||||
|
|
@ -498,9 +536,16 @@ sub view {
|
|||
addBadgeUrl => $self->getUrl('func=add;class=WebGUI::Asset::Sku::EMSBadge'),
|
||||
buildBadgeUrl => $self->getUrl('func=buildBadge'),
|
||||
viewScheduleUrl => $self->getUrl('func=viewSchedule'),
|
||||
newSubmissionUrl => $self->getUrl('func=newSubmission'),
|
||||
viewSubmissionsUrl => $self->getUrl('func=viewSubmissions'),
|
||||
viewSubmissionQueueUrl => $self->getUrl('func=viewSubmissionQueue'),
|
||||
addSubmissionFormUrl => $self->getUrl('func=addSubmissionForm'),
|
||||
manageBadgeGroupsUrl=> $self->getUrl('func=manageBadgeGroups'),
|
||||
getBadgesUrl => $self->getUrl('func=getBadgesAsJson'),
|
||||
canEdit => $self->canEdit,
|
||||
canSubmit => $self->canSubmit,
|
||||
hasSubmissions => $self->hasSubmissions,
|
||||
hasForms => $self->hasForms,
|
||||
lookupRegistrantUrl => $self->getUrl('func=lookupRegistrant'),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,21 @@ our $I18N = { ##hashref of hashes
|
|||
lastUpdated => 1131394072,
|
||||
context => q|This is the label used to describe the EMS submission cleanup activity|
|
||||
},
|
||||
'past deadline message' => {
|
||||
message => q|The deadline for this submission is past, no more submissions will be taken at this time.|,
|
||||
lastUpdated => 1131394072,
|
||||
context => q|This is the default message for informing the user that the submission deadline is past.|
|
||||
},
|
||||
'past deadline label' => {
|
||||
message => q|Post SUbmission Deadline Text|,
|
||||
lastUpdated => 1131394072,
|
||||
context => q|This is the label for the message indicating that the deadline for submissions has past.|
|
||||
},
|
||||
'past deadline label help' => {
|
||||
message => q|Enter a message here to let the user know that submissions are no longer being taken because the deadline has past.|,
|
||||
lastUpdated => 1131394072,
|
||||
context => q|This help text should describe how the user tells submitters that the submission deadline has past.|
|
||||
},
|
||||
|
||||
# 'TODO' => {
|
||||
# message => q|TODO|,
|
||||
|
|
|
|||
|
|
@ -1878,6 +1878,36 @@ normal templates.|,
|
|||
context => q|help text for the columns per page field|,
|
||||
},
|
||||
|
||||
'new submission form' => {
|
||||
message => q|New Submission Form|,
|
||||
lastUpdated => 1147050475,
|
||||
context => q|Label for the link to create a new submission form.|,
|
||||
},
|
||||
|
||||
'view submission queue' => {
|
||||
message => q|Submission Queue|,
|
||||
lastUpdated => 1147050475,
|
||||
context => q|Label for link to view submission queue.|,
|
||||
},
|
||||
|
||||
'new submission' => {
|
||||
message => q|New Submission|,
|
||||
lastUpdated => 1147050475,
|
||||
context => q|Label for link to create a new submission for an event.|,
|
||||
},
|
||||
|
||||
'view my submissions' => {
|
||||
message => q|My Submissions|,
|
||||
lastUpdated => 1147050475,
|
||||
context => q|Label for link to view submissions owned by current user.|,
|
||||
},
|
||||
|
||||
# 'TODO' => {
|
||||
# message => q|TODO|,
|
||||
# lastUpdated => 1147050475,
|
||||
# context => q|TODO|,
|
||||
# },
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue