summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 707f044)
raw | patch | inline | side by side (parent: 707f044)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 06:13:14 +0000 (06:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 06:13:14 +0000 (06:13 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19928 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Config/failed.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc
index 8985cb935a44148f92a6ba7097f4fceae6af7c05..0455eac7cb028c571cc7ebf3ff07353fab50519b 100644 (file)
private $rpcError = FALSE;
private $initFailed = FALSE;
+ private $errorMessage = "";
// Some plugin related memebers which are not member of
// the management class. See class plugin.
// Populate install methods on success.
$res = $rpc->getSupportedInstallMethods();
- if(!$rpc->success() || TRUE){
+ if(!$rpc->success()){
$this->rpcError = TRUE;
+ $this->errorMessage = $rpc->get_error();;
return;
}
$this->allItemConfigurations = $res;
if(!count($this->allItemConfigurations)){
- msg_dialog::display(_("Setup"), _("No selectable install methods returned!", ERROR_DIALOG));
+ $this->errorMessage = _("No selectable install methods returned!");
+ msg_dialog::display(_("Setup"), $this->errorMessage , ERROR_DIALOG);
$this->initFailed = TRUE;
return;
}
}
}
if(!$root){
- echo 'No root found!';
- $this->rebuildListing();
- $this->is_account = FALSE;
+ $this->errorMessage = _("No valid install methods returned, missing root object!");
+ msg_dialog::display(_("Setup"), $this->errorMessage , ERROR_DIALOG);
+ $this->initFailed = TRUE;
return;
}
*/
function renderList()
{
-
- echo "<h3>Hier weiter machen, was passiert wenn init oder rpc fehlschlägt.</h3>";
-
// In case of an error abort here.
if($this->rpcError){
$smarty = get_smarty();
$smarty->assign('initFailed', $this->initFailed);
$smarty->assign('rpcError', $this->rpcError);
+ $smarty->assign('error', $this->errorMessage);
return($smarty->fetch(get_template_path('goto/Config/failed.tpl', TRUE)));
}
*/
function save_object()
{
+ if(isset($_POST['retryInit'])){
+ $this->init();
+ return;
+ }
+
// Do nothing else in case of an error
if($this->rpcError || $this->initFailed) return;
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/failed.tpl b/gosa-plugins/goto/admin/systems/goto/Config/failed.tpl
--- /dev/null
@@ -0,0 +1,9 @@
+{if $rpcError}
+ <h3>{t}Error{/t}</h3>
+ {msgPool type=rpcError p1=$error}
+ <button name='retryInit'>{t}Retry{/t}</button>
+{elseif $initFailed}
+ <h3>{t}Communication failed{/t}</h3>
+ {msgPool type=rpcError p1=$error}
+ <button name='retryInit'>{t}Retry{/t}</button>
+{/if}