Code clean up.
authorVimal Joseph <vimal.joseph@zyxware.com>
Sun, 23 Nov 2014 14:39:10 +0000 (20:09 +0530)
committerVimal Joseph <vimal.joseph@zyxware.com>
Sun, 23 Nov 2014 14:39:10 +0000 (20:09 +0530)
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
CRM/Wci/WidgetCode.php
templates/CRM/Wci/Page/WCIWidget.tpl [moved from templates/CRM/Wci/Page/wciwidget.tpl with 85% similarity]

index c2c3c841192b62a63a6b3231236f188f742af5b3..47044bed5a30e52e99667941e1defd6db6ab5750 100644 (file)
@@ -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);
     }
index a5145ee1ca6f1273d26faade812c8e8bb8cab978..a1c7f368a91232d54d4b4b591acb2f6fe4a83fc0 100644 (file)
@@ -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']));
     }
similarity index 85%
rename from templates/CRM/Wci/Page/wciwidget.tpl
rename to templates/CRM/Wci/Page/WCIWidget.tpl
index 3bca68079037043a9281feb8ed7677fb5ea34509..cf089e2ced2d8e0c55d91327115364d1b528804c 100644 (file)
@@ -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}
 <style>
     .crm-wci-widget {