@@ -91,7 +92,15 @@ js::set('isStepsTemplate', $isStepsTemplate); - + +
+
+ +
+
+ +
+
diff --git a/module/product/control.php b/module/product/control.php index c9f293d88f..d123044b39 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -837,6 +837,23 @@ class product extends control $this->display(); } + /** + * AJAX: get projects of a product in html select. + * + * @param int $productID + * @param int $branch + * @param int $projectID + * @access public + * @return void + */ + public function ajaxGetProjects($productID, $branch = 0, $projectID = 0) + { + $projects = $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : $branch); + if($this->app->getViewType() == 'json') die(json_encode($peojects)); + + die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID})'")); + } + /** * AJAX: get executions of a product in html select. *