diff --git a/module/project/control.php b/module/project/control.php index 28e3bfb457..b95b6d502e 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1090,6 +1090,12 @@ class project extends control if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name; if($product->branch) $linkedBranches[$product->branch] = $product->branch; } + $this->loadModel('productplan'); + $productPlans = array(0 => ''); + foreach($linkedProducts as $product) + { + $productPlans[$product->id] = $this->productplan->getPairs($product->id); + } $this->view->title = $title; $this->view->position = $position; @@ -1102,6 +1108,7 @@ class project extends control $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->allProducts = $allProducts; $this->view->linkedProducts = $linkedProducts; + $this->view->productPlans = $productPlans; $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches); $this->display(); diff --git a/module/project/js/common.js b/module/project/js/common.js index e0d57f4d37..db6009f509 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -177,7 +177,7 @@ function loadPlans(product, branchID) { if(typeof(planID) == 'undefined') planID = 0; planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID; - $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + (config.currentMethod == 'create' ? 'unexpired' : '')), function(data) + $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data) { if(data) { diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index d2d71311ac..3fbf7b4483 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -133,6 +133,17 @@ + global->flow == 'onlyTask') echo "class='hidden'";?>> + project->linkPlan;?> + +
+ + id, array(0 => ''));?> +
id . "]", $plans, $product->plan, "class='form-control chosen'");?>
+ +
+ + project->desc;?> desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?>