From: hickert Date: Tue, 7 Mar 2006 08:55:58 +0000 (+0000) Subject: added Zone edit dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e80e67b6a327a73ee7eed941e401936341f729f6;p=gosa.git added Zone edit dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2816 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc index 82e40e3db..e3770a5e4 100644 --- a/plugins/admin/systems/class_servDNSeditZone.inc +++ b/plugins/admin/systems/class_servDNSeditZone.inc @@ -36,6 +36,8 @@ class servdnseditZone extends plugin var $InitiallyReverseZone = ""; var $isNew = true; + var $dialog = false; + function servdnseditZone ($config, $dn= NULL,$recordtypes,$attrs = array()) { plugin::plugin ($config, $dn); @@ -163,6 +165,40 @@ class servdnseditZone extends plugin $display= ""; + /* Open Zone Entry Edit Dialog + */ + if(isset($_POST['EditZoneEntries'])){ + $this->dialog= new servDNSeditZoneEntries($this->config,$this->dn); + } + + /* Save Zone Entry Edit Dialog + */ + if(isset($_POST['SaveZoneEntryChanges'])){ + $this->dialog->save_object(); + if(count($this->dialog->check())){ + $msgs = $this->dialog->check(); + foreach($msgs as $msg){ + print_red($msg); + } + }else{ + $this->dialog->save(); + $this->dialog = false; + } + } + + /* Cancel Zone Entrie Edit Dialog + */ + if(isset($_POST['CancelZoneEntryChanges'])){ + $this->dialog = false; + } + + /* Display any type of open dialogs + */ + if($this->dialog){ + $this->dialog->save_object(); + return($this->dialog->execute()); + } + $once =true; foreach($_POST as $name => $value){ if((preg_match("/^MXup_/",$name)) && ($once)){ diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc new file mode 100644 index 000000000..d3b503139 --- /dev/null +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -0,0 +1,53 @@ + "Eins ist toll", "zwei" => "Zwei ist noch besser"); + + /* attribute list for save action */ + var $ignore_account= TRUE; + var $attributes= array(); + var $objectclasses= array("whatever"); + + function servDNSeditZoneEntries ($config, $dn= NULL) + { + plugin::plugin ($config, $dn); + } + + function execute() + { + plugin::execute(); + + /* Fill templating stuff */ + $smarty= get_smarty(); + $display= ""; + $display.= $smarty->fetch(get_template_path('servDNSeditZoneEntries.tpl', TRUE)); + return($display); + } + + function remove_from_parent() + { + } + + function save_object() + { + plugin::save_object(); + } + + function check() + { + $message= array(); + return ($message); + } + + function save() + { + plugin::save(); + } +} + +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/plugins/admin/systems/servDNSeditZoneEntries.tpl b/plugins/admin/systems/servDNSeditZoneEntries.tpl new file mode 100644 index 000000000..5cc51d728 --- /dev/null +++ b/plugins/admin/systems/servDNSeditZoneEntries.tpl @@ -0,0 +1,14 @@ +sdfasdf + +
+

+ + +

+
+ +