Code

Updated ntp selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jun 2006 10:25:17 +0000 (10:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jun 2006 10:25:17 +0000 (10:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3856 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/ogroups/class_termgroup.inc
plugins/admin/ogroups/termgroup.tpl

index fab217ef85a12c2bbd286dea9f3ecb4e82f5ffd1..3396f8d4aedc60ce7414c2266d1a562bba87b963 100644 (file)
@@ -212,7 +212,15 @@ class termgroup extends plugin
     $smarty->assign("modes", $this->modes);
     $smarty->assign("actions", array("wake" => _("Wake up"), "halt" => _("Switch off"), "reboot" => _("Reboot")));
     $smarty->assign("actionACL", chkacl($this->acl, 'action'));
-    $smarty->assign("gotoNtpServers",$this->gotoNtpServers); 
+
+    $tmp = array();
+    foreach($this->gotoNtpServers as $server){
+      if(!in_array($server,$this->gotoNtpServer)){
+        $tmp[$server] = $server;
+      }
+    }
+
+    $smarty->assign("gotoNtpServers",$tmp); 
     $smarty->assign("syslogservers", $this->config->data['SERVERS']['SYSLOG']); 
     $smarty->assign("gotoSyslogServer_select", $this->gotoSyslogServer); 
 
index 8d24d6c91bff33e2e1b3d3053d39a70eda58089a..009d9a51fdc08128c49de9a7d815d72fddeaf8e8 100644 (file)
@@ -21,9 +21,9 @@
                                   {html_options output=$gotoNtpServers values=$gotoNtpServers}
                                  </select>
                                        <input type="submit" name="addNtpServer" value="{t}Add{/t}"     id="addNtpServer" {$gotoNtpServerACL}
-                                        {if $inheritTimeServer} disabled {/if}>
+                                        {if ($inheritTimeServer) || (!$gotoNtpServers)} disabled {/if}>
                                        <input type="submit" name="delNtpServer" value="{t}Delete{/t}"  id="delNtpServer" {$gotoNtpServerACL}
-                                        {if $inheritTimeServer} disabled {/if}>
+                                        {if ($inheritTimeServer) || (!$gotoNtpServer_select)} disabled {/if} >
                                 </td>
                                </tr>
                           </table>