summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 729bbed)
raw | patch | inline | side by side (parent: 729bbed)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 24 Mar 2010 10:10:26 +0000 (10:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 24 Mar 2010 10:10:26 +0000 (10:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17045 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc | patch | blob | history | |
gosa-plugins/gofax/gofax/blocklists/generic.tpl | patch | blob | history |
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
index 6c6cd0057b740e913c732cac66273335b097bddc..5d6b5ddf7df1e78c93c7fc9096a3177ae1a14abd 100644 (file)
/* Handle interactions: add */
if (isset($_POST['add_number']) && $_POST['number'] != ""){
if (tests::is_phone_nr($_POST['number']) || preg_match ("/^[\/0-9 ()\^\.\$+*-]+$/",$_POST['number'])){
- $this->addNumber ($_POST['number']);
+ $acl = ($this->type == 1) ? "goFaxSBlocklist" : "goFaxRBlocklist";
+ if($this->acl_is_writeabel($acl)){
+ $this->addNumber ($_POST['number']);
+ }
} else {
msg_dialog::display(_("Error"), msgPool::invalid(_("Phone number")), ERROR_DIALOG);
}
/* Handle interactions: delete */
if (isset($_POST['delete_number']) && isset($_POST['numbers']) && count($_POST['numbers']) > 0){
- $this->delNumber ($_POST['numbers']);
+
+ $acl = ($this->type == 1) ? "goFaxSBlocklist" : "goFaxRBlocklist";
+ if($this->acl_is_writeabel($acl)){
+ $this->delNumber ($_POST['numbers']);
+ }
}
foreach($tmp['plProvidedAcls'] as $name => $translation){
$smarty->assign($name."ACL",$this->getacl($name));
}
+
+ if($this->type == 1){
+ $smarty->assign("goFaxBlocklistACL", $this->getacl('goFaxSBlocklist'));
+ }else{
+ $smarty->assign("goFaxBlocklistACL", $this->getacl('goFaxRBlocklist'));
+ }
+
$smarty->assign("goFaxBlocklist",$this->goFaxBlocklist);
$smarty->assign("cnACL",$this->getacl("cn",$this->readonly));
$smarty->assign("typeACL",$this->getacl("type",$this->readonly));
"cn" => _("Name"),
"description" => _("Description"),
"base" => _("Base"),
- "goFaxBlocklist" => _("Blocklist"),
+ "goFaxSBlocklist" => _("Send blocklist entries"),
+ "goFaxRBlocklist" => _("Receive blocklist entries"),
"type" => _("Blocklist type"))
));
}
diff --git a/gosa-plugins/gofax/gofax/blocklists/generic.tpl b/gosa-plugins/gofax/gofax/blocklists/generic.tpl
index 9357886e2b9cc8aa08ee649f46c0ac8b662c7444..218d96c8c0ca9fd2a627d10d641866a9d1819687 100644 (file)
<table summary="" style="width:100%">
<tr>
<td style="width:50%;">
+
<h3>{t}Blocked numbers{/t}</h3>
{render acl=$goFaxBlocklistACL}
<select style="width:100%; height:200px;" name="numbers[]" size=15 multiple>