From 8077cedd08cdca411732811a7055d4c03c1e2de1 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 11 Sep 2008 08:41:38 +0000 Subject: [PATCH] Update goto import -Updated import dialog design git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12415 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/goto/addons/goto/class_goto_import_file.inc | 2 ++ gosa-plugins/goto/addons/goto/class_gotomasses.inc | 8 +++++++- gosa-plugins/goto/addons/goto/goto_import_file.tpl | 9 +-------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gosa-plugins/goto/addons/goto/class_goto_import_file.inc b/gosa-plugins/goto/addons/goto/class_goto_import_file.inc index 4b549d88e..0b3338505 100644 --- a/gosa-plugins/goto/addons/goto/class_goto_import_file.inc +++ b/gosa-plugins/goto/addons/goto/class_goto_import_file.inc @@ -5,6 +5,7 @@ class goto_import_file extends plugin var $events = array(); var $csv_fields = array(); + var $import_successful = FALSE; // Indicates that we have successfully imported everything. public function __construct($config,&$parent) { @@ -128,6 +129,7 @@ class goto_import_file extends plugin } } msg_dialog::display(_("Import"),sprintf(_("Import complete: %s events successfully send, %s failed"),$success,$fail),INFO_DIALOG); + $this->import_successful = count($this->events) == 0; } } diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc index e094be422..4f0aec35c 100644 --- a/gosa-plugins/goto/addons/goto/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/goto/class_gotomasses.inc @@ -340,7 +340,13 @@ class gotomasses extends plugin /* Display dialogs if currently opened */ if(is_object($this->dialog)){ $this->dialog->save_object(); - return($this->dialog->execute()); + $display = $this->dialog->execute(); + + if($this->dialog instanceOf goto_import_file && $this->dialog->import_successful){ + $this->dialog = FALSE; + }else{ + return($display); + } } /************ diff --git a/gosa-plugins/goto/addons/goto/goto_import_file.tpl b/gosa-plugins/goto/addons/goto/goto_import_file.tpl index adb841af6..30bddeaac 100644 --- a/gosa-plugins/goto/addons/goto/goto_import_file.tpl +++ b/gosa-plugins/goto/addons/goto/goto_import_file.tpl @@ -25,14 +25,6 @@ - {if $count} - - {t}Start import{/t} - - - - - {/if} {if $count} @@ -89,6 +81,7 @@

+  

-- 2.30.2