summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97cf380)
raw | patch | inline | side by side (parent: 97cf380)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2005 06:36:02 +0000 (06:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2005 06:36:02 +0000 (06:36 +0000) |
Better check for undefined index goExportEntry in constructor
Buttons wasn't disabled / enabled correctly with the checkbox goShareServer
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1365 594d385d-05f5-0310-b6e9-bd551577e9d8
Buttons wasn't disabled / enabled correctly with the checkbox goShareServer
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1365 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servService.inc | patch | blob | history | |
plugins/admin/systems/main.inc | patch | blob | history | |
plugins/admin/systems/servservice.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc
index 850a9551550e61b9f2ae218bd37b010e3bdb3c7f..2ee9fc90b1c99d0822027d216ca59339839ef690 100644 (file)
var $goXdmcpIsEnabled = "";
var $goFontPath = "";
var $goNTPServer = "";
- var $goShareServer = "";
+ var $goShareServer = false;
var $goLdapServer = "";
var $goTerminalServer = "";
var $goSyslogServer = "";
$tmp =array();
$tmp2=array();
- unset($this->attrs['goExportEntry']['count']);
- if((isset($this->attrs['goExportEntry']))&&(isset($this->attrs['goExportEntry']))){
- foreach($this->attrs['goExportEntry'] as $entry){
- $tmp2= split("\|",$entry);
- $tmp[$tmp2[0]]= $entry;
+ if(isset($this->attrs['goExportEntry'])){
+ unset($this->attrs['goExportEntry']['count']);
+ if((isset($this->attrs['goExportEntry']))&&(isset($this->attrs['goExportEntry']))){
+ foreach($this->attrs['goExportEntry'] as $entry){
+ $tmp2= split("\|",$entry);
+ $tmp[$tmp2[0]]= $entry;
+ }
}
}
$this->goExportEntry = $tmp;
/* Always is account... */
$this->is_account= TRUE;
+
+ if(is_array($this->attrs['objectClass'])){
+ if(in_array("goShareServer",$this->attrs['objectClass'])){
+ $this->goShareServer = true;
+ }
+ }
}
function addToList($entry){
}
}
- if(!count($this->goExportEntry)){
+ if(!$this->goShareServer){
$smarty->assign("goShareServerState", " disabled ");
+ $smarty->assign("goExportEntryACL", " disabled ");
+ }else{
+ $smarty->assign("goShareServerState", " ");
+ $smarty->assign("goExportEntryACL", " ");
}
/* Different handling for checkbox */
$this->goXdmcpIsEnabled= "false";
}
+ /* Save xdmcp is enabled flag */
+ if (isset($_POST['goShareServer'])){
+ $this->goShareServer = true;
+ } else {
+ $this->goShareServer = false;
+ }
}
}
index a0f26d1cc8dd7b890c305c2770b5e5a2d1a191c8..d4939a122f0c86a32cc8212815637dbe6df4e40a 100644 (file)
/* Show and save dialog */
$display.= $output;
+ $display.="<script language=\"JavaScript\" type=\"text/javascript\">
+ document.mainform.edit_finish.focus();
+ </script>";
$_SESSION['systems']= $systems;
}
index 9877289a30779965755ba477a51e05ba95875f5b..ee52e76dd0c612185700bfbfb8fb7e7d0c4f199d 100644 (file)
<tr>
<td style="vertical-align:top; border-right:1px solid #A0A0A0; padding-right:5px;" width="50%">
- <input type=checkbox name="goShareServer" value="1" {$goShareServer} {$goShareServer}
- onchange="changeState('goExportEntry');
+ <input type=checkbox name="goShareServer" value="1" {$goShareServer}
+ onchange="changeState('goExportEntry');
changeState('NewNfsEditId');
changeState('DelNfsEntId');
changeState('NewNfsAddId');">
</select>
<br>
<input type="submit" value="{t}Edit{/t}" name="NewNfsEdit" {$goShareServer} {$goExportEntryACL} id="NewNfsEditId">
- <input type="submit" value="{t}Add{/t}" name="NewNfsAdd" {$goShareServer} {$goExportEntryACL} id="NewNfsAddId">
+ <input type="submit" value="{t}Add{/t}" name="NewNfsAdd" {$goShareServer} {$goExportEntryACL} id="NewNfsAddId">
<input type="submit" value="{t}Delete{/t}" name="DelNfsEnt" {$goShareServer} {$goExportEntryACL} id="DelNfsEntId">
</td>
</tr>