diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a101c75ac..7532ac534 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -36,6 +36,7 @@ - fixed: #4174: UserList template show links that should be hidden (Yung Han Khoe) - fixed #8802: isImage not functioning in Folders + - added RFE #480: Apply button for assets 7.6.0 - added: users may now customize the post received page for the CS diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 61d759225..8fe06328b 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -806,6 +806,14 @@ sub getEditForm { value => $i18n->get("save and commit"), })); } + + $tabform->submitAppend( + WebGUI::Form::submit ( $self->session, { + name => "saveAndReturn", + value => $i18n->get( "apply" ), + } ) + ); + $tabform->hidden({ name=>"func", value=>"editSave" @@ -2567,6 +2575,11 @@ sub www_editSave { } } + # Handle "saveAndReturn" button + if ( $self->session->form->process( "saveAndReturn" ) ne "" ) { + return $self->www_edit; + } + # Handle "proceed" form parameter if ($self->session->form->process("proceed") eq "manageAssets") { $self->session->asset($object->getParent); diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm index d6e120720..a2f0f140d 100644 --- a/lib/WebGUI/i18n/English/Asset.pm +++ b/lib/WebGUI/i18n/English/Asset.pm @@ -8,6 +8,12 @@ our $I18N = { context => q|A button added to all asset properties pages when save and commit mode is enabled.| }, + 'apply' => { + message => q{Apply}, + lastUpdated => 0, + context => q{The label for the button to save and then return to the edit page.}, + }, + 'keywords' => { message => q|Keywords|, lastUpdated => 0,