diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php
index 948c25d4c7..4dc5e4c193 100644
--- a/module/zahost/view/view.html.php
+++ b/module/zahost/view/view.html.php
@@ -112,7 +112,7 @@
createLink('zahost', 'browseImage', "hostID=$zahost->id", '', true), $lang->zahost->image->downloadImage, '', "class='iframe'");?>
- createLink('zanode', 'create'), $lang->zahost->createZanode);?>
+ createLink('zanode', 'create', "hostID=$zahost->id"), $lang->zahost->createZanode);?>
zahost->init->initSuccessNotice, $imageLink, $createNode);?>
zahost->init->initFailNotice;?>
diff --git a/module/zanode/control.php b/module/zanode/control.php
index da6e028ffd..6b50f0dd41 100644
--- a/module/zanode/control.php
+++ b/module/zanode/control.php
@@ -55,13 +55,13 @@ class zanode extends control
}
/**
- * Create node page.
+ * Create node.
*
- * @param int $imageID
+ * @param int $hostID
* @access public
* @return void
*/
- public function create()
+ public function create($hostID = 0)
{
$this->loadModel('zahost');
if(!empty($_POST))
@@ -73,9 +73,7 @@ class zanode extends control
$this->view->title = $this->lang->zanode->create;
$this->view->hostPairs = array('' => '') + $this->loadModel('zahost')->getPairs('host');
- $this->view->notice = $this->lang->zanode->initNotice;
- $this->view->buttonName = $this->lang->zanode->initButton;
- $this->view->closeLink = $this->createLink('zanode', 'browse');
+ $this->view->hostID = $hostID;
return $this->display();
}
diff --git a/module/zanode/js/common.js b/module/zanode/js/common.js
index 471e22070d..a9b33c5f1c 100644
--- a/module/zanode/js/common.js
+++ b/module/zanode/js/common.js
@@ -18,6 +18,7 @@ $(function()
}
});
+ if(hostID) $('#parent').change();
$(document).on("change", '#image', function()
{
var image = $('#image').val();
diff --git a/module/zanode/view/create.html.php b/module/zanode/view/create.html.php
index 65d7386b63..64f706abb5 100644
--- a/module/zanode/view/create.html.php
+++ b/module/zanode/view/create.html.php
@@ -12,6 +12,7 @@
?>
getModuleRoot() . 'common/view/kindeditor.html.php';?>
+