diff --git a/module/programplan/control.php b/module/programplan/control.php index 7e62c6af51..cfca29d2f6 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -392,14 +392,18 @@ class programplan extends control * * @param int $stageID * @param string $attribute + * @param string $projectModel * @access public * @return int */ - public function ajaxGetAttribute($stageID, $attribute) + public function ajaxGetAttribute($stageID, $attribute, $projectModel = '') { $this->app->loadLang('stage'); $parentAttribute = $this->dao->select('attribute')->from(TABLE_EXECUTION)->where('id')->eq($stageID)->fetch('attribute'); + + if($projectModel == 'ipd') $this->lang->stage->typeList = $this->lang->stage->ipdTypeList; + if(empty($parentAttribute) or $parentAttribute == 'mix') { return print(html::select('attribute', $this->lang->stage->typeList, $attribute, "class='form-control chosen'")); diff --git a/module/programplan/js/edit.js b/module/programplan/js/edit.js index c2a243fa1f..a3a2348f34 100644 --- a/module/programplan/js/edit.js +++ b/module/programplan/js/edit.js @@ -1,6 +1,6 @@ function changeParentStage(stageID) { - $.get(createLink('programplan', 'ajaxGetAttribute', 'stageID=' + stageID + '&attribute=' + plan.attribute), function(attribute) + $.get(createLink('programplan', 'ajaxGetAttribute', 'stageID=' + stageID + '&attribute=' + plan.attribute + '&projectModel=' + projectModel), function(attribute) { $('#attributeType td:first').html(attribute); $("#attribute" + "_chosen").remove(); @@ -29,6 +29,7 @@ $(function() $('#submit').click(function() { + if(projectModel == 'ipd') return true; if(plan.parent != $('#parent').val() && $('#parent').val() != 0) { var result = true; diff --git a/module/programplan/view/edit.html.php b/module/programplan/view/edit.html.php index d8aadc0d23..0969b1ecf0 100644 --- a/module/programplan/view/edit.html.php +++ b/module/programplan/view/edit.html.php @@ -17,6 +17,7 @@ programplan->confirmChangeAttr);?> +model);?>