mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT Just redirect back after "import" action called, and set the session message on the Form object instead of hardcoded ID
MINOR phpDoc comments for ModelAdmin->import() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66803 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
02be93a3ca
commit
13d0f09717
@ -401,9 +401,9 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
*
|
||||
* @todo Figure out ajax submission of files via jQuery.form plugin
|
||||
*
|
||||
* @param unknown_type $data
|
||||
* @param unknown_type $form
|
||||
* @param unknown_type $request
|
||||
* @param array $data
|
||||
* @param Form $form
|
||||
* @param HTTPRequest $request
|
||||
*/
|
||||
function import($data, $form, $request) {
|
||||
$modelName = $data['ClassName'];
|
||||
@ -436,8 +436,8 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
);
|
||||
if(!$results->CreatedCount() && !$results->UpdatedCount()) $message .= _t('ModelAdmin.NOIMPORT', "Nothing to import");
|
||||
|
||||
Session::setFormMessage('Form_ImportForm', $message, 'good');
|
||||
Director::redirect($_SERVER['HTTP_REFERER'] . '#Form_ImportForm_holder');
|
||||
$form->sessionMessage($message, 'good');
|
||||
Director::redirectBack();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user