From 2712a1719e8bbfcf3a30d8f52790f6646bf96093 Mon Sep 17 00:00:00 2001 From: Vimal Joseph Date: Sun, 23 Nov 2014 20:09:10 +0530 Subject: [PATCH] Code clean up. Renamed wciwidget.tpl to WCIWidget.tpl to make it adhear with standard. Removed the license text from WCIWidget.tpl so that it looks clean in the Override default template input. --- CRM/Wci/Form/CreateWidget.php | 4 ++-- CRM/Wci/WidgetCode.php | 2 +- .../Wci/Page/{wciwidget.tpl => WCIWidget.tpl} | 22 ------------------- 3 files changed, 3 insertions(+), 25 deletions(-) rename templates/CRM/Wci/Page/{wciwidget.tpl => WCIWidget.tpl} (85%) diff --git a/CRM/Wci/Form/CreateWidget.php b/CRM/Wci/Form/CreateWidget.php index c2c3c84..47044be 100644 --- a/CRM/Wci/Form/CreateWidget.php +++ b/CRM/Wci/Form/CreateWidget.php @@ -247,7 +247,7 @@ class CRM_Wci_Form_CreateWidget extends CRM_Core_Form { $this->setDefaults(array( 'custom_template' => $cust_templ)); } else { - $output = file_get_contents('templates/CRM/Wci/Page/wciwidget.tpl',FILE_USE_INCLUDE_PATH); + $output = file_get_contents('templates/CRM/Wci/Page/WCIWidget.tpl', FILE_USE_INCLUDE_PATH); $elem = $this->getElement('custom_template'); $elem->setValue($output); } @@ -256,7 +256,7 @@ class CRM_Wci_Form_CreateWidget extends CRM_Core_Form { } else { CRM_Utils_System::setTitle(ts('Create Widget')); - $output = file_get_contents('templates/CRM/Wci/Page/wciwidget.tpl',FILE_USE_INCLUDE_PATH); + $output = file_get_contents('templates/CRM/Wci/Page/WCIWidget.tpl', FILE_USE_INCLUDE_PATH); $elem = $this->getElement('custom_template'); $elem->setValue($output); } diff --git a/CRM/Wci/WidgetCode.php b/CRM/Wci/WidgetCode.php index a5145ee..a1c7f36 100644 --- a/CRM/Wci/WidgetCode.php +++ b/CRM/Wci/WidgetCode.php @@ -37,7 +37,7 @@ class CRM_Wci_WidgetCode { if ($data["override"] == '0') { $template->template_dir[] = getWciWidgetTemplatePath(); - $wcidata = $template->fetch('wciwidget.tpl'); + $wcidata = $template->fetch('WCIWidget.tpl'); } else { $wcidata = $template->fetch('string:' . html_entity_decode($data['custom_template'])); } diff --git a/templates/CRM/Wci/Page/wciwidget.tpl b/templates/CRM/Wci/Page/WCIWidget.tpl similarity index 85% rename from templates/CRM/Wci/Page/wciwidget.tpl rename to templates/CRM/Wci/Page/WCIWidget.tpl index 3bca680..cf089e2 100644 --- a/templates/CRM/Wci/Page/wciwidget.tpl +++ b/templates/CRM/Wci/Page/WCIWidget.tpl @@ -1,25 +1,3 @@ -{* - +--------------------------------------------------------------------+ - | CiviCRM Widget Creation Interface (WCI) Version 1.0 | - +--------------------------------------------------------------------+ - | Copyright Zyxware Technologies (c) 2014 | - +--------------------------------------------------------------------+ - | This file is a part of CiviCRM WCI. | - | | - | CiviCRM WCI is free software; you can copy, modify, and distribute | - | it under the terms of the GNU Affero General Public License | - | Version 3, 19 November 2007. | - | | - | CiviCRM WCI is distributed in the hope that it will be useful, | - | but WITHOUT ANY WARRANTY; without even the implied warranty of | - | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | - | See the GNU Affero General Public License for more details. | - | | - | You should have received a copy of the GNU Affero General Public | - | License along with this program; if not, contact Zyxware | - | Technologies at info[AT]zyxware[DOT]com. | - +--------------------------------------------------------------------+ -*} {literal}