From 477ca755e6702cf61e2bfcccf89cd1b756a94de6 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 17 Jan 2008 16:31:57 +0000 Subject: [PATCH] Updated gofax service git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8476 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../services/gofax/class_goFaxServer.inc | 103 ++++++++++++++++++ .../systems/services/gofax/goFaxServer.tpl | 27 +++++ 2 files changed, 130 insertions(+) create mode 100644 gosa-plugins/gofax/admin/systems/services/gofax/class_goFaxServer.inc create mode 100644 gosa-plugins/gofax/admin/systems/services/gofax/goFaxServer.tpl diff --git a/gosa-plugins/gofax/admin/systems/services/gofax/class_goFaxServer.inc b/gosa-plugins/gofax/admin/systems/services/gofax/class_goFaxServer.inc new file mode 100644 index 000000000..1e5e04976 --- /dev/null +++ b/gosa-plugins/gofax/admin/systems/services/gofax/class_goFaxServer.inc @@ -0,0 +1,103 @@ + "Eins ist toll", "zwei" => "Zwei ist noch besser"); + + /* This plugin only writes its objectClass */ + var $objectclasses = array("goFaxServer"); + var $attributes = array("goFaxAdmin", "goFaxPassword"); + var $StatusFlag = "goFaxServerStatus"; + + /* This class can't be assigned twice so it conflicts with itsself */ + var $conflicts = array("goFaxServer"); + + var $DisplayName = ""; + var $dn = NULL; + var $acl; + + var $goFaxAdmin = ""; + var $goFaxPassword = ""; + var $goFaxServerStatus = ""; + var $cn = ""; + var $view_logged =FALSE; + + function goFaxServer(&$config,$dn) + { + goService::goService($config,$dn); + $this->DisplayName = _("FAX database"); + } + + + function execute() + { + $smarty = get_smarty(); + + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + new log("view","server/".get_class($this),$this->dn); + } + + /* Assign acls */ + $tmp = $this->plInfo(); + foreach($tmp['plProvidedAcls'] as $name => $translation ){ + $smarty->assign($name."ACL",$this->getacl($name)); + } + + foreach($this->attributes as $attr){ + $smarty->assign($attr,$this->$attr); + } + return($smarty->fetch(get_template_path("goFaxServer.tpl",TRUE,dirname(__FILE__)))); + } + + + function getListEntry() + { + $fields = goService::getListEntry(); + $fields['Message'] = _("FAX database configuration"); + $fields['AllowEdit'] = true; + return($fields); + } + + function check() + { + $message = plugin::check(); + if (empty($this->goFaxAdmin)){ + $message[]= _("The attribute user is empty or contains invalid characters."); + } + if (empty($this->goFaxPassword)){ + $message[]= _("The attribute password is empty or contains invalid characters."); + } + return($message); + } + + + function save_object() + { + if(isset($_POST['goFaxServerPosted'])){ + plugin::save_object(); + } + } + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array( + "plShortName" => _("Fax database"), + "plDescription" => _("Fax database")." ("._("Services").")", + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 99, + "plSection" => array("administration"), + "plCategory" => array("server"), + + "plProvidedAcls"=> array( + "goFaxAdmin" => _("Login name"), + "goFaxPassword" => _("Password")) + )); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-plugins/gofax/admin/systems/services/gofax/goFaxServer.tpl b/gosa-plugins/gofax/admin/systems/services/gofax/goFaxServer.tpl new file mode 100644 index 000000000..27560b3f3 --- /dev/null +++ b/gosa-plugins/gofax/admin/systems/services/gofax/goFaxServer.tpl @@ -0,0 +1,27 @@ +

{t}FAX database information{/t}

+ + + + + + + + + +
{t}FAX DB user{/t}{$must} +{render acl=$goFaxAdminACL} + +{/render} +
{t}Password{/t}{$must} +{render acl=$goFaxPasswordACL} + +{/render} +
+ +

 

+
+ +   + +
+ -- 2.30.2