fix: GalleryAlbum and Photo were not showing correct confirmation messages on editSave
add: Ability to edit comments to Photos add: Ability to choose which rich editor for Albums
This commit is contained in:
parent
a69dff3dcf
commit
8af6f28988
10 changed files with 340 additions and 122 deletions
|
|
@ -118,6 +118,13 @@ sub definition {
|
|||
label => $i18n->get("maxSpacePerUser label"),
|
||||
hoverHelp => $i18n->get("maxSpacePerUser description"),
|
||||
},
|
||||
richEditIdAlbum => {
|
||||
tab => "properties",
|
||||
fieldType => "selectRichEditor",
|
||||
defaultValue => "PBrichedit000000000001", # Content Managers editor
|
||||
label => $i18n->get("richEditIdAlbum label"),
|
||||
hoverHelp => $i18n->get("richEditIdAlbum description"),
|
||||
},
|
||||
richEditIdComment => {
|
||||
tab => "properties",
|
||||
fieldType => "selectRichEditor",
|
||||
|
|
@ -157,6 +164,14 @@ sub definition {
|
|||
label => $i18n->get("templateIdEditAlbum label"),
|
||||
hoverHelp => $i18n->get("templateIdEditAlbum description"),
|
||||
},
|
||||
templateIdEditComment => {
|
||||
tab => "display",
|
||||
fieldType => "template",
|
||||
defaultValue => "OxJWQgnGsgyGohP2L3zJPQ",
|
||||
namespace => "GalleryFile/EditComment",
|
||||
label => $i18n->get("templateIdEditComment label"),
|
||||
hoverHelp => $i18n->get("templateIdEditComment description"),
|
||||
},
|
||||
templateIdEditFile => {
|
||||
tab => "display",
|
||||
fieldType => "template",
|
||||
|
|
|
|||
|
|
@ -814,29 +814,6 @@ sub www_edit {
|
|||
);
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
=head2 www_editSave ( )
|
||||
|
||||
Save the asset edit form. Overridden to give a nice message when a photo or
|
||||
album is added
|
||||
|
||||
=cut
|
||||
|
||||
sub www_editSave {
|
||||
my $self = shift;
|
||||
my $form = $self->session->form;
|
||||
my $i18n = __PACKAGE__->i18n($self->session);
|
||||
$self->SUPER::www_editSave;
|
||||
|
||||
if ( $form->get("assetId") eq "new" ) {
|
||||
return sprintf $i18n->get("addFile message"), $self->getUrl,
|
||||
}
|
||||
else {
|
||||
return sprintf $i18n->get("save message"), $self->getUrl,
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 www_showConfirmation ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue