From 4f95e68ddf58613fc04e56321f77d476e44a9d42 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 5 Jun 2008 07:31:40 +0000 Subject: [PATCH] Updated msgdialog to supprt OK/CANCEL DIALOG git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11224 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/ihtml/themes/default/msg_dialog.tpl | 9 ++++++--- gosa-core/include/class_msg_dialog.inc | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gosa-core/ihtml/themes/default/msg_dialog.tpl b/gosa-core/ihtml/themes/default/msg_dialog.tpl index add23337c..72dec7122 100644 --- a/gosa-core/ihtml/themes/default/msg_dialog.tpl +++ b/gosa-core/ihtml/themes/default/msg_dialog.tpl @@ -55,7 +55,7 @@ {t}Error{/t} {elseif $i_Type == WARNING_DIALOG} {t}Warning{/t} - {elseif $i_Type == INFO_DIALOG || $i_Type == CONFIRM_DIALOG} + {elseif $i_Type == INFO_DIALOG || $i_Type == CONFIRM_DIALOG || $i_Type == OK_CANCEL_DIALOG} {t}Information{/t} {/if} {$s_Title} @@ -74,7 +74,7 @@
{if $i_Type == ERROR_DIALOG || $i_Type == WARNING_DIALOG || $i_Type == INFO_DIALOG} - {elseif $i_Type == CONFIRM_DIALOG} + {elseif $i_Type == CONFIRM_DIALOG || $i_Type == OK_CANCEL_DIALOG} {/if} @@ -100,7 +100,7 @@ {t}Error{/t} {elseif $i_Type == WARNING_DIALOG} {t}Warning{/t} - {elseif $i_Type == INFO_DIALOG || $i_Type == CONFIRM_DIALOG} + {elseif $i_Type == INFO_DIALOG || $i_Type == CONFIRM_DIALOG || $i_Type == OK_CANCEL_DIALOG} {t}Information{/t} {/if} {$s_Title} @@ -132,6 +132,9 @@ {elseif $i_Type == CONFIRM_DIALOG} + {elseif $i_Type == OK_CANCEL_DIALOG} + + {/if} diff --git a/gosa-core/include/class_msg_dialog.inc b/gosa-core/include/class_msg_dialog.inc index 1ba29747e..e6de1acf1 100644 --- a/gosa-core/include/class_msg_dialog.inc +++ b/gosa-core/include/class_msg_dialog.inc @@ -24,7 +24,8 @@ define("INFO_DIALOG" , 10001); define("WARNING_DIALOG" , 10002); define("ERROR_DIALOG" , 10003); define("CONFIRM_DIALOG" , 10004); -define("FATAL_ERROR_DIALOG" , 10005); +define("OK_CANCEL_DIALOG" , 10005); +define("FATAL_ERROR_DIALOG" , 10006); class msg_dialog { @@ -40,7 +41,7 @@ class msg_dialog if(empty($s_message)) return; - if(!in_array($i_type,array(INFO_DIALOG,WARNING_DIALOG,ERROR_DIALOG,CONFIRM_DIALOG,FATAL_ERROR_DIALOG))){ + if(!in_array($i_type,array(INFO_DIALOG,WARNING_DIALOG,ERROR_DIALOG,CONFIRM_DIALOG,FATAL_ERROR_DIALOG,OK_CANCEL_DIALOG))){ trigger_error("Invalid msg_dialog type."); $i_type = INFO_DIALOG; } -- 2.30.2