summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb17e7b)
raw | patch | inline | side by side (parent: eb17e7b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Mar 2006 08:55:58 +0000 (08:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Mar 2006 08:55:58 +0000 (08:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2816 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servDNSeditZone.inc | patch | blob | history | |
plugins/admin/systems/class_servDNSeditZoneEntries.inc | [new file with mode: 0644] | patch | blob |
plugins/admin/systems/servDNSeditZoneEntries.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc
index 82e40e3db773c04270e3d6590aaa5506be5204ef..e3770a5e402715afe7365d995e6967530e8d3724 100644 (file)
var $InitiallyReverseZone = "";
var $isNew = true;
+ var $dialog = false;
+
function servdnseditZone ($config, $dn= NULL,$recordtypes,$attrs = array())
{
plugin::plugin ($config, $dn);
$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
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+
+class servDNSeditZoneEntries extends plugin
+{
+ /* CLI vars */
+ var $cli_summary= "Manage server basic objects";
+ var $cli_description= "Some longer text\nfor help";
+ var $cli_parameters= array("eins" => "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
--- /dev/null
@@ -0,0 +1,14 @@
+sdfasdf
+
+<div style="text-algin:right;" align="right">
+ <p>
+ <input type="submit" name="SaveZoneEntryChanges" value="{t}Save{/t}">
+ <input type="submit" name="CancelZoneEntryChanges" value="{t}Cancel{/t}">
+ </p>
+</div>
+<script language="JavaScript" type="text/javascript">
+ <!-- // First input field on page
+ document.mainform.zoneName.focus();
+ -->
+</script>
+