mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
add optional parameter $plain to exitError()
if set, the resulting html will only be a html fragment to be embedded in a page
This commit is contained in:
parent
34ce80eb3d
commit
3fbfadeebd
|
@ -128,12 +128,12 @@ class UI extends UI_Default {
|
||||||
return $themes;
|
return $themes;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
static function exitError($pagetitle, $error) {
|
static function exitError($pagetitle, $error, $noexit=false, $plain=false) {
|
||||||
global $theme, $dms;
|
global $theme, $dms;
|
||||||
$tmp = 'ErrorDlg';
|
$tmp = 'ErrorDlg';
|
||||||
$view = UI::factory($theme, $tmp);
|
$view = UI::factory($theme, $tmp);
|
||||||
$view->setParam('dms', $dms);
|
$view->setParam('dms', $dms);
|
||||||
$view->exitError($pagetitle, $error);
|
$view->exitError($pagetitle, $error, $noexit, $plain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1438,20 +1438,24 @@ $('#clearfilename<?php print $formName ?>').click(function(ev) {
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function exitError($pagetitle, $error, $noexit=false) { /* {{{ */
|
function exitError($pagetitle, $error, $noexit=false, $plain=false) { /* {{{ */
|
||||||
|
|
||||||
$this->htmlStartPage($pagetitle);
|
if(!$plain) {
|
||||||
$this->globalNavigation();
|
$this->htmlStartPage($pagetitle);
|
||||||
$this->contentStart();
|
$this->globalNavigation();
|
||||||
|
$this->contentStart();
|
||||||
|
}
|
||||||
|
|
||||||
print "<div class=\"alert alert-error\">";
|
print "<div class=\"alert alert-error\">";
|
||||||
print "<h4>".getMLText('error')."!</h4>";
|
print "<h4>".getMLText('error')."!</h4>";
|
||||||
print htmlspecialchars($error);
|
print htmlspecialchars($error);
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
|
if(!$plain) {
|
||||||
|
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
|
||||||
$this->contentEnd();
|
|
||||||
$this->htmlEndPage();
|
$this->contentEnd();
|
||||||
|
$this->htmlEndPage();
|
||||||
|
}
|
||||||
|
|
||||||
// add_log_line(" UI::exitError error=".$error." pagetitle=".$pagetitle, PEAR_LOG_ERR);
|
// add_log_line(" UI::exitError error=".$error." pagetitle=".$pagetitle, PEAR_LOG_ERR);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user