second part of error message display changes
This commit is contained in:
@@ -47,6 +47,7 @@ if (isset($_POST['revert'])) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$error = null;
|
||||||
if ($form_display->process(false) && !$form_display->hasErrors()) {
|
if ($form_display->process(false) && !$form_display->hasErrors()) {
|
||||||
// save settings
|
// save settings
|
||||||
$old_settings = PMA_load_userprefs();
|
$old_settings = PMA_load_userprefs();
|
||||||
@@ -67,11 +68,14 @@ if ($form_display->process(false) && !$form_display->hasErrors()) {
|
|||||||
$GLOBALS['js_include'][] = 'config.js';
|
$GLOBALS['js_include'][] = 'config.js';
|
||||||
require './libraries/header.inc.php';
|
require './libraries/header.inc.php';
|
||||||
require './libraries/user_preferences.inc.php';
|
require './libraries/user_preferences.inc.php';
|
||||||
|
if ($error) {
|
||||||
|
$error->display();
|
||||||
|
}
|
||||||
if ($form_display->hasErrors()) {
|
if ($form_display->hasErrors()) {
|
||||||
// form has errors
|
// form has errors
|
||||||
?>
|
?>
|
||||||
<div class="warning config-form">
|
<div class="warning config-form">
|
||||||
<b><?php echo __('Submitted form contains errors') ?></b>
|
<b><?php echo __('Cannot save settings, submitted form contains errors') ?></b>
|
||||||
<?php $form_display->displayErrors(); ?>
|
<?php $form_display->displayErrors(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -213,6 +213,12 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
|
|||||||
$GLOBALS['js_include'][] = 'config.js';
|
$GLOBALS['js_include'][] = 'config.js';
|
||||||
require './libraries/header.inc.php';
|
require './libraries/header.inc.php';
|
||||||
require './libraries/user_preferences.inc.php';
|
require './libraries/user_preferences.inc.php';
|
||||||
|
if ($error) {
|
||||||
|
if (!$error instanceof PMA_Message) {
|
||||||
|
$error = PMA_Message::error($error);
|
||||||
|
}
|
||||||
|
$error->display();
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php
|
<?php
|
||||||
|
Reference in New Issue
Block a user