summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2afee9)
raw | patch | inline | side by side (parent: c2afee9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 08:41:38 +0000 (08:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 08:41:38 +0000 (08:41 +0000) |
-Updated import dialog design
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12415 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12415 594d385d-05f5-0310-b6e9-bd551577e9d8
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 4b549d88e23009f2e81271529288ede17ce203aa..0b3338505931d32596e737930b50fd3c3ce8552b 100644 (file)
var $events = array();
var $csv_fields = array();
+ var $import_successful = FALSE; // Indicates that we have successfully imported everything.
public function __construct($config,&$parent)
{
}
}
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 e094be422ff0fd8cfe317ba64cc07c7204d14931..4f0aec35c4d8552ddcad0df2fd18e00a0db44347 100644 (file)
/* 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 adb841af602c15719d2a472889291645c8fd9201..30bddeaaccd7c010912429b4d05d0ae25b2d5b4b 100644 (file)
<input type='submit' name='import' value='{t}Upload{/t}'>
</td>
</tr>
- {if $count}
- <tr>
- <td>{t}Start import{/t}</td>
- <td>
- <input type='submit' name='start_import' value='{t}Import{/t}'>
- </td>
- </tr>
- {/if}
</table>
{if $count}
<br>
<p class='seperator'></p>
<div style='text-align:right;width:99%; padding-right:5px; padding-top:5px;'>
+ <input type='submit' name='start_import' value='{t}Import{/t}' >
<input type='submit' name='import_abort' value='{msgPool type=backButton}'>
</div>
<br>