diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc
index ff46610246200f0235b0ad4a79581a997e7cf9b4..22381c1b41ebc790c3788adee5d3fe10272c0ef4 100644 (file)
/* Definitions */
var $plHeadline= "FAX";
var $plDescription= "This does something";
+ var $plIcon = "plugins/gofax/images/plugin.png";
/* Department list shown in the divSelectList*/
var $departments;
/* Do we represent a valid account? */
if (!$this->is_account && $this->parent === NULL){
- $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
- _("This account has no fax extensions.")."</b>";
+ $display= "<img alt=\"\" src=\"images/small-error.png\" align=\"middle\"> <b>".
+ msgPool::noValidExtension(_("GOfax"))."</b>";
$display.= back_to_main();
return ($display);
}
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);
}
}
/* 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);
}
/* 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'])){
if(!isset($this->config->departments[trim($key)])){
$this->config->departments[trim($key)]="";
}
- $field1 = array("string" => "<img src='images/folder.png' alt='department'>","attach"=>"style='width:16px;text-align:center;'");
+ $field1 = array("string" => "<img src='images/lists/folder.png' alt='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));
}
$this->config->departments[trim($key)]="";
}
- $field1 = array("string" => "<img src='images/folder.png' alt='department'>","attach"=>"style='width:16px;text-align:center;'");
+ $field1 = array("string" => "<img src='images/lists/folder.png' alt='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));
}
/* 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
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"));
}
}
/* 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];
}
"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"))
));
}