diff --git a/lib/Search/UI/SearchFormView.php b/lib/Search/UI/SearchFormView.php index b14d365fe70..f20ffbc097e 100644 --- a/lib/Search/UI/SearchFormView.php +++ b/lib/Search/UI/SearchFormView.php @@ -4,7 +4,7 @@ * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. * * SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd. - * Copyright (C) 2011 - 2021 SalesAgility Ltd. + * Copyright (C) 2011 - 2024 SalesAgility Ltd. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the @@ -56,7 +56,13 @@ class SearchFormView extends View { public function __construct() { - parent::__construct(__DIR__ . '/templates/search.form.tpl'); + $templateFile = get_custom_file_if_exists('templates/search.form.tpl'); + + if (str_begin($templateFile, 'custom/')) { + parent::__construct($templateFile); + } else { + parent::__construct(__DIR__ . '/templates/search.form.tpl'); + } } /** @inheritdoc */