add: Calendar can now choose workflow for Events
fix: Event now saves ownerUserId correctly add: GalleryAlbum now shows link to add a Photo added a test skeleton for Test::WWW::Mechanize tests
This commit is contained in:
parent
684ce5a7ca
commit
7668f68980
13 changed files with 533 additions and 15 deletions
|
|
@ -298,7 +298,8 @@ By specifying this method, you activate this feature.
|
|||
|
||||
sub getAutoCommitWorkflowId {
|
||||
my $self = shift;
|
||||
return "pbworkflow000000000003";
|
||||
return $self->getParent->get('workflowIdCommit')
|
||||
|| $self->session->setting->get('defaultVersionTagWorkflow');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1916,7 +1917,12 @@ sub www_edit {
|
|||
. WebGUI::Form::hidden($self->session, {
|
||||
name => "class",
|
||||
value => $self->session->form->process("class","className"),
|
||||
});
|
||||
})
|
||||
. WebGUI::Form::hidden( $self->session, {
|
||||
name => 'ownerUserId',
|
||||
value => $self->session->user->userId,
|
||||
} )
|
||||
;
|
||||
}
|
||||
else {
|
||||
$var->{"formHeader"}
|
||||
|
|
@ -1926,7 +1932,12 @@ sub www_edit {
|
|||
. WebGUI::Form::hidden($self->session, {
|
||||
name => "sequenceNumber",
|
||||
value => $self->get("sequenceNumber"),
|
||||
});
|
||||
})
|
||||
. WebGUI::Form::hidden( $self->session, {
|
||||
name => 'ownerUserId',
|
||||
value => $self->session->user->userId,
|
||||
} )
|
||||
;
|
||||
}
|
||||
|
||||
$var->{"formHeader"}
|
||||
|
|
|
|||
|
|
@ -263,14 +263,14 @@ sub definition {
|
|||
unitsAvailable => [ qw( days weeks months years ) ],
|
||||
},
|
||||
|
||||
# This doesn't function currently
|
||||
#subscriberNotifyOffset => {
|
||||
# fieldType => "integer",
|
||||
# defaultValue => "2",
|
||||
# tab => "properties",
|
||||
# hoverHelp => $i18n->get('subscriberNotifyOffset description'),
|
||||
# label => $i18n->get('subscriberNotifyOffset label'),
|
||||
#},
|
||||
workflowIdCommit => {
|
||||
fieldType => "workflow",
|
||||
defaultValue => $session->setting->get('defaultVersionTagWorkflow'),
|
||||
tab => 'security',
|
||||
label => $i18n->get('editForm workflowIdCommit label'),
|
||||
hoverHelp => $i18n->get('editForm workflowIdCommit description'),
|
||||
type => 'WebGUI::VersionTag',
|
||||
},
|
||||
);
|
||||
|
||||
push @{$definition}, {
|
||||
|
|
@ -432,7 +432,7 @@ sub canAddEvent {
|
|||
);
|
||||
|
||||
return 1 if (
|
||||
$user->isInGroup($self->get("groupIdEventEdit"))
|
||||
$user->isInGroup( $self->get("groupIdEventEdit") )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -617,6 +617,21 @@ sub getAssetClassForFile {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 getGalleryFileClassesAvailable ( )
|
||||
|
||||
Returns an array reference of the Asset classes available to be added to this
|
||||
Gallery.
|
||||
|
||||
=cut
|
||||
|
||||
sub getGalleryFileClassesAvailable {
|
||||
my $self = shift;
|
||||
|
||||
return [ 'WebGUI::Asset::File::GalleryFile::Photo' ];
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 getImageResolutions ( )
|
||||
|
||||
Gets an array reference of the image resolutions to create for image-type
|
||||
|
|
|
|||
|
|
@ -972,7 +972,12 @@ sub www_showConfirmation {
|
|||
my $self = shift;
|
||||
my $i18n = __PACKAGE__->i18n( $self->session );
|
||||
|
||||
my $output = sprintf $i18n->get('save message'), $self->getUrl;
|
||||
my $output = '<p>' . sprintf( $i18n->get('save message'), $self->getUrl ) . '</p>'
|
||||
. '<p>' . $i18n->get('what next') . '</p>'
|
||||
. '<ul>'
|
||||
. sprintf( '<li><a href="%s">Add Photo</a></li>', $self->getUrl('func=add;class=WebGUI::Asset::File::GalleryFile::Photo') )
|
||||
. '</ul>'
|
||||
;
|
||||
|
||||
return $self->processStyle(
|
||||
$output
|
||||
|
|
|
|||
|
|
@ -459,6 +459,12 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
context => q{Label for button to confirm the delete},
|
||||
},
|
||||
|
||||
'what next' => {
|
||||
message => q{What Next?},
|
||||
lastUpdated => 0,
|
||||
context => 'Title for the list of actions a user can take after saving a Gallery Album',
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue