show tabs when save error occured

This commit is contained in:
Roland Gruber 2019-08-31 11:07:06 +02:00
parent 60c3053901
commit cfcb1efd8f
1 changed files with 3 additions and 9 deletions

View File

@ -866,7 +866,6 @@ class accountContainer {
$oldPage = $this->current_page; $oldPage = $this->current_page;
$oldSubpage = $this->subpage; $oldSubpage = $this->subpage;
$result = array(); $result = array();
$stopProcessing = false; // when set to true, no module options are displayed
$errorsOccured = false; $errorsOccured = false;
$typeObject = $this->type->getBaseType(); $typeObject = $this->type->getBaseType();
$profileLoaded = $this->loadProfileIfRequested(); $profileLoaded = $this->loadProfileIfRequested();
@ -954,7 +953,6 @@ class accountContainer {
} }
if (!$saveOk) { if (!$saveOk) {
$result = $saveMessages; $result = $saveMessages;
$stopProcessing = true;
} }
else { else {
$this->printSuccessPage($saveMessages); $this->printSuccessPage($saveMessages);
@ -1007,7 +1005,7 @@ class accountContainer {
$this->titleBarTitle = $typeObject->getTitleBarTitle($this); $this->titleBarTitle = $typeObject->getTitleBarTitle($this);
$this->titleBarSubtitle = $typeObject->getTitleBarSubtitle($this); $this->titleBarSubtitle = $typeObject->getTitleBarSubtitle($this);
// prints a module content page // prints a module content page
$this->printModuleContent($result, $stopProcessing); $this->printModuleContent($result);
if (!$errorsOccured && ($oldPage == $this->current_page) && ($oldSubpage == $this->subpage) if (!$errorsOccured && ($oldPage == $this->current_page) && ($oldSubpage == $this->subpage)
&& isset($_POST['scrollPositionTop']) && isset($_POST['scrollPositionLeft'])) { && isset($_POST['scrollPositionTop']) && isset($_POST['scrollPositionLeft'])) {
// scroll to last position // scroll to last position
@ -1025,9 +1023,8 @@ class accountContainer {
* Prints the content part provided by the current module. * Prints the content part provided by the current module.
* *
* @param array $result list of messages * @param array $result list of messages
* @param boolean $stopProcessing true if page should end after displaying the messages
*/ */
private function printModuleContent($result, $stopProcessing) { private function printModuleContent($result) {
$tabindex = 1; $tabindex = 1;
$this->printPageHeader(); $this->printPageHeader();
$this->printPasswordPromt(); $this->printPasswordPromt();
@ -1036,9 +1033,6 @@ class accountContainer {
for ($i=0; $i<sizeof($result); $i++) { for ($i=0; $i<sizeof($result); $i++) {
call_user_func_array("StatusMessage", $result[$i]); call_user_func_array("StatusMessage", $result[$i]);
} }
if ($stopProcessing) {
return;
}
} }
echo '<div id="passwordMessageArea"></div>'; echo '<div id="passwordMessageArea"></div>';
echo "<table class=\"".$this->type->getScope()."-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n"; echo "<table class=\"".$this->type->getScope()."-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
@ -1799,7 +1793,7 @@ class accountContainer {
* *
* @return array list of status messages * @return array list of status messages
*/ */
function save_account() { private function save_account() {
if (!checkIfWriteAccessIsAllowed($this->type->getId())) { if (!checkIfWriteAccessIsAllowed($this->type->getId())) {
die(); die();
} }