X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgofax%2Fgofax%2Ffaxaccount%2Fclass_gofaxAccount.inc;h=22381c1b41ebc790c3788adee5d3fe10272c0ef4;hb=e93750c3ba3ee6f886b73ef86314904645e9800d;hp=ff46610246200f0235b0ad4a79581a997e7cf9b4;hpb=362e2b9a81d3bde32512811ede7525ab017eead5;p=gosa.git diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc index ff4661024..22381c1b4 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc @@ -5,6 +5,7 @@ class gofaxAccount extends plugin /* Definitions */ var $plHeadline= "FAX"; var $plDescription= "This does something"; + var $plIcon = "plugins/gofax/images/plugin.png"; /* Department list shown in the divSelectList*/ var $departments; @@ -160,8 +161,8 @@ class gofaxAccount extends plugin /* Do we represent a valid account? */ if (!$this->is_account && $this->parent === NULL){ - $display= "\"\" ". - _("This account has no fax extensions.").""; + $display= "\"\" ". + msgPool::noValidExtension(_("GOfax")).""; $display.= back_to_main(); return ($display); } @@ -171,10 +172,10 @@ class gofaxAccount extends plugin if ($this->parent !== NULL){ if ($this->is_account){ $display= $this->show_disable_header(_("Remove fax account"), - _("This account has fax features enabled. You can disable them by clicking below.")); + msgPool::featuresEnabled(_("GOfax"))); } else { $display= $this->show_enable_header(_("Create fax account"), - _("This account has fax features disabled. You can enable them by clicking below.")); + msgPool::featuresDisabled(_("GOfax"))); return ($display); } } @@ -238,7 +239,7 @@ class gofaxAccount extends plugin /* Add number to blocklist (dialog) */ if (isset($_POST['add_blocklist_number']) && $_POST['block_number'] != ""){ if (!tests::is_phone_nr($_POST['block_number'])){ - msg_dialog::display(_("Error"), _("Phone number is not valid!"), ERROR_DIALOG); + msg_dialog::display(_("Error"), msgPool::invalid(_("Phone number")), ERROR_DIALOG); } else { array_push($this->current_blocklist, $_POST['block_number']); $this->current_blocklist= array_unique($this->current_blocklist); @@ -379,11 +380,11 @@ class gofaxAccount extends plugin } /* Show dialog */ - $smarty->assign("search_image", get_template_path('images/search.png')); - $smarty->assign("usearch_image", get_template_path('images/search_user.png')); - $smarty->assign("tree_image", get_template_path('images/tree.png')); + $smarty->assign("search_image", get_template_path('images/lists/search.png')); + $smarty->assign("usearch_image", get_template_path('images/lists/search-user.png')); + $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png')); $smarty->assign("infoimage", get_template_path('images/info.png')); - $smarty->assign("launchimage", get_template_path('images/small_filter.png')); + $smarty->assign("launchimage", get_template_path('images/lists/action.png')); $smarty->assign("departments", $this->config->idepartments); $smarty->assign("list", $list); if (isset($_POST['depselect'])){ @@ -471,7 +472,7 @@ class gofaxAccount extends plugin if(!isset($this->config->departments[trim($key)])){ $this->config->departments[trim($key)]=""; } - $field1 = array("string" => "department","attach"=>"style='width:16px;text-align:center;'"); + $field1 = array("string" => "department","attach"=>"style='width:16px;text-align:center;'"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val),"attach"=>" style='border:none'"); $divSel->AddEntry(array($field1,$field2)); } @@ -554,7 +555,7 @@ class gofaxAccount extends plugin $this->config->departments[trim($key)]=""; } - $field1 = array("string" => "department","attach"=>"style='width:16px;text-align:center;'"); + $field1 = array("string" => "department","attach"=>"style='width:16px;text-align:center;'"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val),"attach"=>" style='border:none'"); $divSel->AddEntry(array($field1,$field2)); } @@ -671,11 +672,11 @@ class gofaxAccount extends plugin /* must: facsimileTelephoneNumber */ if ($this->facsimileTelephoneNumber == ""){ - $message[]= _("Fax is empty!"); + $message[]= msgPool::required(_("Fax number")); } if (!tests::is_phone_nr($this->facsimileTelephoneNumber)){ - $message[]= _("Fax number is not valid!"); + $message[]= msgPool::invalid(_("Fax number"),$this->facsimileTelephoneNumber,"/[0-9]/"); } /* IF mail is specified (which is only the case if there's no mail account @@ -685,7 +686,7 @@ class gofaxAccount extends plugin if ($this->mail == ""){ $message[]= _("Mail delivery is requested without target address!"); } elseif (!tests::is_email($this->mail)){ - $message[]= _("Mail address is invalid!"); + $message[]= msgPool::invalid(_("Mail address"),"","",_("your-name@your-domain.com")); } } @@ -800,13 +801,17 @@ class gofaxAccount extends plugin /* Adapt from template, using 'dn' */ - function adapt_from_template($dn) + function adapt_from_template($dn, $skip= array()) { - plugin::adapt_from_template($dn); + plugin::adapt_from_template($dn, $skip); foreach (array("goFaxRBlocklist", "goFaxRBlockgroups", "goFaxSBlocklist", "goFaxSBlockgroups", "facsimileAlternateTelephoneNumber") as $val){ + if (in_array($val, $skip)){ + continue; + } + if (isset($this->attrs[$val])){ $this->$val= $this->attrs[$val]; } @@ -865,15 +870,15 @@ class gofaxAccount extends plugin "plOptions" => array(), "plProvidedAcls" => array( - "goFaxIsEnabled" => _("Enable/Disable fax"), - "goFaxRBlocklist" => _("Receive blocklist"), - "goFaxSBlocklist" => _("Send blocklist"), "facsimileTelephoneNumber" => _("Fax number"), // goFaxDeliveryMode + "goFaxLanguage" => _("Language"), + "goFaxFormat" => _("Delivery format"), "facsimileAlternateTelephoneNumber" => _("Alternate fax number"), // goFaxDeliveryMode + "goFaxIsEnabled" => _("Enable/Disable fax"), "faxtomail" => _("Deliver fax as mail"), "faxtoprinter" => _("Deliver fax to printer"), - "goFaxFormat" => _("Delivery format"), - "goFaxLanguage" => _("Language")) + "goFaxRBlocklist" => _("Receive blocklist"), + "goFaxSBlocklist" => _("Send blocklist")) )); }