Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make all Sugar templates customizable (Attempt 1):

Areas I skipped becuase it looks like the code is already taking care of the customization:

SugarFieldBase::findTemplate()
ViewSugarFieldCollection::display()
ViewSugarFieldCollection::findTemplate()
SugarFieldDownload::getDetailViewSmarty()
FormatterFactory::getInstance()
default_formatter::getDetailViewFormat()
default_formatter::fetchSmarty()
ConnectorUtils::CleanMetaDataFiles()
ConnectorUtils::updateMetaDataFiles()
Campains/WizardHome.php
EmailUI::getQuickCreateForm()?? - partial change.

Areas I skipped because I'm not sure what is going on (Mostly all cache stuff)

TemplateHandler::cleearCache()
TemplateHandler::buildTemplate()
TemplateHandler::checkTemplate()
TemplateHandler::displayTemplate()
TemplateHandler::deleteTemplate()
RepairAndClear::clearSmarty()
RepairAndClear::clearTpls()
ConfiguratorController::action_save_config()
ConfiguratorViewSugarpdfsettings::display()
TemplateRange::populateFromPost()
modules/import/Forms.php  function getControl()
?? ParseModifyListView::handleSave()
?? modules/upgrade_wizard/uw_utils.php  upgradeUWFile()
  • Loading branch information...
commit 5c5b4d45c8c2d011c08c72bf3c204902fbcdc1ae 1 parent 4811d33
@dkinzer authored
Showing with 880 additions and 397 deletions.
  1. +12 −4 ModuleInstall/PackageManager/PackageManagerDisplay.php
  2. +3 −1 include/Dashlets/Dashlet.php
  3. +2 −0  include/Dashlets/DashletGeneric.php
  4. +3 −0  include/Dashlets/DashletGenericChart.php
  5. +2 −2 include/DetailView/DetailView2.php
  6. +6 −4 include/EditView/EditView2.php
  7. +11 −6 include/EditView/SubpanelQuickCreate.php
  8. +12 −6 include/EditView/SubpanelQuickEdit.php
  9. +8 −4 include/ListView/ListViewFacade.php
  10. +2 −2 include/MVC/SugarApplication.php
  11. +3 −1 include/MVC/View/views/view.detail.php
  12. +3 −1 include/MVC/View/views/view.edit.php
  13. +3 −5 include/MVC/View/views/view.importvcard.php
  14. +6 −2 include/MVC/View/views/view.list.php
  15. +3 −1 include/MVC/View/views/view.modulelistmenu.php
  16. +4 −2 include/MVC/View/views/view.popup.php
  17. +12 −6 include/MVC/View/views/view.quickcreate.php
  18. +12 −6 include/MVC/View/views/view.quickedit.php
  19. +3 −1 include/MassUpdate.php
  20. +10 −4 include/MySugar/MySugar.php
  21. +9 −3 include/Popups/PopupSmarty.php
  22. +16 −4 include/SearchForm/SearchForm2.php
  23. +3 −1 include/Smarty/internals/core.display_debug_console.php
  24. +7 −3 include/SubPanel/SugarTab.php
  25. +7 −3 include/SugarCharts/Jit/Jit.php
  26. +4 −2 include/SugarCharts/Jit/JitReports.php
  27. +9 −3 include/SugarEmailAddress/SugarEmailAddress.php
  28. +3 −5 include/SugarFields/Fields/Datetime/SugarFieldDatetime.php
  29. +4 −6 include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php
  30. +4 −6 include/SugarFields/Fields/Int/SugarFieldInt.php
  31. +19 −1 include/Sugar_Smarty.php
  32. +3 −1 include/export_utils.php
  33. +3 −1 include/generic/Save2.php
  34. +3 −1 modules/ACLRoles/DetailUserRole.php
  35. +4 −2 modules/ACLRoles/DetailView.php
  36. +7 −3 modules/ACLRoles/EditRole.php
  37. +4 −2 modules/ACLRoles/EditView.php
  38. +3 −1 modules/Activities/views/view.modulelistmenu.php
  39. +3 −1 modules/Administration/Diagnostic.php
  40. +4 −2 modules/Administration/Locale.php
  41. +4 −2 modules/Administration/RepairXSS.php
  42. +6 −2 modules/Administration/SupportPortal.php
  43. +3 −1 modules/Administration/index.php
  44. +4 −2 modules/Administration/repairDatabase.php
  45. +3 −1 modules/Administration/repairSelectModule.php
  46. +3 −1 modules/Administration/views/view.configureajaxui.php
  47. +3 −1 modules/Administration/views/view.configuretabs.php
  48. +3 −1 modules/Administration/views/view.languages.php
  49. +3 −1 modules/Administration/views/view.themesettings.php
  50. +3 −1 modules/Calendar/TasksListView.php
  51. +4 −2 modules/Campaigns/Charts1.php
  52. +6 −2 modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php
  53. +4 −2 modules/Campaigns/RoiDetailView.php
  54. +4 −2 modules/Campaigns/Schedule.php
  55. +4 −2 modules/Campaigns/Subscriptions.php
  56. +4 −2 modules/Campaigns/TrackDetailView.php
  57. +3 −1 modules/Campaigns/views/view.modulelistmenu.php
  58. +4 −2 modules/Configurator/views/view.addfontresult.php
  59. +4 −2 modules/Configurator/views/view.addfontview.php
  60. +4 −2 modules/Configurator/views/view.adminwizard.php
  61. +3 −1 modules/Configurator/views/view.edit.php
  62. +4 −2 modules/Configurator/views/view.fontmanager.php
  63. +3 −1 modules/Configurator/views/view.sugarpdfsettings.php
  64. +3 −1 modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php
  65. +4 −2 modules/Connectors/controller.php
  66. +4 −2 modules/Connectors/views/view.connectorsettings.php
  67. +4 −2 modules/Connectors/views/view.displayproperties.php
  68. +4 −2 modules/Connectors/views/view.mappingproperties.php
  69. +4 −2 modules/Connectors/views/view.modifydisplay.php
  70. +4 −2 modules/Connectors/views/view.modifymapping.php
  71. +4 −2 modules/Connectors/views/view.modifyproperties.php
  72. +4 −2 modules/Connectors/views/view.modifysearch.php
  73. +4 −2 modules/Connectors/views/view.searchproperties.php
  74. +4 −2 modules/Connectors/views/view.sourceproperties.php
  75. +3 −1 modules/Contacts/ContactFormBase.php
  76. +4 −2 modules/Currencies/index.php
  77. +6 −2 modules/Documents/views/view.extdoc.php
  78. +25 −9 modules/DynamicFields/FieldViewer.php
  79. +3 −1 modules/DynamicFields/templates/Fields/Forms/date.php
  80. +3 −1 modules/DynamicFields/templates/Fields/Forms/datetimecombo.php
  81. +3 −1 modules/DynamicFields/templates/Fields/Forms/encrypt.php
  82. +3 −1 modules/DynamicFields/templates/Fields/Forms/enum2.php
  83. +4 −1 modules/DynamicFields/templates/Fields/Forms/html.php
  84. +3 −1 modules/DynamicFields/templates/Fields/Forms/iframe.php
  85. +3 −1 modules/DynamicFields/templates/Fields/Forms/image.php
  86. +3 −1 modules/DynamicFields/templates/Fields/Forms/parent.php
  87. +3 −1 modules/DynamicFields/templates/Fields/Forms/phone.php
  88. +3 −1 modules/DynamicFields/templates/Fields/Forms/relate.php
  89. +4 −1 modules/DynamicFields/templates/Fields/Forms/url.php
  90. +3 −1 modules/EmailMan/views/view.campaignconfig.php
  91. +3 −1 modules/EmailMan/views/view.config.php
  92. +30 −10 modules/Emails/EmailUI.php
  93. +3 −1 modules/Emails/views/view.modulelistmenu.php
  94. +4 −2 modules/Emails/views/view.quickcreate.php
  95. +6 −2 modules/Employees/views/view.list.php
  96. +4 −2 modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php
  97. +10 −4 modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.php
  98. +10 −4 modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php
  99. +6 −2 modules/Home/Dashlets/RSSDashlet/RSSDashlet.php
  100. +9 −3 modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php
  101. +9 −3 modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php
  102. +4 −2 modules/Home/TrainingPortal.php
  103. +11 −16 modules/Home/UnifiedSearchAdvanced.php
  104. +4 −2 modules/Home/index.php
  105. +4 −5 modules/Home/sitemap.php
  106. +3 −1 modules/Home/views/view.modulelistmenu.php
  107. +4 −2 modules/Import/controller.php
  108. +3 −1 modules/Import/views/ImportListView.php
  109. +4 −2 modules/Import/views/ImportView.php
  110. +9 −5 modules/Import/views/view.confirm.php
  111. +6 −2 modules/Import/views/view.dupcheck.php
  112. +3 −1 modules/Import/views/view.error.php
  113. +6 −2 modules/Import/views/view.extdupcheck.php
  114. +11 −4 modules/Import/views/view.last.php
  115. +6 −2 modules/Import/views/view.step1.php
  116. +6 −2 modules/Import/views/view.step2.php
  117. +6 −2 modules/Import/views/view.step3.php
  118. +6 −2 modules/Import/views/view.undo.php
  119. +4 −2 modules/InboundEmail/EditGroupFolder.php
  120. +10 −3 modules/Leads/views/view.convertlead.php
  121. +7 −14 modules/Meetings/JoinExternalMeeting.php
  122. +7 −2 modules/Meetings/views/view.listbytype.php
  123. +4 −2 modules/MergeRecords/Step2.php
  124. +16 −6 modules/ModuleBuilder/MB/MBModule.php
  125. +4 −2 modules/ModuleBuilder/views/view.dashlet.php
  126. +3 −1 modules/ModuleBuilder/views/view.displaydeploy.php
  127. +4 −2 modules/ModuleBuilder/views/view.dropdown.php
  128. +4 −2 modules/ModuleBuilder/views/view.dropdowns.php
  129. +4 −2 modules/ModuleBuilder/views/view.exportcustomizations.php
  130. +3 −1 modules/ModuleBuilder/views/view.history.php
  131. +4 −2 modules/ModuleBuilder/views/view.home.php
  132. +3 −1 modules/ModuleBuilder/views/view.labels.php
  133. +4 −2 modules/ModuleBuilder/views/view.layoutview.php
  134. +5 −2 modules/ModuleBuilder/views/view.listview.php
  135. +7 −3 modules/ModuleBuilder/views/view.main.php
  136. +4 −2 modules/ModuleBuilder/views/view.module.php
  137. +4 −2 modules/ModuleBuilder/views/view.modulefield.php
  138. +7 −3 modules/ModuleBuilder/views/view.modulefields.php
  139. +3 −1 modules/ModuleBuilder/views/view.modulelabels.php
  140. +7 −3 modules/ModuleBuilder/views/view.package.php
  141. +5 −2 modules/ModuleBuilder/views/view.popupview.php
  142. +4 −2 modules/ModuleBuilder/views/view.property.php
  143. +7 −3 modules/ModuleBuilder/views/view.relationship.php
  144. +7 −4 modules/ModuleBuilder/views/view.relationships.php
  145. +5 −3 modules/ModuleBuilder/views/view.resetmodule.php
  146. +4 −2 modules/ModuleBuilder/views/view.searchview.php
  147. +4 −2 modules/ModuleBuilder/views/view.wizard.php
  148. +5 −9 modules/OAuthTokens/views/view.authorize.php
  149. +6 −2 modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php
  150. +3 −1 modules/Project/views/view.list.php
  151. +9 −3 modules/ProjectTask/views/view.list.php
  152. +3 −1 modules/SavedSearch/ListView.php
  153. +7 −3 modules/SavedSearch/SavedSearch.php
  154. +3 −1 modules/Studio/DropDowns/EditView.php
  155. +3 −1 modules/Studio/TabGroups/EditViewTabs.php
  156. +3 −1 modules/Studio/wizards/RenameModules.php
  157. +3 −1 modules/Studio/wizards/StudioWizard.php
  158. +3 −1 modules/SugarFeed/AdminSettings.php
  159. +9 −3 modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php
  160. +3 −1 modules/SugarFeed/views/view.adminsettings.php
  161. +3 −1 modules/UpgradeWizard/index.php
  162. +4 −2 modules/UpgradeWizard/layouts.php
  163. +4 −2 modules/Users/ChangePassword.php
  164. +3 −1 modules/Users/Changenewpassword.php
  165. +3 −1 modules/Users/DetailView.php
  166. +3 −1 modules/Users/EditView.php
  167. +3 −1 modules/Users/Login.php
  168. +3 −1 modules/Users/SetTimezone.php
  169. +3 −1 modules/Users/views/view.list.php
  170. +3 −1 modules/Users/views/view.wizard.php
