Commit a70463151fc7d8a61888f05dd0920c4c16443b98
1 parent
938b5b0c
(#2950) changed organisation listbox to display
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2721 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
10 additions
and
3 deletions
presentation/lookAndFeel/knowledgeTree/administration/unitmanagement/addUnitUI.inc
| ... | ... | @@ -36,7 +36,7 @@ function getAddPage() { |
| 36 | 36 | $sToRender .= "<td>Unit Name: </td><td><input size = \"40\" type=\"text\" name=\"fUnitName\"> </td>\n"; |
| 37 | 37 | $sToRender .= "</tr>\n"; |
| 38 | 38 | $sToRender .= "<tr>\n"; |
| 39 | - $sToRender .= "<td>Select an Organisation: </td><td>" . getOrgDisplay() ; | |
| 39 | + $sToRender .= "<td>Organisation: </td><td>" . getOrgDisplay() ; | |
| 40 | 40 | $sToRender .= "</tr>\n"; |
| 41 | 41 | $sToRender .= "<tr>\n"; |
| 42 | 42 | $sToRender .= "</tr>\n"; |
| ... | ... | @@ -134,7 +134,14 @@ function getAddPageToOrgFail() { |
| 134 | 134 | */ |
| 135 | 135 | function getOrgDisplay() { |
| 136 | 136 | global $default; |
| 137 | - $oPatternListBox = & new PatternListBox($default->organisations_table, "name", "id", "fOrgID"); | |
| 138 | - return $oPatternListBox->render(); | |
| 137 | + $aOrganisations = Organisation::getList(); | |
| 138 | + if ($aOrganisations && (count($aOrganisations) > 0)) { | |
| 139 | + $oOrganisation = $aOrganisations[0]; | |
| 140 | + return $oOrganisation->getName() . "<input type=\"hidden\" name=\"fOrgID\" value=\"" . $oOrganisation->getID() . "\"";; | |
| 141 | + } else { | |
| 142 | + return "No organisations" . "<input type=\"hidden\" name=\"fOrgID\" value=\"\"/>"; | |
| 143 | + } | |
| 144 | +// $oPatternListBox = & new PatternListBox($default->organisations_table, "name", "id", "fOrgID"); | |
| 145 | +// return $oPatternListBox->render(); | |
| 139 | 146 | } |
| 140 | 147 | ?> |
| 141 | 148 | \ No newline at end of file | ... | ... |