private function attribute_child($candiate_id, $ID, $disable) { $source1 = ""; if (!empty($ID)) { $core = new PR_Api_Core_CandidateClass(); $client = PR_Session::getSession(PR_Session::SESSION_USER); $Child = $core->get_attribute_child($candiate_id, $ID); if (!empty($Child)) { foreach ($Child as $item) { $sub = $this->attribute_child($candiate_id, $item['ID'], $disable); $sel1 = "<div class='col-md-2'></div>"; $Track1 = ''; if (!empty($item['TemplateID'])) { $option = ""; foreach ($item['TemplateID'] as $itemInfo) { if ($itemInfo['Value'] == $item['Value']) { $selected11 = 'selected="selected"'; } else { $selected11 = ''; } $option .= "<option value='" . $itemInfo['Value'] . "' " . $selected11 . ">" . $itemInfo['Description'] . "</option>"; } $sel1 = " <select class='form-control attr-value' style='color:#5d629c' " . $disable . "> " . $option . "</select>"; } if ($item['TrackYearsOfExperience'] && $item['TrackLevelofInterest']) { $selected = ''; $option_exp = ''; for ($i = 1; $i < 6; $i++) { if ($i == $item['LevelofInterest']) { $selected = 'selected="selected"'; } else { $selected = ''; } $option_exp .= "<option value='" . $i . "' " . $selected . ">" . $i . "</option>"; } $Track1 = "<div class='col-md-2' style='padding-right:0; color:#706d67;line-height:34px'>Years of Experience </div>\n <div class='col-md-1' style='padding:0'><input type='text' style='color:#706d67' " . $disable . " class='form-control attr-YoE' value='" . $item['YearsofExperience'] . "'></div>\n <div class='col-md-2' style='text-align:right; color:#706d67;line-height:34px'>Level of Interest</div>\n <div class='col-md-1' style='padding:0'>\n <select class='form-control attr-LevelofInterest' " . $disable . " style='color:#706d67'>\n '.{$option_exp}.'\n </select>\n </div>"; } $source1 .= "<ul style='margin-top:10px' class='attr-attr'>\n <li>\n <div class='col-md-12' style='padding:0'>\n <div style='line-height:34px;padding:0;margin-bottom:10px' attr-id=" . $item['ID'] . " class='col-md-4 attrid'>" . $item['Attribute'] . "</div>\n <div class='col-md-2' style='padding:0; margin-bottom:10px'>\n " . $sel1 . "\n </div>\n " . $Track1 . "\n </div>\n </li>\n\n </ul>"; $source1 .= $sub; } } } return $source1; }