From bdf77d52080d41cdba9fcfd4b3443e868f2d192e Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 25 Jul 2008 13:25:05 +0200 Subject: [PATCH] Enhanced error display in all admin templates. Fixed minor issues. --- src/admin/views.php | 9 ++++++++- src/lang/de/main.php | 2 ++ src/lang/en/main.php | 4 +++- src/lang/pt_BR/main.php | 3 ++- src/templates/admin/admin_groups.html | 17 +++++++++-------- src/templates/admin/admin_searches.html | 5 ++++- src/templates/admin/admin_sources.html | 5 ++++- src/templates/admin/admin_users.html | 5 ++++- src/templates/admin/admin_views.html | 7 +++++-- src/templates/details.html | 2 +- src/templates/index.html | 2 +- src/themes/dark/main.css | 3 --- src/themes/default/main.css | 3 --- 13 files changed, 43 insertions(+), 24 deletions(-) diff --git a/src/admin/views.php b/src/admin/views.php index 06a3580..fdff64e 100644 --- a/src/admin/views.php +++ b/src/admin/views.php @@ -58,6 +58,9 @@ IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' ); //if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 ) // DieWithFriendlyErrorMsg( $content['LN_ADMIN_ERROR_NOTALLOWED'] ); +// Init helper variable to empty string +$content['FormUrlAddOP'] = ""; + if ( isset($_GET['op']) ) { if ($_GET['op'] == "add") @@ -72,6 +75,7 @@ if ( isset($_GET['op']) ) $content['userid'] = null; $content['CHECKED_ISUSERONLY'] = ""; $content['VIEWID'] = ""; + $content['FormUrlAddOP'] = "?op=add"; // --- Check if groups are available $content['SUBGROUPS'] = GetGroupsForSelectfield(); @@ -88,7 +92,6 @@ if ( isset($_GET['op']) ) $content['VIEW_FORMACTION'] = "editview"; $content['VIEW_SENDBUTTON'] = $content['LN_VIEWS_EDIT']; - // Copy Views array for further modifications $content['VIEWS'] = $content['Views']; @@ -99,6 +102,10 @@ if ( isset($_GET['op']) ) $content['VIEWID'] = DB_RemoveBadChars($_GET['id']); if ( isset($content['VIEWS'][ $content['VIEWID'] ]) ) { + + //Set the FormAdd URL + $content['FormUrlAddOP'] = "?op=edit&id=" . $content['VIEWID']; + $myview = $content['VIEWS'][ $content['VIEWID'] ]; $content['DisplayName'] = $myview['DisplayName'] ; diff --git a/src/lang/de/main.php b/src/lang/de/main.php index 50ed8bb..e126ffd 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -57,6 +57,8 @@ $content['LN_GEN_SOURCE_DB'] = "Datenbank"; $content['LN_GEN_DB_SQLITE'] = "SQLite 2"; $content['LN_GEN_SELECTVIEW'] = "Select View"; $content['LN_GEN_CRITERROR_UNKNOWNTYPE'] = "The source type '%1' is not supported by phpLogCon yet. This is a critical error, please fix your configuration."; + $content['LN_GEN_ERRORRETURNPREV'] = "Click here to return to the previous site."; + $content['LN_GEN_ERRORDETAILS'] = "Error Details:"; // Topmenu Entries $content['LN_MENU_SEARCH'] = "Suchen"; diff --git a/src/lang/en/main.php b/src/lang/en/main.php index cf3e7ca..8fc40c2 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -58,7 +58,9 @@ $content['LN_GEN_DB_INFORMIX'] = "IBM Informix Dynamic Server"; $content['LN_GEN_DB_SQLITE'] = "SQLite 2"; $content['LN_GEN_SELECTVIEW'] = "Select View"; $content['LN_GEN_CRITERROR_UNKNOWNTYPE'] = "The source type '%1' is not supported by phpLogCon yet. This is a critical error, please fix your configuration."; - + $content['LN_GEN_ERRORRETURNPREV'] = "Click here to return to the previous site."; + $content['LN_GEN_ERRORDETAILS'] = "Error Details:"; + // Topmenu Entries $content['LN_MENU_SEARCH'] = "Search"; $content['LN_MENU_SHOWEVENTS'] = "Show Events"; diff --git a/src/lang/pt_BR/main.php b/src/lang/pt_BR/main.php index 0c869c3..abb861e 100644 --- a/src/lang/pt_BR/main.php +++ b/src/lang/pt_BR/main.php @@ -61,7 +61,8 @@ $content['LN_GEN_DB_INFORMIX'] = "IBM Informix Dynamic Server"; $content['LN_GEN_DB_SQLITE'] = "SQLite 2"; $content['LN_GEN_SELECTVIEW'] = "Visão"; $content['LN_GEN_CRITERROR_UNKNOWNTYPE'] = "The source type '%1' is not supported by phpLogCon yet. This is a critical error, please fix your configuration."; - $content['LN_GEN_CRITERROR_UNKNOWNTYPE'] = "The source type '%1' is not supported by phpLogCon yet. This is a critical error, please fix your configuration."; + $content['LN_GEN_ERRORRETURNPREV'] = "Click here to return to the previous site."; + $content['LN_GEN_ERRORDETAILS'] = "Error Details:"; // Topmenu Entries $content['LN_MENU_SEARCH'] = "Search"; diff --git a/src/templates/admin/admin_groups.html b/src/templates/admin/admin_groups.html index 5004c9f..39fb83f 100644 --- a/src/templates/admin/admin_groups.html +++ b/src/templates/admin/admin_groups.html @@ -1,19 +1,20 @@ + +
+
+