View
16 ModuleInstall/PackageManager/PackageManagerDisplay.php
@@ -123,7 +123,9 @@ function buildPackageDisplay($form1, $hidden_fields, $form_action, $types = arra
$descItemsInstalled = $mod_strings['LBL_UW_DESC_MODULES_INSTALLED'];
$ss->assign('INSTALLED_PACKAGES_HOLDER', PackageManagerDisplay::buildInstalledGrid($mod_strings, $types));
- $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageForm.tpl');
+ $PackageFormTpl = 'ModuleInstall/PackageManager/tpls/PackageForm.tpl';
+ $PackageFormTpl = Sugar_Smarty::getCustomTemplate($PackageFormTpl);
+ $str = $ss->fetch($PackageFormTpl);
return $str;
}
@@ -210,7 +212,9 @@ function buildPatchDisplay($form1, $hidden_fields, $form_action, $types = array(
$ss->assign('MODULE_SELECTOR', PackageManagerDisplay::buildGridOutput($tree, $mod_strings, $isAlive, $show_login));
$ss->assign('FORM_2_PLACE_HOLDER', $form2);
$ss->assign('scripts', PackageManagerDisplay::getDisplayScript(false, 'patch', $releases, $types, $isAlive));
- $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageForm.tpl');
+ $PackageFormTpl = 'ModuleInstall/PackageManager/tpls/PackageForm.tpl';
+ $PackageFormTpl = Sugar_Smarty::getCustomTemplate($PackageFormTpl);
+ $str = $ss->fetch($PackageFormTpl);
return $str;
}
@@ -437,7 +441,9 @@ function getDisplayScript($install = false, $type = 'module', $releases = null,
$ss->assign('ML_FILEGRIDINSTALLED_COLUMN',$filegridinstalled_column_ary);
//end
- $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl');
+ $PackageManagerScriptsTpl = 'ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl';
+ $PackageManagerScriptsTpl = Sugar_Smarty::getCustomTemplate($PackageManagerScriptsTpl);
+ $str = $ss->fetch($PackageManagerScriptsTpl);
return $str;
}
@@ -498,7 +504,9 @@ function buildLicenseOutput($file){
$ss->assign('MOD', $mod_strings);
$ss->assign('LICENSE_CONTENTS', $contents);
$ss->assign('FILE', $file);
- $str = $ss->fetch('ModuleInstall/PackageManagerLicense.tpl');
+ $PackageManagerLicenseTpl = 'ModuleInstall/PackageManagerLicense.tpl';
+ $PackageManagerLicenseTpl = Sugar_Smarty::getCustomTemplate($PackageManagerLicenseTpl);
+ $str = $ss->fetch($PackageManagerLicenseTpl);
$GLOBALS['log']->debug('LICENSE OUTPUT: '.$str);
return $str;
}
View
4 include/Dashlets/Dashlet.php
@@ -257,8 +257,10 @@ protected function processAutoRefresh($dashletOffset = 0)
}
$autoRefreshSS->assign('dashletRefreshInterval', $this->autoRefresh * 1000);
$tpl = 'include/Dashlets/DashletGenericAutoRefresh.tpl';
+ $tpl = Sugar_Smarty::getCustomTemplate($tpl);
if ( $_REQUEST['action'] == "DynamicAction" ) {
$tpl = 'include/Dashlets/DashletGenericAutoRefreshDynamic.tpl';
+ $tpl = Sugar_Smarty::getCustomTemplate($tpl);
}
return $autoRefreshSS->fetch($tpl);
@@ -380,4 +382,4 @@ protected function isAutoRefreshable()
( isset($GLOBALS['sugar_config']['dashlet_auto_refresh_min']) ?
$GLOBALS['sugar_config']['dashlet_auto_refresh_min'] != -1 : true );
}
-}
+}
View
2  include/Dashlets/DashletGeneric.php
@@ -255,6 +255,7 @@ function processDisplayOptions() {
*/
function displayOptions() {
$this->processDisplayOptions();
+ $this->configureTpl = Sugar_Smarty::getCustomTemplate($this->configureTpl);
return parent::displayOptions() . $this->configureSS->fetch($this->configureTpl);
}
@@ -411,6 +412,7 @@ function process($lvsParams = array()) {
if(!empty($this->displayTpl))
{
+ $this->displayTpl = Sugar_Smarty::getCustomTemplate($this->displayTpl);
//MFH BUG #14296
$where = '';
if(!empty($whereArray)){
View
3  include/Dashlets/DashletGenericChart.php
@@ -263,6 +263,7 @@ public function displayOptions()
$this->getConfigureSmartyInstance()->assign('autoRefreshSelect', $this->autoRefresh);
}
+ $this->_configureTpl = Sugar_Smarty::getCustomTemplate($this->_configureTpl);
return parent::displayOptions() . $this->getConfigureSmartyInstance()->fetch($this->_configureTpl);
}
@@ -347,8 +348,10 @@ protected function processAutoRefresh($dashletOffset = 0)
$autoRefreshSS->assign('dashletRefreshInterval', $this->autoRefresh * 1000);
$autoRefreshSS->assign('url', "predefined_chart");
$tpl = 'include/Dashlets/DashletGenericAutoRefresh.tpl';
+ $tpl = Sugar_Smarty::getCustomTemplate($tpl);
if ( $_REQUEST['action'] == "DynamicAction" ) {
$tpl = 'include/Dashlets/DashletGenericAutoRefreshDynamic.tpl';
+ $tpl = Sugar_Smarty::getCustomTemplate($tpl);
}
return $autoRefreshSS->fetch($tpl);
View
4 include/DetailView/DetailView2.php
@@ -63,7 +63,7 @@ function setup(
$this->th = new TemplateHandler();
$this->th->ss =& $this->ss;
$this->focus = $focus;
- $this->tpl = $tpl;
+ $this->tpl = Sugar_Smarty::getCustomTemplate($tpl);
$this->module = $module;
$this->metadataFile = $metadataFile;
if(isset($GLOBALS['sugar_config']['disable_vcr'])) {
@@ -101,4 +101,4 @@ function setup(
}
}
-?>
+?>
View
10 include/EditView/EditView2.php
@@ -86,7 +86,7 @@ function setup($module, $focus = null, $metadataFile = null, $tpl = 'include/Edi
{
$this->th = new TemplateHandler();
$this->th->ss =& $this->ss;
- $this->tpl = $tpl;
+ $this->tpl = Sugar_Smarty::getCustomTemplate($tpl);
$this->module = $module;
$this->focus = $focus;
@@ -575,8 +575,10 @@ function display($showTitle = true, $ajaxSave = false)
$this->th->ss->assign('useTabs', isset($this->defs['templateMeta']['useTabs']) ? $this->defs['templateMeta']['useTabs'] : false);
$this->th->ss->assign('maxColumns', isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2);
$this->th->ss->assign('module', $this->module);
- $this->th->ss->assign('headerTpl', isset($this->defs['templateMeta']['form']['headerTpl']) ? $this->defs['templateMeta']['form']['headerTpl'] : 'include/' . $this->view . '/header.tpl');
- $this->th->ss->assign('footerTpl', isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : 'include/' . $this->view . '/footer.tpl');
+ $headerTpl = isset($this->defs['templateMeta']['form']['headerTpl']) ? $this->defs['templateMeta']['form']['headerTpl'] : 'include/' . $this->view . '/header.tpl';
+ $footerTpl = isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : 'include/' . $this->view . '/footer.tpl';
+ $this->th->ss->assign('headerTpl', Sugar_Smarty::getCustomTemplate($headerTpl));
+ $this->th->ss->assign('footerTpl', Sugar_Smarty::getCustomTemplate($footerTpl));
$this->th->ss->assign('current_user', $current_user);
$this->th->ss->assign('bean', $this->focus);
$this->th->ss->assign('isAuditEnabled', $this->focus->is_AuditEnabled());
@@ -854,4 +856,4 @@ public function showTitle($showTitle = false)
return '';
}
-}
+}
View
17 include/EditView/SubpanelQuickCreate.php
@@ -74,10 +74,13 @@ function SubpanelQuickCreate($module, $view='QuickCreate', $proccessOverride = f
$this->ev->setup($module, $bean, $source);
unset($bean);
-
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl';
- $this->ev->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl';
- $this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM');
+ $headerTpl = 'include/EditView/header.tpl';
+ $headerTpl = Sugar_Smarty::getCustomTemplate($headerTpl);
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $headerTpl;
+ $footerTpl = 'include/EditView/footer.tpl';
+ $footerTpl = Sugar_Smarty::getCustomTemplate($footerTpl);
+ $this->ev->defs['templateMeta']['form']['footerTpl'] = $footerTpl;
+ $this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM');
//Load the parent view class if it exists. Check for custom file first
loadParentView('edit');
@@ -103,7 +106,9 @@ function SubpanelQuickCreate($module, $view='QuickCreate', $proccessOverride = f
//Check if we shold use the module's QuickCreate.tpl file
if($view->useModuleQuickCreateTemplate && file_exists('modules/'.$module.'/tpls/QuickCreate.tpl')) {
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'modules/'.$module.'/tpls/QuickCreate.tpl';
+ $QuickCreateTpl = 'modules/'.$module.'/tpls/QuickCreate.tpl';
+ $QuickCreateTpl = Sugar_Smarty::getCustomTemplate($QuickCreateTpl);
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $QuickCreateTpl;
}
$view->ev = & $this->ev;
@@ -133,4 +138,4 @@ function process($module){
echo $this->ev->display(false, true);
}
}
-?>
+?>
View
18 include/EditView/SubpanelQuickEdit.php
@@ -88,8 +88,12 @@ function SubpanelQuickEdit($module, $view='QuickEdit', $proccessOverride = false
$this->ev->setup($module, null, $source);
}
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl';
- $this->ev->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl';
+ $headerTpl = 'include/EditView/header.tpl';
+ $headerTpl = Sugar_Smarty::getCustomTemplate($headerTpl);
+ $footerTpl = 'include/EditView/footer.tpl';
+ $footerTpl = Sugar_Smarty::getCustomTemplate($footerTpl);
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $headerTpl;
+ $this->ev->defs['templateMeta']['form']['footerTpl'] = $footerTpl;
$this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM');
$this->ev->defs['templateMeta']['form']['hideAudit'] = true;
@@ -109,9 +113,11 @@ function SubpanelQuickEdit($module, $view='QuickEdit', $proccessOverride = false
$this->defaultProcess = false;
//Check if we shold use the module's QuickCreate.tpl file
- if($view->useModuleQuickCreateTemplate && file_exists('modules/'.$module.'/tpls/QuickCreate.tpl')) {
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'modules/'.$module.'/tpls/QuickCreate.tpl';
- }
+ $QuickCreateTpl = 'modules/'.$module.'/tpls/QuickCreate.tpl';
+ if($view->useModuleQuickCreateTemplate && file_exists($QuickCreateTpl)) {
+ $QuickCreateTpl = Sugar_Smarty::getCustomTemplate($QuickCreateTpl);
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $QuickCreateTpl;
+ }
$view->ev = & $this->ev;
$view->ss = & $this->ev->ss;
@@ -140,4 +146,4 @@ function process($module){
echo $this->ev->display(false, true);
}
}
-?>
+?>
View
12 include/ListView/ListViewFacade.php
@@ -83,10 +83,12 @@ function ListViewFacade($focus, $module, $type = 0){
function build(){
//we will assume that if the ListView.html file exists we will want to use that one
- if(file_exists('modules/'.$this->module.'/ListView.html')){
+ $ListViewHtml = 'modules/'.$this->module.'/ListView.html';
+ if(file_exists($ListViewHtml)){
$this->type = 1;
$this->lv = new ListView();
- $this->template = 'modules/'.$this->module.'/ListView.html';
+ $ListViewHtml = Sugar_Smarty::getCustomTemplate($ListViewHtml);
+ $this->template = $ListViewHtml;
}else{
$metadataFile = null;
$foundViewDefs = false;
@@ -130,13 +132,15 @@ function build(){
}
$this->lv->displayColumns = $displayColumns;
$this->type = 2;
- $this->template = 'include/ListView/ListViewGeneric.tpl';
+ $ListViewGenericTpl = 'include/ListView/ListViewGeneric.tpl';
+ $ListViewGenericTpl = Sugar_Smarty::getCustomTemplate($ListViewGenericTpl);
+ $this->template = $ListViewGenericTpl;
}
}
function setup($template = '', $where = '', $params = array(), $mod_strings = array(), $offset = 0, $limit = -1, $orderBy = '', $prefix = '', $filter_fields = array(), $id_field = 'id'){
if(!empty($template))
- $this->template = $template;
+ $this->template = Sugar_Smarty::getCustomTemplate($template);
$this->mod_strings = $mod_strings;
View
4 include/MVC/SugarApplication.php
@@ -532,7 +532,7 @@ protected function checkHTTPReferer($dieIfInvalid = true)
$ss->assign('host', $http_host[0]);
$ss->assign('action',$this->controller->action);
$ss->assign('whiteListString',$whiteListString);
- $ss->display('include/MVC/View/tpls/xsrf.tpl');
+ $ss->display($ss->getCustomTemplate('include/MVC/View/tpls/xsrf.tpl'));
sugar_cleanup(true);
}
return false;
@@ -551,7 +551,7 @@ protected function checkHTTPReferer($dieIfInvalid = true)
$ss->assign('host',$http_ref['host']);
$ss->assign('action',$this->controller->action);
$ss->assign('whiteListString',$whiteListString);
- $ss->display('include/MVC/View/tpls/xsrf.tpl');
+ $ss->display($ss->getCustomTemplate('include/MVC/View/tpls/xsrf.tpl'));
sugar_cleanup(true);
}
return false;
View
4 include/MVC/View/views/view.detail.php
@@ -72,7 +72,9 @@ public function preDisplay()
$metadataFile = $this->getMetaDataFile();
$this->dv = new DetailView2();
$this->dv->ss =& $this->ss;
- $this->dv->setup($this->module, $this->bean, $metadataFile, 'include/DetailView/DetailView.tpl');
+ $DetailViewTpl = 'include/DetailView/DetailView.tpl';
+ $DetailViewTpl = Sugar_Smarty::getCustomTemplate($DetailViewTpl);
+ $this->dv->setup($this->module, $this->bean, $metadataFile, $DetailViewTpl);
}
/**
View
4 include/MVC/View/views/view.edit.php
@@ -57,7 +57,9 @@ function preDisplay(){
$metadataFile = $this->getMetaDataFile();
$this->ev = new EditView();
$this->ev->ss =& $this->ss;
- $this->ev->setup($this->module, $this->bean, $metadataFile, 'include/EditView/EditView.tpl');
+ $EditViewTpl = 'include/EditView/EditView.tpl';
+ $EditViewTpl = Sugar_SugarView::getCustomTemplate($EditViewTpl);
+ $this->ev->setup($this->module, $this->bean, $metadataFile, $EditViewTpl);
}
View
8 include/MVC/View/views/view.importvcard.php
@@ -69,11 +69,9 @@ public function display()
$params[] = $app_strings['LBL_IMPORT_VCARD_BUTTON_LABEL'];
echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], $params, true);
-
- if ( file_exists('custom/include/MVC/View/tpls/Importvcard.tpl') )
- $this->ss->display('custom/include/MVC/View/tpls/Importvcard.tpl');
- else
- $this->ss->display('include/MVC/View/tpls/Importvcard.tpl');
+ $ImportvcardTpl = 'custom/include/MVC/View/tpls/Importvcard.tpl';
+ $ImportvcardTpl = Sugar_Smarty::getCustomTemplate($ImportvcardTpl);
+ $this->ss->display($ImportvcardTpl);
}
}
?>
View
8 include/MVC/View/views/view.list.php
@@ -169,7 +169,9 @@ function listViewProcess(){
return;
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
$this->lv->ss->assign("SEARCH",true);
- $this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
+ $ListViewGenericTpl = 'include/ListView/ListViewGeneric.tpl';
+ $ListViewGenericTpl = Sugar_Smarty::getCustomTemplate($ListViewGeneric);
+ $this->lv->setup($this->seed, $ListViewGenericTpl, $this->where, $this->params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo $this->lv->display();
}
@@ -240,7 +242,9 @@ function prepareSearchForm(){
$this->searchForm = new SearchForm($this->seed, $this->module, $this->action);
- $this->searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $this->listViewDefs);
+ $SearchFormGenericTpl = 'include/SearchForm/tpls/SearchFormGeneric.tpl';
+ $SearchFormGenericTpl = Sugar_Smarty::getCustomTemplate($SearchFormGenericTpl);
+ $this->searchForm->setup($searchdefs, $searchFields, $SearchFormGenericTpl, $view, $this->listViewDefs);
$this->searchForm->lv = $this->lv;
}
}
View
4 include/MVC/View/views/view.modulelistmenu.php
@@ -60,7 +60,9 @@ public function display()
}
$this->ss->assign('LAST_VIEWED',$history);
- $this->ss->display('include/MVC/View/tpls/modulelistmenu.tpl');
+ $modulelistmenuTpl = 'include/MVC/View/tpls/modulelistmenu.tpl';
+ $modulelistmenuTpl = Sugar_Smarty::getCustomTempla($modulelistmenuTpl);
+ $this->ss->display($modulelistmenuTpl);
}
}
?>
View
6 include/MVC/View/views/view.popup.php
@@ -153,7 +153,9 @@ function display(){
}
$popup->massUpdateData = $massUpdateData;
- $popup->setup('include/Popups/tpls/PopupGeneric.tpl');
+ $PopupGenericTpl = 'include/Popups/tpls/PopupGeneric.tpl';
+ $PopupGenericTpl = Sugar_Smarty::getCustomTemplate($PopupGenericTpl);
+ $popup->setup($PopupGenericTpl);
//We should at this point show the header and javascript even if to_pdf is true.
//The insert_popup_header javascript is incomplete and shouldn't be relied on.
@@ -180,4 +182,4 @@ function display(){
}
}
}
-?>
+?>
View
18 include/MVC/View/views/view.quickcreate.php
@@ -119,8 +119,12 @@ public function display()
//$_REQUEST['return_action'] = 'SubPanelViewer';
$this->ev->setup($module, null, $source);
$this->ev->showSectionPanelsTitles = false;
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl';
- $this->ev->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl';
+ $headerTpl = 'include/EditView/header.tpl';
+ $headerTpl = Sugar_Smarty::getCustomTemplate($headerTpl);
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $headerTpl;
+ $footerTpl = 'include/EditView/footer.tpl';
+ $footerTpl = Sugar_Smarty::getCustomTemplate($footerTpl);
+ $this->ev->defs['templateMeta']['form']['footerTpl'] = $footerTpl;
$this->ev->defs['templateMeta']['form']['buttons'] = array('DCMENUSAVE', 'DCMENUCANCEL', 'DCMENUFULLFORM');
$this->ev->defs['templateMeta']['form']['button_location'] = 'bottom';
$this->ev->defs['templateMeta']['form']['hidden'] = '<input type="hidden" name="is_ajax_call" value="1" />';
@@ -141,9 +145,11 @@ public function display()
$defaultProcess = false;
//Check if we shold use the module's QuickCreate.tpl file
- if($view->useModuleQuickCreateTemplate && file_exists('modules/'.$module.'/tpls/QuickCreate.tpl')) {
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'modules/'.$module.'/tpls/QuickCreate.tpl';
- }
+ $QuickCreateTpl = "modules/$module/QuickCreate.tpl";
+ if($view->useModuleQuickCreateTemplate && file_exists($QuickCreateTpl)) {
+ $QuickCreateTpl = Sugar_Smarty::getCustomTemplate($QuickCreateTpl);
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $QuickCreateTpl;
+ }
$view->ev = & $this->ev;
$view->ss = & $this->ev->ss;
@@ -167,4 +173,4 @@ public function display()
echo $this->ev->display(false, true);
}
}
-}
+}
View
18 include/MVC/View/views/view.quickedit.php
@@ -149,8 +149,12 @@ public function display()
//$_REQUEST['return_action'] = 'SubPanelViewer';
$this->ev->setup($module, $this->bean, $source);
$this->ev->showSectionPanelsTitles = false;
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl';
- $this->ev->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl';
+ $headerTpl = 'include/EditView/header.tpl';
+ $headerTpl = Sugar_Smarty::getCustomTemplate($headerTpl );
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $headerTpl;
+ $footerTpl = 'include/EditView/footer.tpl';
+ $footerTpl = Sugar_Smarty::getCustomTemplate($footerTpl );
+ $this->ev->defs['templateMeta']['form']['footerTpl'] = $footerTpl;
$this->ev->defs['templateMeta']['form']['buttons'] = array('DCMENUSAVE', 'DCMENUCANCEL', 'DCMENUFULLFORM');
$this->ev->defs['templateMeta']['form']['button_location'] = 'bottom';
$this->ev->defs['templateMeta']['form']['hidden'] = '<input type="hidden" name="is_ajax_call" value="1" />';
@@ -174,9 +178,11 @@ public function display()
$defaultProcess = false;
//Check if we should use the module's QuickCreate.tpl file
- if($view->useModuleQuickCreateTemplate && file_exists('modules/'.$module.'/tpls/QuickCreate.tpl')) {
- $this->ev->defs['templateMeta']['form']['headerTpl'] = 'modules/'.$module.'/tpls/QuickCreate.tpl';
- }
+ $QuickCreateTpl = "modules/$module/tpls/QuickCreate.tpl";
+ if($view->useModuleQuickCreateTemplate && file_exists($QuickCreateTpl)) {
+ $QuickCreateTpl = Sugar_Smarty::getCustomTemplate($QuickCreateTpl );
+ $this->ev->defs['templateMeta']['form']['headerTpl'] = $QuickCreateTpl;
+ }
$view->ev = & $this->ev;
$view->ss = & $this->ev->ss;
@@ -205,4 +211,4 @@ public function display()
echo json_encode(array('title'=> $this->bean->name, 'url'=>'index.php?module=' . $this->bean->module_dir . '&action=DetailView&record=' . $this->bean->id ,'html'=> $this->ev->display(false, true), 'eval'=>true));
}
}
-}
+}
View
4 include/MassUpdate.php
@@ -1227,7 +1227,9 @@ function generateSearchWhere($module, $query) {//this function is similar with f
}
$searchForm = new SearchForm($seed, $module);
- $searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl');
+ $SearchFormGenericTpl = 'include/SearchForm/tpls/SearchFormGeneric.tpl';
+ $SearchFormGenericTpl = Sugar_Smarty::getCustomTemplate($SearchFormGenericTpl);
+ $searchForm->setup($searchdefs, $searchFields, $SearchFormGenericTpl);
}
/* bug 31271: using false to not add all bean fields since some beans - like SavedReports
can have fields named 'module' etc. which may break the query */
View
14 include/MySugar/MySugar.php
@@ -255,7 +255,9 @@ function dashletsDialog(){
$sugar_smarty->assign('charts', $chartsList);
- $html = $sugar_smarty->fetch('include/MySugar/tpls/addDashletsDialog.tpl');
+ $addDashletsDialogTpl = 'include/MySugar/tpls/addDashletsDialog.tpl';
+ $addDashletsDialogTpl = Sugar_Smarty::getCustomTemplate($addDashletsDialogTpl);
+ $html = $sugar_smarty->fetch($addDashletsDialogTpl);
// Bug 34451 - Added hack to make the "Add Dashlet" dialog window not look weird in IE6.
$script = <<<EOJS
if (YAHOO.env.ua.ie > 5 && YAHOO.env.ua.ie < 7) {
@@ -310,7 +312,9 @@ function searchModuleToolsDashlets($searchStr, $category){
$sugar_smarty->assign('dashlets', $searchResult[$dashletIndex]);
- return $sugar_smarty->fetch('include/MySugar/tpls/dashletsSearchResults.tpl');
+ $dashletsSearchResultsTpl = 'include/MySugar/tpls/dashletsSearchResults.tpl';
+ $dashletsSearchResultsTpl = Sugar_Smarty::getCustomTemplate($dashletsSearchResultsTpl);
+ return $sugar_smarty->fetch($dashletsSearchResultsTpl);
}
function searchChartsDashlets($searchStr){
@@ -340,7 +344,9 @@ function searchChartsDashlets($searchStr){
$sugar_smarty->assign('searchString', $searchStr);
$sugar_smarty->assign('charts', $searchResult['Charts']);
- return $sugar_smarty->fetch('include/MySugar/tpls/chartDashletsSearchResults.tpl');
+ $chartDashletsSearchResultsTpl = 'include/MySugar/tpls/chartDashletsSearchResults.tpl';
+ $chartDashletsSearchResultsTpl = Sugar_Smarty::getCustomTemplate($chartDashletsSearchResultsTpl);
+ return $sugar_smarty->fetch($chartDashletsSearchResultsTpl);
}
function searchDashlets(){
@@ -417,4 +423,4 @@ function saveLayout(){
}
-?>
+?>
View
12 include/Popups/PopupSmarty.php
@@ -232,8 +232,12 @@ function display($end = true) {
$json = getJSONobj();
$this->th->ss->assign('jsLang', $jsLang);
$this->th->ss->assign('lang', substr($GLOBALS['current_language'], 0, 2));
- $this->th->ss->assign('headerTpl', 'include/Popups/tpls/header.tpl');
- $this->th->ss->assign('footerTpl', 'include/Popups/tpls/footer.tpl');
+ $headerTpl = 'include/Popups/tpls/header.tpl';
+ $headerTpl = Sugar_Smarty::getCustomTemplate($headerTpl);
+ $this->th->ss->assign('headerTpl', $headerTpl);
+ $footerTpl = 'include/Popups/tpls/footer.tpl';
+ $footerTpl = Sugar_Smarty::getCustomTemplate($footerTpl);
+ $this->th->ss->assign('footerTpl', $footerTpl);
$this->th->ss->assign('ASSOCIATED_JAVASCRIPT_DATA', 'var associated_javascript_data = '.$json->encode($associated_row_data). '; var is_show_fullname = '.$is_show_fullname.';');
$this->th->ss->assign('module', $this->seed->module_dir);
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
@@ -304,7 +308,9 @@ function setup($file) {
$this->searchdefs[$this->module]['templateMeta']['widths']['field'] = 30;
$this->searchForm->view = 'PopupSearchForm';
- $this->searchForm->setup($this->searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGenericAdvanced.tpl', 'advanced_search', $this->listviewdefs);
+ $SearchFormGenericAdvancedTpl = 'include/SearchForm/tpls/SearchFormGenericAdvanced.tpl';
+ $SearchFormGenericAdvancedTpl = Sugar_Smarty::getCustomTemplate($SearchFormGenericAdvancedTpl);
+ $this->searchForm->setup($this->searchdefs, $searchFields, $SearchFormGenericAdvancedTpl, 'advanced_search', $this->listviewdefs);
$lv = new ListViewSmarty();
$displayColumns = array();
View
20 include/SearchForm/SearchForm2.php
@@ -101,7 +101,7 @@ function SearchForm($seed, $module, $action = 'index'){
function setup($searchdefs, $searchFields = array(), $tpl, $displayView = 'basic_search', $listViewDefs = array()){
$this->searchdefs = $searchdefs[$this->module];
- $this->tpl = $tpl;
+ $this->tpl = $this->getSearchFormTemplateByPath($tpl);;
//used by advanced search
$this->listViewDefs = $listViewDefs;
$this->displayView = $displayView;
@@ -188,7 +188,7 @@ function display($header = true){
$this->tabs[$tabkey]['displayDiv']='';
//if this is advanced tab, use form with saved search sub form built in
if($viewName=='advanced'){
- $this->tpl = 'include/SearchForm/tpls/SearchFormGenericAdvanced.tpl';
+ $this->tpl = $this->getSearchFormTemplateByName('SearchFormGenericAdvanced');
if ($this->action =='ListView') {
$this->th->ss->assign('DISPLAY_SEARCH_HELP', true);
}
@@ -239,9 +239,9 @@ function display($header = true){
$return_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchForm_'.$this->parsedView, $this->tpl);
if($header){
$this->th->ss->assign('return_txt', $return_txt);
- $header_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormHeader', 'include/SearchForm/tpls/header.tpl');
+ $header_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormHeader', $this->getSearchFormTemplateByName('header'));
//pass in info to render the select dropdown below the form
- $footer_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormFooter', 'include/SearchForm/tpls/footer.tpl');
+ $footer_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormFooter', $this->getSearchFormTemplateByName('footer'));
$return_txt = $header_txt.$footer_txt;
}
return $return_txt;
@@ -259,7 +259,19 @@ function displaySavedSearchSelect(){
}
+ function getSearchFormTemplateByName($templateName) {
+ if (file_exists("custom/include/SearchForm/tpls/$templateName.tpl")) {
+ return "custom/include/SearchForm/tpls/$templateName.tpl";
+ }
+ return "include/SearchForm/tpls/$templateName.tpl";
+ }
+ function getSearchFormTemplateByPath($templatePath) {
+ if (file_exists('custom/' . $templatePath)) {
+ return 'custom/' . $templatePath;
+ }
+ return $templatePath;
+ }
/**
* displays the tabs (top of the search form)
*
View
4 include/Smarty/internals/core.display_debug_console.php
@@ -46,7 +46,9 @@ function smarty_core_display_debug_console($params, &$smarty)
if(empty($smarty->debug_tpl)) {
// set path to debug template from SMARTY_DIR
- $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
+ $debugTpl = SMARTY_DIR . 'debug.tpl';
+ $debugTpl = Sugar_Smarty::getCustomTemplate($debugTpl);
+ $smarty->debug_tpl = $debugTpl;
if($smarty->security && is_file($smarty->debug_tpl)) {
$smarty->secure_dir[] = realpath($smarty->debug_tpl);
}
View
10 include/SubPanel/SugarTab.php
@@ -84,13 +84,17 @@ function setup($mainTabs, $otherTabs=array(), $subTabs=array(), $selected_group=
function fetch()
{
- return $this->ss->fetch('include/SubPanel/tpls/' . $this->type . '.tpl');
+ $tpl = "include/SubPanel/tpls/$this->type.tpl";
+ $tpl= Sugar_Smarty::getCustomTemplate($tpl);
+ return $this->ss->fetch($tpl);
}
function display()
{
- $this->ss->display('include/SubPanel/tpls/' . $this->type . '.tpl');
- }
+ $tpl = "include/SubPanel/tpls/$this->type.tpl";
+ $tpl= Sugar_Smarty::getCustomTemplate($tpl);
+ $this->ss->display($tpl);
+ }
}
View
10 include/SugarCharts/Jit/Jit.php
@@ -70,14 +70,18 @@ function display($name, $xmlFile, $width='320', $height='480', $resize=false) {
parent::display($name, $xmlFile, $width, $height, $resize);
- return $this->ss->fetch('include/SugarCharts/Jit/tpls/chart.tpl');
+ $chartTpl = 'include/SugarCharts/Jit/tpls/chart.tpl';
+ $chartTpl = Sugar_Smarty::getCustomTemplate($chartTpl);
+ return $this->ss->fetch($chartTpl);
}
function getDashletScript($id,$xmlFile="") {
parent::getDashletScript($id,$xmlFile);
- return $this->ss->fetch('include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl');
+ $DashletGenericChartScriptTpl = 'include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl';
+ $DashletGenericChartScriptTpl = Sugar_Smarty::getCustomTemplate($DashletGenericChartScriptTpl);
+ return $this->ss->fetch($DashletGenericChartScriptTpl);
}
@@ -85,4 +89,4 @@ function getDashletScript($id,$xmlFile="") {
}
-?>
+?>
View
6 include/SugarCharts/Jit/JitReports.php
@@ -210,8 +210,10 @@ function display($name, $xmlFile, $width='320', $height='480', $reportChartDivSt
parent::display($name, $xmlFile, $width, $height, $resize=false);
- return $this->ss->fetch('include/SugarCharts/Jit/tpls/chart.tpl');
+ $chartTpl = 'include/SugarCharts/Jit/tpls/chart.tpl';
+ $chartTpl = Sugar_Smarty::getCustomTemplate($chartTpl);
+ return $this->ss->fetch($chartTpl);
}
}
-?>
+?>
View
12 include/SugarEmailAddress/SugarEmailAddress.php
@@ -806,7 +806,9 @@ function getEmailAddressWidgetEditView($id, $module, $asMetadata=false, $tpl='',
$this->smarty->assign('useInvalid', true);
}
- $template = empty($tpl) ? "include/SugarEmailAddress/templates/forEditView.tpl" : $tpl;
+ $forEditViewTpl = 'include/SugarEmailAddress/templates/forEditView.tpl';
+ $forEditViewTpl = Sugar_Smarty::getCustomTemplate($forEditViewTpl);
+ $template = empty($tpl) ? $forEditViewTpl : Sugar_Smarty::getCustomTemplate($tpl);
$newEmail = $this->smarty->fetch($template);
@@ -852,7 +854,9 @@ function getEmailAddressWidgetDetailView($focus, $tpl='')
$this->smarty->assign('app_strings', $app_strings);
$this->smarty->assign('emailAddresses', $assign);
- $templateFile = empty($tpl) ? "include/SugarEmailAddress/templates/forDetailView.tpl" : $tpl;
+ $forDetailViewTpl = 'include/SugarEmailAddress/templates/forDetailView.tpl';
+ $forDetailViewTpl = Sugar_Smarty::getCustomTemplate($forDetailViewTpl);
+ $templateFile = empty($tpl) ? $forDetailViewTpl : Sugar_Smarty::getCustomTemplate($tpl);
$return = $this->smarty->fetch($templateFile);
return $return;
}
@@ -930,7 +934,9 @@ function getEmailAddressWidgetDuplicatesView($focus)
$this->smarty->assign('verified', $invalid);
$this->smarty->assign('moduleDir', $mod);
- return $this->smarty->fetch("include/SugarEmailAddress/templates/forDuplicatesView.tpl");
+ $forDuplicatesViewTpl = 'include/SugarEmailAddress/templates/forDuplicatesView.tpl';
+ $forDuplicatesViewTpl = Sugar_Smarty::getCustomTemplate($forDuplicatesViewTpl);
+ return $this->smarty->fetch($forDuplicatesViewTpl);
}
/**
View
8 include/SugarFields/Fields/Datetime/SugarFieldDatetime.php
@@ -92,11 +92,9 @@ function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabind
$this->ss->assign('id_range_start', "start_range_{$id}");
$this->ss->assign('id_range_end', "end_range_{$id}");
$this->ss->assign('id_range_choice', "{$id}_range_choice");
- if(file_exists('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl'))
- {
- return $this->fetch('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl');
- }
- return $this->fetch('include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl');
+ $RangeSearchFormTpl = 'include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl';
+ $RangeSearchFormTpl = Sugar_Smarty::getCustomTemplate($RangeSearchFormTpl);
+ return $this->fetch($RangeSearchFormTpl);
}
return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'EditView');
}
View
10 include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php
@@ -88,11 +88,9 @@ function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabind
$this->ss->assign('id_range_start', "start_range_{$id}");
$this->ss->assign('id_range_end', "end_range_{$id}");
$this->ss->assign('id_range_choice', "{$id}_range_choice");
- if(file_exists('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl'))
- {
- return $this->fetch('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl');
- }
- return $this->fetch('include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl');
+ $RangeSearchFormTpl = 'include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl';
+ $RangeSearchFormTpl = Sugar_Smarty::getCustomTemplate($RangeSearchFormTpl);
+ return $this->fetch($RangeSearchFormTpl);
}
// Create Smarty variables for the Calendar picker widget
@@ -147,4 +145,4 @@ public function save(&$bean, &$inputData, &$field, &$def, $prefix = '') {
}
}
}
-?>
+?>
View
10 include/SugarFields/Fields/Int/SugarFieldInt.php
@@ -73,11 +73,9 @@ function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabind
$this->ss->assign('id_range_start', "start_range_{$id}");
$this->ss->assign('id_range_end', "end_range_{$id}");
$this->ss->assign('id_range_choice', "{$id}_range_choice");
- if(file_exists('custom/include/SugarFields/Fields/Int/RangeSearchForm.tpl'))
- {
- return $this->fetch('custom/include/SugarFields/Fields/Int/RangeSearchForm.tpl');
- }
- return $this->fetch('include/SugarFields/Fields/Int/RangeSearchForm.tpl');
+ $RangeSearchFormTpl = 'include/SugarFields/Fields/Int/RangeSearchForm.tpl';
+ $RangeSearchFormTpl = Sugar_Smarty::getCustomTemplate($RangeSearchFormTpl);
+ return $this->fetch($RangeSearchFormTpl);
}
return $this->fetch($this->findTemplate('SearchForm'));
@@ -100,4 +98,4 @@ public function importSanitize(
return $value;
}
-}
+}
View
20 include/Sugar_Smarty.php
@@ -65,7 +65,25 @@ function Sugar_Smarty()
$this->plugins_dir = $plugins_dir;
}
-
+
+ public function getCustomTemplate($templatePath) {
+ if (self::isCustomTemplate($templatePath)) {
+ return $templatePath;
+ }
+ if (self::customTemplateExists($templatePath)) {
+ return 'custom/' . $templatePath;
+ }
+ return $templatePath;
+ }
+
+ public function isCustomTemplate($templatePath) {
+ return (strpos($templatePath, 'custom/') == 1);
+ }
+
+ public function customTemplateExists($templatePath) {
+ return file_exists('custom/' . $templatePath);
+ }
+
}
?>
View
4 include/export_utils.php
@@ -382,7 +382,9 @@ function generateSearchWhere($module, $query) {//this function is similar with f
return;
}
$searchForm = new SearchForm($seed, $module);
- $searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl');
+ $SearchFormGenericTpl = 'include/SearchForm/tpls/SearchFormGeneric.tpl';
+ $SearchFormGenericTpl = Sugar_Smarty::getCustomTemplate($SearchFormGenericTpl);
+ $searchForm->setup($searchdefs, $searchFields, $SearchFormGenericTpl);
}
$searchForm->populateFromArray(unserialize(base64_decode($query)));
$where_clauses = $searchForm->generateSearchWhere(true, $module);
View
4 include/generic/Save2.php
@@ -228,7 +228,9 @@ function save_from_report($report_id,$parent_id, $module_name, $relationship_att
}
if(!empty($searchdefs) && !empty($searchFields)) {
$searchForm = new SearchForm($seed, $module);
- $searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl');
+ $SearchFormGenericTpl = 'include/SearchForm/tpls/SearchFormGeneric.tpl';
+ $SearchFormGenericTpl = Sugar_Smarty::getCustomTemplate($SearchFormGenericTpl);
+ $searchForm->setup($searchdefs, $searchFields, $SearchFormGenericTpl);
$searchForm->populateFromArray($current_query_by_page_array, 'advanced');
$where_clauses_arr = $searchForm->generateSearchWhere(true, $module);
if (count($where_clauses_arr) > 0 ) {
View
4 modules/ACLRoles/DetailUserRole.php
@@ -80,7 +80,9 @@
$sugar_smarty->assign('TITLE', $title);
$sugar_smarty->assign('USER_ID', $focus->id);
$sugar_smarty->assign('LAYOUT_DEF_KEY', 'UserRoles');
- echo $sugar_smarty->fetch('modules/ACLRoles/DetailViewUser.tpl');
+ $DetailViewUserTpl = 'modules/ACLRoles/DetailViewUser.tpl';
+ $DetailViewUserTpl = Sugar_Smarty::getCustomTemplate($DetailViewUserTpl);
+ echo $sugar_smarty->fetch($DetailViewUserTpl );
//this gets its layout_defs.php file from the user not from ACLRoles so look in modules/Users for the layout defs
View
6 modules/ACLRoles/DetailView.php
@@ -83,7 +83,9 @@
//$sugar_smarty->assign('TITLE', $title);
$hide_hide_supanels = true;
-echo $sugar_smarty->fetch('modules/ACLRoles/DetailView.tpl');
+$DetailViewTpl = 'modules/ACLRoles/DetailView.tpl';
+$DetailViewTpl = Sugar_Smarty::getCustomTemplate($DetailViewTpl);
+echo $sugar_smarty->fetch($DetailViewTpl);
//for subpanels the variable must be named focus;
$focus =& $role;
$_REQUEST['module'] = 'ACLRoles';
@@ -95,4 +97,4 @@
-?>
+?>
View
10 modules/ACLRoles/EditRole.php
@@ -93,11 +93,15 @@
ob_clean();
if($_REQUEST['category_name'] == 'All'){
- echo $sugar_smarty->fetch('modules/ACLRoles/EditAllBody.tpl');
+ $EditAllBodyTpl = 'modules/ACLRoles/EditAllBody.tpl';
+ $EditAllBodyTpl = Sugar_Smarty::getCustomTemplate($EditAllBodyTpl);
+ echo $sugar_smarty->fetch($EditAllBodyTpl);
}else{
//WDong Bug 23195: Strings not localized in Role Management.
echo getClassicModuleTitle($_REQUEST['category_name'],array($app_list_strings['moduleList'][$_REQUEST['category_name']]), false);
-echo $sugar_smarty->fetch('modules/ACLRoles/EditRole.tpl');
+$EditRoleTpl = 'modules/ACLRoles/EditRole.tpl';
+$EditRoleTpl = Sugar_Smarty::getCustomTemplate($EditRoleTpl);
+echo $sugar_smarty->fetch($EditRoleTpl);
echo '</form>';
}
-sugar_cleanup(true);
+sugar_cleanup(true);
View
6 modules/ACLRoles/EditView.php
@@ -103,6 +103,8 @@
$params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
}
echo getClassicModuleTitle("ACLRoles", $params, true);
-echo $sugar_smarty->fetch('modules/ACLRoles/EditView.tpl');
+$EditViewTpl = 'modules/ACLRoles/EditView.tpl';
+$EditViewTpl = Sugar_Smarty::getCustomTemplate($EditViewTpl);
+echo $sugar_smarty->fetch($EditViewTpl);
-?>
+?>
View
4 modules/Activities/views/view.modulelistmenu.php
@@ -49,7 +49,9 @@ public function display()
}
$this->ss->assign('LAST_VIEWED',$history);
- $this->ss->display('include/MVC/View/tpls/modulelistmenu.tpl');
+ $modulelistmenuTpl = 'include/MVC/View/tpls/modulelistmenu.tpl';
+ $modulelistmenuTpl = Sugar_Smarty::getCustomTemplate($modulelistmenuTpl);
+ $this->ss->display($modulelistmenuTpl);
}
}
?>
View
4 modules/Administration/Diagnostic.php
@@ -100,4 +100,6 @@
$sugar_smarty->assign("ADVANCED_SEARCH_PNG", SugarThemeRegistry::current()->getImage('advanced_search','alt="'.$app_strings['LNK_ADVANCED_SEARCH'].'" border="0"'));
$sugar_smarty->assign("BASIC_SEARCH_PNG", SugarThemeRegistry::current()->getImage('basic_search','alt="'.$app_strings['LNK_BASIC_SEARCH'].'" border="0"'));
-$sugar_smarty->display("modules/Administration/Diagnostic.tpl");
+$DiagnosticTpl = 'modules/Administration/Diagnostic.tpl';
+$DiagnosticTpl = Sugar_Smarty::getCustomTemplate($DiagnosticTpl);
+$sugar_smarty->display($DiagnosticTpl);
View
6 modules/Administration/Locale.php
@@ -116,6 +116,8 @@
//$sugar_smarty->assign('last_name', 'Doe');
$sugar_smarty->assign('getNameJs', $locale->getNameJs());
-$sugar_smarty->display('modules/Administration/Locale.tpl');
+$LocaleTpl = 'modules/Administration/Locale.tpl';
+$LocaleTpl = Sugar_Smarty::getCustomTemplate($LocaleTpl);
+$sugar_smarty->display($LocaleTpl);
-?>
+?>
View
6 modules/Administration/RepairXSS.php
@@ -85,5 +85,7 @@ function cleanAllBeans() {
$smarty = new Sugar_Smarty();
$smarty->assign("mod", $mod_strings);
$smarty->assign("beanDropDown", $beanDropDown);
- $smarty->display("modules/Administration/templates/RepairXSS.tpl");
-} // end else
+ $RepairXSSTpl = 'modules/Administration/templates/RepairXSS.tpl';
+ $RepairXSSTpl = Sugar_Smarty::getCustomTemplate($RepairXSSTpl);
+ $smarty->display($RepairXSSTpl);
+} // end else
View
8 modules/Administration/SupportPortal.php
@@ -66,7 +66,9 @@
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('iframeURL', $iframe_url);
- echo $sugar_smarty->fetch('modules/Administration/SupportPortal.tpl');
+ $SupportPortalTpl = 'modules/Administration/SupportPortal.tpl';
+ $SupportPortalTpl = Sugar_Smarty::getCustomTemplate($SupportPortalTpl);
+ echo $sugar_smarty->fetch($SupportPortalTpl);
break;
default:
@@ -108,7 +110,9 @@
$sugar_smarty->assign('table', "<table class='tabForm'><tr><td>");
$sugar_smarty->assign('endtable', "</td></tr></table>");
$sugar_smarty->assign('charset', $app_strings['LBL_CHARSET']);
- echo $sugar_smarty->fetch('modules/Administration/SupportPortal.tpl');
+ $SupportPortalTpl = 'modules/Administration/SupportPortal.tpl';
+ $SupportPortalTpl = Sugar_Smarty::getCustomTemplate($SupportPortalTpl);
+ echo $sugar_smarty->fetch($SupportPortalTpl);
} else {
if(empty($send_module)){
View
4 modules/Administration/index.php
@@ -162,5 +162,7 @@
$sugar_smarty->assign("COLNUM", $tab);
$sugar_smarty->assign('ID_TAB', $id_tab);
-echo $sugar_smarty->fetch('modules/Administration/index.tpl');
+$indexTpl = 'modules/Administration/index.tpl';
+$indexTpl = Sugar_Smarty::getCustomTemplate($indexTpl);
+echo $sugar_smarty->fetch($indexTpl);
?>
View
6 modules/Administration/repairDatabase.php
@@ -166,7 +166,9 @@
$ss = new Sugar_Smarty();
$ss->assign('MOD', $GLOBALS['mod_strings']);
$ss->assign('qry_str', $qry_str);
- echo $ss->fetch('modules/Administration/templates/RepairDatabase.tpl');
+ $RepairDatabaseTpl = 'modules/Administration/templates/RepairDatabase.tpl';
+ $RepairDatabaseTpl = Sugar_Smarty::getCustomTemplate($RepairDatabaseTpl);
+ echo $ss->fetch($RepairDatabaseTpl);
} else {
echo "<h3>{$mod_strings['LBL_REPAIR_DATABASE_SYNCED']}</h3>";
}
@@ -175,4 +177,4 @@
} else {
sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
-}
+}
View
4 modules/Administration/repairSelectModule.php
@@ -91,7 +91,9 @@
$smarty->assign('MOD', $mod_strings);
$smarty->assign('checkbox_output', $checkbox_output);
$smarty->assign('checkbox_values', $checkbox_values);
- $smarty->display("modules/Administration/templates/QuickRepairAndRebuild.tpl");
+ $QuickRepairAndRebuildTpl = 'modules/Administration/templates/QuickRepairAndRebuild.tpl';
+ $QuickRepairAndRebuildTpl = Sugar_Smarty::getCustomTemplate($QuickRepairAndRebuildTpl);
+ $smarty->display($QuickRepairAndRebuildTpl );
?>
View
4 modules/Administration/views/view.configureajaxui.php
@@ -101,6 +101,8 @@ public function display()
$this->ss->assign('disabled_mods', json_encode($disabled));
$this->ss->assign('title',$this->getModuleTitle(false));
- echo $this->ss->fetch('modules/Administration/templates/ConfigureAjaxUI.tpl');
+ $ConfigureAjaxUITpl = 'modules/Administration/templates/ConfigureAjaxUI.tpl';
+ $ConfigureAjaxUITpl = Sugar_Smarty::getCustomTemplate($ConfigureAjaxUITpl);
+ echo $this->ss->fetch($ConfigureAjaxUITpl);
}
}
View
4 modules/Administration/views/view.configuretabs.php
@@ -132,6 +132,8 @@ public function display()
$this->ss->assign('enabled_panels', json_encode($enabled));
$this->ss->assign('disabled_panels', json_encode($disabled));
- echo $this->ss->fetch('modules/Administration/templates/ConfigureTabs.tpl');
+ $ConfigureTabsTpl = 'modules/Administration/templates/ConfigureTabs.tpl';
+ $ConfigureTabsTpl = Sugar_Smarty::getCustomTemplate($ConfigureTabsTpl);
+ echo $this->ss->fetch($ConfigureTabsTpl);
}
}
View
4 modules/Administration/views/view.languages.php
@@ -104,6 +104,8 @@ public function display()
$this->ss->assign('disabled_langs', json_encode($disabled));
$this->ss->assign('title',$this->getModuleTitle(false));
- echo $this->ss->fetch('modules/Administration/templates/Languages.tpl');
+ $LanguagesTpl = 'modules/Administration/templates/Languages.tpl';
+ $LanguagesTpl = Sugar_Smarty::getCustomTemplate($LanguagesTpl);
+ echo $this->ss->fetch($LanguagesTpl);
}
}
View
4 modules/Administration/views/view.themesettings.php
@@ -114,6 +114,8 @@ public function display()
$this->ss->assign('currentTheme', SugarThemeRegistry::current());
echo $this->getModuleTitle(false);
- echo $this->ss->fetch('modules/Administration/templates/themeSettings.tpl');
+ $themeSettingsTpl = 'modules/Administration/templates/themeSettings.tpl';
+ $themeSettingsTpl = Sugar_Smarty::getCustomTemplate($themeSettingsTpl);
+ echo $this->ss->fetch($themeSettingsTpl);
}
}
View
4 modules/Calendar/TasksListView.php
@@ -133,7 +133,9 @@
$lv->mailMerge = false;
$lv->multiSelect = false;
$lv->showMassupdateFields = false;
-$lv->setup($seedTask, 'include/ListView/ListViewNoMassUpdate.tpl', $where, $params);
+$ListViewNoMassUpdateTpl = 'include/ListView/ListViewNoMassUpdate.tpl';
+$ListViewNoMassUpdateTpl = Sugar_Smarty::getCustomTemplate($ListViewNoMassUpdateTpl);
+$lv->setup($seedTask, $ListViewNoMassUpdateTpl, $where, $params);
echo getClassicModuleTitle($current_module_strings['LBL_MODULE_NAME'], array($current_module_strings['LBL_LIST_FORM_TITLE']), false);
View
6 modules/Campaigns/Charts1.php
@@ -87,7 +87,9 @@ function campaign_response_chart($targets,$campaign_id) {
}
//use the new template.
- $xtpl=new XTemplate ('modules/Campaigns/chart.tpl');
+ $chartTpl = //'modules/Campaigns/chart.tpl';
+ $chartTpl = Sugar_Smarty::getCustomTemplate($chartTpl);
+ $xtpl=new XTemplate ($chartTpl);
$xtpl->assign("GRAPHTITLE",'Campaign Response by Recipient Activity');
$xtpl->assign("Y_DEFAULT_ALT_TEXT",'Rollover a bar to view details.');
@@ -103,4 +105,4 @@ function campaign_response_chart($targets,$campaign_id) {
}
}// end charts class
?>
-
+
View
8 modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php
@@ -92,7 +92,9 @@ public function display()
$ss->assign('lbl_revenue', translate('LBL_TOP_CAMPAIGNS_REVENUE', 'Campaigns'));
$ss->assign('top_campaigns', $this->top_campaigns);
- return parent::display() . $ss->fetch('modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl');
+ $TopCampaignsDashletTpl = 'modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl';
+ $TopCampaignsDashletTpl = Sugar_Smarty::getCustomTemplate($TopCampaignsDashletTpl);
+ return parent::display() . $ss->fetch($TopCampaignsDashletTpl);
}
/**
@@ -112,7 +114,9 @@ public function displayOptions()
$ss->assign('autoRefreshSelect', $this->autoRefresh);
}
- return $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl');
+ $MyClosedOpportunitiesDashletConfigureTpl = 'modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl';
+ $MyClosedOpportunitiesDashletConfigureTpl = Sugar_Smarty::getCustomTemplate($MyClosedOpportunitiesDashletConfigureTpl);
+ return $ss->fetch($MyClosedOpportunitiesDashletConfigureTpl);
}
/**
View
6 modules/Campaigns/RoiDetailView.php
@@ -208,5 +208,7 @@
$resources = $sugarChart->getChartResources();
$smarty->assign('chartResources', $resources);
-echo $smarty->fetch('modules/Campaigns/RoiDetailView.tpl');
-?>
+ $RoiDetailViewTpl = 'modules/Campaigns/RoiDetailView.tpl';
+ $RoiDetailViewTpl = Sugar_Smarty::getCustomTemplate($RoiDetailViewTpl);
+ echo $smarty->fetch($RoiDetailViewTpl);
+?>
View
6 modules/Campaigns/Schedule.php
@@ -88,7 +88,9 @@
if ($campaign_id && isset($campaign) && $campaign->status == 'Inactive') {
$ss = new Sugar_Smarty();
$ss->assign('campaignName', $campaign->name);
- $ss->display('modules/Campaigns/tpls/campaign-inactive.tpl');
+ $inactiveTpl = 'modules/Campaigns/tpls/campaign-inactive.tpl';
+ $inactiveTpl = Sugar_Smarty::getCustomTemplate($inactiveTpl);
+ $ss->display($inactiveTpl);
} else {
$focus = new EmailMarketing();
if($campaign_id)
@@ -178,4 +180,4 @@
$ListView->processListView($focus, "main", "EMAILMARKETING");
}
}
-?>
+?>
View
6 modules/Campaigns/Subscriptions.php
@@ -103,7 +103,9 @@
$this->ss->assign('enabled_subs_string', $orig_vals_str[0]);
$this->ss->assign('disabled_subs_string', $orig_vals_str[1]);
-echo $this->ss->fetch('modules/Campaigns/Subscriptions.tpl');
+$SubscriptionsTpl = 'modules/Campaigns/Subscriptions.tpl';
+$SubscriptionsTpl = Sugar_Smarty::getCustomTemplate($SubscriptionsTpl);
+echo $this->ss->fetch($SubscriptionsTpl);
@@ -241,4 +243,4 @@ function manageSubscriptions($focus){
}
-?>
+?>
View
6 modules/Campaigns/TrackDetailView.php
@@ -221,7 +221,9 @@
$resources = $sugarChart->getChartResources();
$smarty->assign('chartResources', $resources);
-echo $smarty->fetch('modules/Campaigns/TrackDetailView.tpl');
+ $TrackDetailViewTpl = 'modules/Campaigns/TrackDetailView.tpl';
+ $TrackDetailViewTpl = Sugar_Smarty::getCustomTemplate($TrackDetailViewTpl);
+ echo $smarty->fetch($TrackDetailViewTpl);
require_once('include/SubPanel/SubPanelTiles.php');
$subpanel = new SubPanelTiles($focus, 'Campaigns');
@@ -269,4 +271,4 @@
}
}
echo $subpanel->display();
-?>
+?>
View
4 modules/Campaigns/views/view.modulelistmenu.php
@@ -49,7 +49,9 @@ public function display()
}
$this->ss->assign('LAST_VIEWED',$history);
- $this->ss->display('include/MVC/View/tpls/modulelistmenu.tpl');
+ $modulelistmenuTpl = 'include/MVC/View/tpls/modulelistmenu.tpl';
+ $modulelistmenuTpl = Sugar_Smarty::getCustomTemplate($modulelistmenuTpl);
+ $this->ss->display($modulelistmenuTpl);
}
}
?>
View
6 modules/Configurator/views/view.addfontresult.php
@@ -70,7 +70,9 @@ public function display(){
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
//display
- $this->ss->display('modules/Configurator/tpls/addFontResult.tpl');
+ $addFontResultTpl = //'modules/Configurator/tpls/addFontResult.tpl';
+ $addFontResultTpl = Sugar_Smarty::getCustomTemplate($addFontResultTpl);
+ $this->ss->display($addFontResultTpl);
}
/**
@@ -105,4 +107,4 @@ private function addFont(){
return $error;
}
}
-
+
View
6 modules/Configurator/views/view.addfontview.php
@@ -80,7 +80,9 @@ public function display(){
$this->ss->assign("ENCODING_TABLE", array_combine(explode(",",PDF_ENCODING_TABLE_LIST), explode(",",PDF_ENCODING_TABLE_LABEL_LIST)));
//display
- $this->ss->display('modules/Configurator/tpls/addFontView.tpl');
+ $addFontViewTpl = //'modules/Configurator/tpls/addFontView.tpl';
+ $addFontViewTpl = Sugar_Smarty::getCustomTemplate($addFontViewTpl);
+ $this->ss->display($addFontViewTpl);
}
}
-
+
View
6 modules/Configurator/views/view.adminwizard.php
@@ -118,6 +118,8 @@ public function display()
$this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
- $this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
+ $adminwizardTpl = 'modules/Configurator/tpls/adminwizard.tpl';
+ $adminwizardTpl = Sugar_Smarty::getCustomTemplate($adminwizardTpl);
+ $this->ss->display($adminwizardTpl);
}
-}
+}
View
4 modules/Configurator/views/view.edit.php
@@ -128,7 +128,9 @@ public function display()
echo $this->getModuleTitle(false);
- $this->ss->display('modules/Configurator/tpls/EditView.tpl');
+ $EditViewTpl = 'modules/Configurator/tpls/EditView.tpl';
+ $EditViewTpl = Sugar_Smarty::getCustomTemplate($EditViewTpl);
+ $this->ss->display($EditViewTpl);
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
View
6 modules/Configurator/views/view.fontmanager.php
@@ -87,7 +87,9 @@ public function display(){
$this->ss->assign("RESPONSESCHEMA", $this->getYuiResponseSchema());
//display
- $this->ss->display('modules/Configurator/tpls/fontmanager.tpl');
+ $fontmanagerTpl = //'modules/Configurator/tpls/fontmanager.tpl';
+ $fontmanagerTpl = Sugar_Smarty::getCustomTemplate($fontmanagerTpl);
+ $this->ss->display($fontmanagerTpl);
}
/**
@@ -242,4 +244,4 @@ private function isAllOOBFont($fontList){
}
}
-
+
View
4 modules/Configurator/views/view.sugarpdfsettings.php
@@ -141,7 +141,9 @@ public function display()
else
$this->ss->assign("GD_WARNING", 0);
- $this->ss->display('modules/Configurator/tpls/SugarpdfSettings.tpl');
+ $SugarpdfSettingsTpl = 'modules/Configurator/tpls/SugarpdfSettings.tpl';
+ $SugarpdfSettingsTpl = Sugar_Smarty::getCustomTemplate($SugarpdfSettingsTpl);
+ $this->ss->display($SugarpdfSettingsTpl);
require_once("include/javascript/javascript.php");
$javascript = new javascript();
View
4 modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php
@@ -181,7 +181,9 @@ public function showFrame($event, $args) {
if ( $url != '' ) {
// Check if the user should be shown the frame or not
$smarty = new Sugar_Smarty();
- $tplName = 'modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl';
+ $InsideViewTpl = 'modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl';
+ $InsideViewTpl = Sugar_Smarty::getCustomTemplate($InsideViewTpl);
+ $tplName = $InsideViewTpl;
require_once('include/connectors/utils/ConnectorUtils.php');
$connector_language = ConnectorUtils::getConnectorStrings('ext_rest_insideview');
$smarty->assign('connector_language', $connector_language);
View
6 modules/Connectors/controller.php
@@ -193,7 +193,9 @@ function action_GetSearchForm(){
$ss->assign('RECORD', $record);
$ss->assign('APP', $GLOBALS['app_strings']);
$ss->assign('MOD', $GLOBALS['mod_strings']);
- echo $ss->fetch('modules/Connectors/tpls/search_form.tpl');
+ $search_formTpl = 'modules/Connectors/tpls/search_form.tpl';
+ $search_formTpl = Sugar_Smarty::getCustomTemplate($search_formTpl);
+ echo $ss->fetch($search_formTpl);
}
}
@@ -673,4 +675,4 @@ function action_RetrieveSources() {
}
}
-?>
+?>
View
6 modules/Connectors/views/view.connectorsettings.php
@@ -72,6 +72,8 @@ public function display()
$this->ss->assign('mod', $mod_strings);
$this->ss->assign('app', $app_strings);
$this->ss->assign('IMG', 'themes/default/images/');
- $this->ss->display('modules/Connectors/tpls/administration.tpl');
+ $administrationTpl = 'modules/Connectors/tpls/administration.tpl';
+ $administrationTpl = Sugar_Smarty::getCustomTemplate($administrationTpl);
+ $this->ss->display($administrationTpl);
}
-}
+}
View
6 modules/Connectors/views/view.displayproperties.php
@@ -120,6 +120,8 @@ public function display()
$this->ss->assign('externalHasProperties', !empty($fields));
$this->ss->assign('externalChecked', !empty($sources[$source]['eapm']['enabled'])?" checked":"");
- echo $this->ss->fetch('modules/Connectors/tpls/display_properties.tpl');
+ $display_propertiesTpl = 'modules/Connectors/tpls/display_properties.tpl';
+ $display_propertiesTpl = Sugar_Smarty::getCustomTemplate($display_propertiesTpl);
+ echo $this->ss->fetch($display_propertiesTpl);
}
-}
+}
View
6 modules/Connectors/views/view.mappingproperties.php
@@ -155,6 +155,8 @@ public function display()
$this->ss->assign('source_name', $sources[$source_id]['name']);
$this->ss->assign('theme', $GLOBALS['theme']);
- echo $this->ss->fetch('modules/Connectors/tpls/mapping_properties.tpl');
+ $mapping_propertiesTpl = 'modules/Connectors/tpls/mapping_properties.tpl';
+ $mapping_propertiesTpl = Sugar_Smarty::getCustomTemplate($mapping_propertiesTpl);
+ echo $this->ss->fetch($mapping_propertiesTpl);
}
-}
+}
View
6 modules/Connectors/views/view.modifydisplay.php
@@ -77,6 +77,8 @@ public function display()
$this->ss->assign('theme', $GLOBALS['theme']);
echo $this->getModuleTitle(false);
- $this->ss->display('modules/Connectors/tpls/modify_display.tpl');
+ $modify_displayTpl = 'modules/Connectors/tpls/modify_display.tpl';
+ $modify_displayTpl = Sugar_Smarty::getCustomTemplate($modify_displayTpl);
+ $this->ss->display($modify_displayTpl);
}
-}
+}
View
6 modules/Connectors/views/view.modifymapping.php
@@ -85,6 +85,8 @@ public function display()
$this->ss->assign('SOURCES', $connectors);
echo $this->getModuleTitle(false);
- $this->ss->display('modules/Connectors/tpls/modify_mapping.tpl');
+ $modify_mappingTpl = 'modules/Connectors/tpls/modify_mapping.tpl';
+ $modify_mappingTpl = Sugar_Smarty::getCustomTemplate($modify_mappingTpl);
+ $this->ss->display($modify_mappingTpl);
}
-}
+}
View
6 modules/Connectors/views/view.modifyproperties.php
@@ -99,6 +99,8 @@ public function display()
$this->ss->assign('SOURCES', $connectorsToShow);
$this->ss->assign('REQUIRED_FIELDS', $required_fields);
echo $this->getModuleTitle(false);
- $this->ss->display('modules/Connectors/tpls/modify_properties.tpl');
+ $modify_propertiesTpl = 'modules/Connectors/tpls/modify_properties.tpl';
+ $modify_propertiesTpl = Sugar_Smarty::getCustomTemplate($modify_propertiesTpl);
+ $this->ss->display($modify_propertiesTpl);
}
-}
+}
View
6 modules/Connectors/views/view.modifysearch.php
@@ -85,6 +85,8 @@ public function display()
$this->ss->assign('SOURCES', $connectors);
echo $this->getModuleTitle(false);
- $this->ss->display('modules/Connectors/tpls/modify_search.tpl');
+ $modify_searchTpl = 'modules/Connectors/tpls/modify_search.tpl';
+ $modify_searchTpl = Sugar_Smarty::getCustomTemplate($modify_searchTpl);
+ $this->ss->display($modify_searchTpl);
}
-}
+}
View
6 modules/Connectors/views/view.searchproperties.php
@@ -115,6 +115,8 @@ public function display()
$this->ss->assign('source_id', $_REQUEST['source_id']);
$this->ss->assign('theme', $GLOBALS['theme']);
$this->ss->assign('connector_language', $connector_strings);
- echo $this->ss->fetch('modules/Connectors/tpls/search_properties.tpl');
+ $search_propertiesTpl = 'modules/Connectors/tpls/search_properties.tpl';
+ $search_propertiesTpl = Sugar_Smarty::getCustomTemplate($search_propertiesTpl);
+ echo $this->ss->fetch($search_propertiesTpl);
}
-}
+}
View
6 modules/Connectors/views/view.sourceproperties.php
@@ -73,8 +73,10 @@ function display() {
$this->ss->assign('app', $GLOBALS['app_strings']);
$this->ss->assign('connector_language', $connector_language);
$this->ss->assign('hasTestingEnabled', $source->hasTestingEnabled());
- echo $this->ss->fetch('modules/Connectors/tpls/source_properties.tpl');
+ $source_propertiesTpl = 'modules/Connectors/tpls/source_properties.tpl';
+ $source_propertiesTpl = Sugar_Smarty::getCustomTemplate($source_propertiesTpl);
+ echo $this->ss->fetch($source_propertiesTpl);
}
}
-?>
+?>
View
4 modules/Contacts/ContactFormBase.php
@@ -364,7 +364,9 @@ function getWideFormBody($prefix, $mod='',$formname='', $contact = '', $portal
EOQ;
-$form .= $sugarEmailAddress->getEmailAddressWidgetEditView($contact->id, $_REQUEST['action']=='ConvertLead'?'Leads':'Contacts', false, 'include/SugarEmailAddress/templates/forWideFormBodyView.tpl');
+$forWideFormBodyViewTpl = 'include/SugarEmailAddress/templates/forWideFormBodyView.tpl';
+$forWideFormBodyViewTpl = Sugar_Smarty::getCustomTemplate($forWideFormBodyViewTpl);
+$form .= $sugarEmailAddress->getEmailAddressWidgetEditView($contact->id, $_REQUEST['action']=='ConvertLead'?'Leads':'Contacts', false, $forWideFormBodyViewTpl);
require_once('include/SugarFields/Fields/Text/SugarFieldText.php');
$sugarfield = new SugarFieldText('Text');
View
6 modules/Currencies/index.php
@@ -174,7 +174,9 @@
//if (empty($focus->list_order)) $xtpl->assign('LIST_ORDER', count($focus->get_manufacturers(false,'All'))+1);
//else $xtpl->assign('LIST_ORDER', $focus->list_order);
- $sugar_smarty->display("modules/Currencies/EditView.tpl");
+ $EditViewTpl = 'modules/Currencies/EditView.tpl';
+ $EditViewTpl = Sugar_Smarty::getCustomTemplate($EditViewTpl);
+ $sugar_smarty->display($EditViewTpl);
$javascript = new javascript();
$javascript->setFormName('EditView');
@@ -186,4 +188,4 @@
echo 'Admin\'s Only';
}
-?>
+?>
View
8 modules/Documents/views/view.extdoc.php
@@ -79,7 +79,9 @@ public function display(){
if ( !$eapmBean = EAPM::getLoginInfo($apiName,true) ) {
$smarty = new Sugar_Smarty();
- echo $smarty->fetch('include/externalAPI/'.$apiName.'/'.$apiName.'Signup.'.$GLOBALS['current_language'].'.tpl');
+ $LanguageTpl = 'include/externalapi/'.$apiname.'/'.$apiname.'signup.'.$globals['current_language'].'.tpl';
+ $LanguageTpl = Sugar_Smarty::getCustomTemplate($LanguageTpl);
+ echo $smarty->fetch($LanguageTpl);
return;
}
@@ -174,7 +176,9 @@ public function display(){
echo($output_html);
}
- $ss->display('modules/Documents/tpls/view.extdoc.tpl');
+ $extdocTpl = 'modules/Documents/tpls/view.extdoc.tpl';
+ $extdocTpl = Sugar_Smarty::getCustomTemplate($extdocTpl);
+ $ss->display($extdocTpl);
if ( $isPopup ) {
// Close the dccontent div
View
34 modules/DynamicFields/FieldViewer.php
@@ -51,15 +51,25 @@ function getLayout($vardef){
$GLOBALS['log']->debug('FieldViewer.php->getLayout() = '.$vardef['type']);
switch($vardef['type']){
case 'address':
- return $this->ss->fetch('modules/DynamicFields/templates/Fields/Forms/address.tpl');
+ $addressTpl = 'modules/DynamicFields/templates/Fields/Forms/address.tpl';
+ $addressTpl = Sugar_Smarty::getCustomTemplate($addressTpl);
+ return $this->ss->fetch($addressTpl);
case 'bool':
- return $this->ss->fetch('modules/DynamicFields/templates/Fields/Forms/bool.tpl');
+ $boolTpl = 'modules/DynamicFields/templates/Fields/Forms/bool.tpl';
+ $boolTpl = Sugar_Smarty::getCustomTemplate($boolTpl);
+ return $this