summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0509fb)
raw | patch | inline | side by side (parent: c0509fb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Sep 2007 07:43:24 +0000 (07:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Sep 2007 07:43:24 +0000 (07:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7276 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servDHCP.inc | patch | blob | history | |
plugins/admin/systems/servdhcp.tpl | patch | blob | history |
index 98fc75bc69cc2f80bee8412689965de5ea13d933..2392bb12fd5481823bdd31b8968add3c99a5ebeb 100644 (file)
var $dhcp_server_list = array("ENTRIES"=> array(),"FOR_LIST"=> array());
var $take_over_id = -1;
+ var $display_warning = TRUE;
function servdhcp ($config, $dn= NULL, $parent= NULL)
{
* and hide default dhcp output
*/
if($this->take_over_id != -1){
+
$this->dialog = FALSE;
$id = $this->take_over_id;
- $info = $this->get_dhcp_info_string($id);
$smarty->assign("dns_take_over",TRUE);
- $smarty->assign("info",$info);
- $warning = sprintf(_("You are going to take over the dhcp setup from server '%s'."),$this->dhcp_server_list['ENTRIES'][$id]['cn'][0]);
- $warning2 = _("The take over will be startet when you save this system. To abort this action, use the cancel button below.");
- $smarty->assign("warning",$warning);
- $smarty->assign("warning2",$warning2);
+ $warning = sprintf(_("You are going to migrate the DHCP setup from server '%s'."),
+ $this->dhcp_server_list['ENTRIES'][$id]['cn'][0]);
+ $warning.= " "._("The migration will be started when you save this system. To cancel this action, use the cancel button below.");
+
+ if($this->display_warning){
+ print_red($warning);
+ $this->display_warning = FALSE;
+ }
return($smarty->fetch(get_template_path('servdhcp.tpl', TRUE)));
}
}
+ if(isset($_GET['act']) && $_GET['act']=="edit" && isset($_GET['id'])){
+ $dn = base64_decode($_GET['id']);
+ if (isset($this->dhcpObjectCache[$dn])){
+ $section= $this->objectType($dn);
+ $this->current_object= $dn;
+ $this->dialog= new $section($this->dhcpObjectCache[$dn]);
+ }
+ }
+
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->is_account= !$this->is_account;
}
- function get_dhcp_info_string($id)
- {
- $ret = "";
- $ldap = $this->config->get_ldap_link();
- $ldap->cd("cn=dhcp,".$this->dhcp_server_list['ENTRIES'][$id]['dn']);
- $ldap->search("(|(objectClass=dhcpSharedNetwork)(objectClass=dhcpSubnet)(objectClass=dhcpPool)(objectClass=dhcpGroup)(objectClass=dhcpHost))",array("dn","cn"));
- $ldap->search("(objectClass=*)",array("dn","cn"));
- while($attrs = $ldap->fetch()){
- $ret .= $attrs['dn']."\n";
- }
- return($ret);
- }
-
-
function getListEntry()
{
$fields = goService::getListEntry();
index 5d79af70c1919c9ba176a8884fdd5e8bf04eea13..846af22ff968fe2ed5a262721a1c4c54dfb8ccb5 100644 (file)
<table summary="" width="100%">
<tr>
<td style="width:100%;vertical-align:top;">
- <h2>{t}DHCP take over initiated{/t}</h2>
- {$warning}
- {t}This includes 'all' DHCP subsections that are located within this server. Please double check if your really want to do this.{/t}
- <p>
- {$warning2}
- <br>
- <input type='submit' name='cancel_take_over' value='{t}Cancel{/t}'>
- </p>
- <p>
- {t}Following objects will be taken over{/t} :
- </p>
- <p>
- <pre>{$info}</pre>
- </p>
+ <h2>{t}DHCP take over will take place when saving this entry. Choose 'Cancel' to abort.{/t}</h2>
</td>
</tr>
</table>