Skip to content

Commit

Permalink
Fixed issue #10472: design: add "save and close" button
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 9, 2016
1 parent ba6fd9d commit efc6c25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -666,10 +666,18 @@ function personalsettings()
$aData['sSavedLanguage'] = $user->lang;

$aData['fullpagebar']['savebutton']['form'] = 'personalsettings';
$aData['fullpagebar']['saveandclosebutton']['form'] = 'personalsettings';
$aData['fullpagebar']['closebutton']['url'] = 'admin/survey/sa/index'; // Close button

// Render personal settings view
$this->_renderWrappedTemplate('user', 'personalsettings', $aData);
if (isset($_POST['saveandclose']))
{
$this->getController()->redirect(array("admin/user/sa/index"));
}
else
{
$this->_renderWrappedTemplate('user', 'personalsettings', $aData);
}
}

private function _getUserNameFromUid($uid)
Expand Down
1 change: 1 addition & 0 deletions styles/Sea_Green/scripts/save.js
Expand Up @@ -25,6 +25,7 @@ if ($('#save-and-close-form-button').length>0){
value: '1'
}).appendTo($form);


$form.find('[type="submit"]').trigger('click');
return false;
});
Expand Down

0 comments on commit efc6c25

Please sign in to comment.