
Originally Posted by
malcolmh
I am not sure how to do this request, but your proposed solution is not upgrade safe I think
Actually it is not an upgrade safe approach.
According the Address Field template class:
PHP Code:
function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
$this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
global $app_strings;
if(!isset($displayParams['key'])) {
$GLOBALS['log']->debug($app_strings['ERR_ADDRESS_KEY_NOT_SPECIFIED']);
$this->ss->trigger_error($app_strings['ERR_ADDRESS_KEY_NOT_SPECIFIED']);
return;
}
//Allow for overrides. You can specify a Smarty template file location in the language file.
if(isset($app_strings['SMARTY_ADDRESS_EDITVIEW'])) {
$tplCode = $app_strings['SMARTY_ADDRESS_EDITVIEW'];
return $this->fetch($tplCode);
}
global $current_language;
if(isset($current_language) && file_exists('include/SugarFields/Fields/Address/' . $current_language . '.EditView.tpl')) {
return $this->fetch('include/SugarFields/Fields/Address/' . $current_language . '.EditView.tpl');
} else {
return $this->fetch('include/SugarFields/Fields/Address/EditView.tpl');
} //if-else
}
If you create the file <$current_language>.EditView.tpl this one will be loaded instead of the default one.
Cheers
Bookmarks