From: hickert Date: Tue, 31 Aug 2010 13:19:31 +0000 (+0000) Subject: Added filterDialogs , not functional at all. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=325dd1daf6fe514b2f12f0bef2d244490e560fdc;p=gosa.git Added filterDialogs , not functional at all. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19507 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc new file mode 100644 index 000000000..e892e4544 --- /dev/null +++ b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc @@ -0,0 +1,32 @@ +filterRules = $rules; + + $this->filterListing= new sortableListing(); + $this->filterListing->setDeleteable(true); + $this->filterListing->setEditable(true); + $this->filterListing->setColspecs(array('*')); + $this->filterListing->setWidth("100%"); + $this->filterListing->setHeight("200px;"); + } + + function execute() + { + $smarty = get_smarty(); + + $smarty->assign('list', $this->filterListing->render()); + + return($smarty->fetch(get_template_path('filterEditor.tpl',TRUE,dirname(__FILE__)))); + } + +} + +?> diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc index 47ed4a19d..6f6d7b52e 100644 --- a/gosa-plugins/groupware/personal/groupware/class_groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_groupware.inc @@ -30,24 +30,25 @@ class groupware extends plugin ); var $enabledFeatures = array( - "quotaUsage" => FALSE, - "quotaSize" => FALSE, - "mailFilter" => FALSE, - "alternateAddresses" => FALSE, - "forwardingAddresses" => FALSE, - "vacationMessage" => FALSE, - "mailBoxWarnLimit" => FALSE, - "mailBoxSendSizelimit" => FALSE, - "alternateAddresses" => FALSE, - "mailBoxHardSizelimit" => FALSE, - "mailBoxAutomaticRemoval" => FALSE, - "localDeliveryOnly" => FALSE, - "dropOwnMails" => FALSE); + "quotaUsage" => TRUE, + "quotaSize" => TRUE, + "mailFilter" => TRUE, + "alternateAddresses" => TRUE, + "forwardingAddresses" => TRUE, + "vacationMessage" => TRUE, + "mailBoxWarnLimit" => TRUE, + "mailBoxSendSizelimit" => TRUE, + "mailBoxHardSizelimit" => TRUE, + "mailBoxAutomaticRemoval" => TRUE, + "localDeliveryOnly" => TRUE, + "dropOwnMails" => TRUE); var $flagAttrinutes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled", "mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails"); var $mailAddressSelectDialog = NULL; + var $filterEditor = NULL; + var $filterRules = array(); var $vacationTemplates = array(); var $mailAddress = ""; @@ -96,19 +97,6 @@ class groupware extends plugin function execute() { - $this->enabledFeatures = array( - "quotaUsage" => TRUE, - "quotaSize" => TRUE, - "mailFilter" => TRUE, - "alternateAddresses" => TRUE, - "forwardingAddresses" => TRUE, - "vacationMessage" => TRUE, - "mailBoxWarnLimit" => TRUE, - "mailBoxSendSizelimit" => TRUE, - "mailBoxHardSizelimit" => TRUE, - "mailBoxAutomaticRemoval" => TRUE, - "localDeliveryOnly" => TRUE, - "dropOwnMails" => TRUE); // Register plugin execution $display = plugin::execute(); @@ -119,6 +107,21 @@ class groupware extends plugin new log("view","users/".get_class($this),$this->dn); } + /**************** + Filter editor + ****************/ + + if(isset($_POST['filterEditor_cancel'])) $this->filterEditor = NULL; + if(isset($_POST['configureFilter'])){ + $this->filterEditor = new filterEditor($this->config, $this->filterRules); + } + $this->dialog = FALSE; + if($this->filterEditor instanceOf filterEditor){ + $this->filterEditor->save_object(); + $this->dialog = TRUE; + return($this->filterEditor->execute()); + } + /**************** Account status diff --git a/gosa-plugins/groupware/personal/groupware/filterEditor.tpl b/gosa-plugins/groupware/personal/groupware/filterEditor.tpl new file mode 100644 index 000000000..338e0f910 --- /dev/null +++ b/gosa-plugins/groupware/personal/groupware/filterEditor.tpl @@ -0,0 +1,9 @@ +

{t}Available filter rules {/t}

+ +{$list} + +
+
+ + +