From 9ba78cfd69c59232a0ce1e31c3ab44be4368253d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 9 Oct 2014 12:03:40 +0000 Subject: [PATCH] use implicit nameing after type for custom templates "addressbook.edit.$type" like in InfoLog --- addressbook/inc/class.addressbook_ui.inc.php | 7 ++----- addressbook/lang/egw_en.lang | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 625c2802ba..9aecc49323 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2144,12 +2144,9 @@ window.egw_LAB.wait(function() { if ($content['private']) $content['owner'] .= 'p'; - //$GLOBALS['egw_info']['flags']['include_xajax'] = true; - - if (!$this->tmpl->read($this->content_types[$content['tid']]['options']['template'] ? $this->content_types[$content['tid']]['options']['template'] : 'addressbook.edit')) + // for custom types, check if we have a custom edit template named "addressbook.edit.$type", $type is the name + if (in_array($content['tid'], array('n',self::DELETED_TYPE)) || !$this->tmpl->read('addressbook.edit.'.$this->content_types[$content['tid']]['name'])) { - $content['msg'] = lang('WARNING: Template "%1" not found, using default template instead.', $this->content_types[$content['tid']]['options']['template'])."\n"; - $content['msg'] .= lang('Please update the templatename in your customfields section!'); $this->tmpl->read('addressbook.edit'); } diff --git a/addressbook/lang/egw_en.lang b/addressbook/lang/egw_en.lang index 0efeecaf35..c5c01e7b95 100644 --- a/addressbook/lang/egw_en.lang +++ b/addressbook/lang/egw_en.lang @@ -368,7 +368,6 @@ phone numbers common en Phone numbers photo addressbook en Photo please enter a name for that field ! addressbook en Enter a name to that field! please select only one category addressbook en Select only one category -please update the templatename in your customfields section! addressbook en Update the template name in custom fields section! postal common en Postal pref addressbook en Pref preferred email address to use in distribution lists addressbook en Preferred email address @@ -484,7 +483,6 @@ verification addressbook en Verification view linked infolog entries addressbook en View linked InfoLog entries warning!! ldap is valid only if you are not using contacts for accounts storage! admin en WARNING!! LDAP is valid only if you are NOT using contacts for accounts storage! warning: all contacts found will be deleted! addressbook en WARNING: All contacts found will be deleted! -warning: template "%1" not found, using default template instead. addressbook en WARNING: Template "%1" not found, using default template instead. weekday addressbook en Weekday what should links to the addressbook display in other applications. empty values will be left out. you need to log in anew, if you change this setting! addressbook en Address book links displayed in other applications. Empty values will be left out. You need to log in anew, if you change this setting! when viewing a contact, show linked entries from the selected application addressbook en When viewing a contact, show linked entries from the selected application