{LN_GEN_ERRORDETAILS} {ERROR_MSG}

+{LN_GEN_ERRORRETURNPREV} +
+
+ +
{LN_GROUP_CENTER}
- - -

-
-

{ERROR_MSG}

-
- -

diff --git a/src/templates/admin/admin_searches.html b/src/templates/admin/admin_searches.html index a3d1769..8154bae 100644 --- a/src/templates/admin/admin_searches.html +++ b/src/templates/admin/admin_searches.html @@ -1,9 +1,12 @@ +
-

{ERROR_MSG}

+

{LN_GEN_ERRORDETAILS} {ERROR_MSG}

+{LN_GEN_ERRORRETURNPREV}
+
diff --git a/src/templates/admin/admin_sources.html b/src/templates/admin/admin_sources.html index b18d0cc..3a33998 100644 --- a/src/templates/admin/admin_sources.html +++ b/src/templates/admin/admin_sources.html @@ -30,9 +30,12 @@ +
-

{ERROR_MSG}

+

{LN_GEN_ERRORDETAILS} {ERROR_MSG}

+{LN_GEN_ERRORRETURNPREV}
+
diff --git a/src/templates/admin/admin_users.html b/src/templates/admin/admin_users.html index 3ed324e..71e897f 100644 --- a/src/templates/admin/admin_users.html +++ b/src/templates/admin/admin_users.html @@ -1,9 +1,12 @@ +
-

{ERROR_MSG}

+

{LN_GEN_ERRORDETAILS} {ERROR_MSG}

+{LN_GEN_ERRORRETURNPREV}
+
diff --git a/src/templates/admin/admin_views.html b/src/templates/admin/admin_views.html index 61276a1..d302e8a 100644 --- a/src/templates/admin/admin_views.html +++ b/src/templates/admin/admin_views.html @@ -1,9 +1,12 @@ +
-

{ERROR_MSG}

+

{LN_GEN_ERRORDETAILS} {ERROR_MSG}

+{LN_GEN_ERRORRETURNPREV}
+
@@ -57,7 +60,7 @@ - +
diff --git a/src/templates/details.html b/src/templates/details.html index 04bbf0b..eb80a7d 100644 --- a/src/templates/details.html +++ b/src/templates/details.html @@ -88,7 +88,7 @@

-

{LN_ERROR_NORECORDS} (code {error_code} ) - Error Details:

+

{LN_ERROR_NORECORDS} (code {error_code} ) - {LN_GEN_ERRORDETAILS}

{detailederror}

diff --git a/src/templates/index.html b/src/templates/index.html index c63404f..c531566 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -343,7 +343,7 @@

-

{LN_ERROR_NORECORDS} - Error Details:

+

{LN_ERROR_NORECORDS} - {LN_GEN_ERRORDETAILS}

{detailederror}

diff --git a/src/themes/dark/main.css b/src/themes/dark/main.css index 5f32dda..135399f 100644 --- a/src/themes/dark/main.css +++ b/src/themes/dark/main.css @@ -333,9 +333,6 @@ A.cellmenu1_link:hover { font: bold 12px Verdana, Arial, Helvetica, sans-serif; COLOR: #FF2222; - border-top: 1px solid; - border-bottom: 1px solid; - border-color: #58363E; } .PriorityEmergency { diff --git a/src/themes/default/main.css b/src/themes/default/main.css index 44eec8d..770eba7 100644 --- a/src/themes/default/main.css +++ b/src/themes/default/main.css @@ -339,9 +339,6 @@ A.cellmenu1_link:hover { font: bold 12px Verdana, Arial, Helvetica, sans-serif; COLOR: #FF0000; - border-top: 1px solid; - border-bottom: 1px solid; - border-color: #58363E; } .PriorityEmergency {
{LN_VIEWS_ADDEDIT}