Commit e5d8ae82090669da526b01b2eaa9e743335247d4

Authored by michael
1 parent 41799ffd

changed to prefill with default values if they are not retrieved from the database


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1683 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/systemsettings/systemSettingsUI.inc
@@ -66,8 +66,12 @@ function getPage() { @@ -66,8 +66,12 @@ function getPage() {
66 $sToRender .= "<tr>\n"; 66 $sToRender .= "<tr>\n";
67 $sToRender .= "</tr>\n"; 67 $sToRender .= "</tr>\n";
68 for($i = 0; $i < count($aNames); $i++) { 68 for($i = 0; $i < count($aNames); $i++) {
69 -  
70 - $sToRender .= "<td>". ($i+1) .".</td><td>" .$aRowNames[$i] ." </td><td><input size = \"40\" type=\"text\" name=\"". $aNames[$i] ."\" value =\"". $oSystem->get(substr($aNames[$i],1)) ."\"></td>\n"; 69 + if ($oSystem->initialised()) {
  70 + $sToRender .= "<td>". ($i+1) .".</td><td>" .$aRowNames[$i] ." </td><td><input size = \"40\" type=\"text\" name=\"". $aNames[$i] ."\" value =\"". $oSystem->get(substr($aNames[$i],1)) ."\"></td>\n";
  71 + } else {
  72 + $sSetting = substr($aNames[$i],1);
  73 + $sToRender .= "<td>". ($i+1) .".</td><td>" .$aRowNames[$i] ." </td><td><input size = \"40\" type=\"text\" name=\"". $aNames[$i] ."\" value =\"". $default->$sSetting ."\"></td>\n";
  74 + }
71 $sToRender .= "</tr>\n"; 75 $sToRender .= "</tr>\n";
72 76
73 } 77 }