diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSubnet.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSubnet.inc
index 04b9ceb8035af21bc79d3d41ac956dc1972cef9a..c0bf218d1e8fd11f1dc219baaf9e1dc37de1a44f 100644 (file)
/* attribute list for save action */
var $objectclasses= array('top', 'dhcpSubnet', 'dhcpOptions');
- function dhcpSubnet($attrs)
+ function dhcpSubnet($parent,$attrs)
{
- dhcpPlugin::dhcpPlugin($attrs);
+ dhcpPlugin::dhcpPlugin($parent,$attrs);
if (!$this->new){
/* Load attributes */
$smarty->assign("cn", $this->cn);
$smarty->assign("dhcp_netmask", $this->dhcpNetMask);
+ /* Assign ACLs */
+ $smarty->assign("acl",$this->parent->getacl(""));
+
/* Prepare range */
if ($this->use_range){
$smarty->assign("use_range", "checked");
$smarty->assign("range_stop", $this->range_stop);
/* Show main page */
- $display= $smarty->fetch(get_template_path('dhcp_subnet.tpl', TRUE)).$this->network->execute();
+ $display= $smarty->fetch(get_template_path('dhcp_subnet.tpl', TRUE, dirname(__FILE__))).$this->network->execute();
/* Merge arrays for advanced view */
$this->fix_options();
}
/* Add footer */
- $display.= "<div style='width:100%;text-align:right;margin-top:5px;'><input type=submit name='save_dhcp' value='".msgPool::saveButton()."'>".
- " <input type=submit name='cancel_dhcp' value='".msgPool::cancelButton()."'></div>";
+ $display.= "<div style='width:100%;text-align:right;margin-top:5px;'>";
+ if(preg_match("/w/",$this->parent->getacl(""))){
+ $display.= "<input type=submit name='save_dhcp' value='".msgPool::saveButton()."'> ";
+ }
+ $display.= "<input type=submit name='cancel_dhcp' value='".msgPool::cancelButton()."'>";
+ $display.= "</div>";
+
/* Show main page */
return $display;