diff --git a/html/js/scripts.js b/html/js/scripts.js index 8ad60e383..903d1b83e 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -1967,7 +1967,17 @@ function remove_bookmark() { } ); } catch (e) { - info_message(e.getMessage); + error_message(e.getMessage); } +} +/** + *@brief display the error message into the div error_content_div (included into error_div) + *@param message message to display + *@note there is no protection + */ +function error_message(message) +{ + $('error_content_div').innerHTML=message; + $('error_div').style.visibility='visible'; } \ No newline at end of file diff --git a/html/style.css b/html/style.css index a8190a7c7..dfa7ff1f6 100644 --- a/html/style.css +++ b/html/style.css @@ -1316,4 +1316,27 @@ div#preference_div { top:2em; left:20%; width:50%; +} +#error_div{ + position:absolute; + border:1px solid black; + background-color:whitesmoke; + padding-bottom: 2px; + padding-top: 2px; + padding-left: 2px; + padding-right: 2px; + color:red; + top:20%;left:25%; + visibility:hidden; + width:40em; + z-index:20; +} +#error_div h2 { + background: red; +} +div#error_content_div { + font-size: 1.2em; + color:error; + font-weight: bold; + text-align: center; } \ No newline at end of file diff --git a/include/ac_common.php b/include/ac_common.php index 2d79b9bb1..17c6c18c7 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -310,7 +310,15 @@ function html_page_start($p_theme="", $p_script="", $p_script2="") '; echo "
"; - echo ''; + echo ''; + echo ''. + HtmlInput::button_action('Valider','$(\'error_div\').style.visibility=\'hidden\';$(\'error_content_div\').innerHTML=\'\';'). + '
'. + '