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 @@ function buildQuickForm() { $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 @@ function buildQuickForm() { } 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 @@ static function generate_widget_code($widgetId, $preview = 0) { 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/Form/CreateWidget.hlp b/templates/CRM/Wci/Form/CreateWidget.hlp index bae916b..aaac13f 100644 --- a/templates/CRM/Wci/Form/CreateWidget.hlp +++ b/templates/CRM/Wci/Form/CreateWidget.hlp @@ -1,3 +1,25 @@ +{* + +--------------------------------------------------------------------+ + | 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. | + +--------------------------------------------------------------------+ +*} {htxt id="hide-border"} {ts}To get transparent background give none in the Background color field{/ts} {/htxt} @@ -17,3 +39,11 @@ {htxt id="image"} {ts}Select a smaller image than Size variant{/ts} {/htxt} + +{htxt id="preview"} +{ts}To embed widget on a page, create an embed code and associate it with the widget.{/ts} +{/htxt} + +{htxt id="add-new-pb"} +{ts}If no progressbars availavle, create one.{/ts} +{/htxt} diff --git a/templates/CRM/Wci/Form/CreateWidget.tpl b/templates/CRM/Wci/Form/CreateWidget.tpl index 1296eab..3cccadd 100644 --- a/templates/CRM/Wci/Form/CreateWidget.tpl +++ b/templates/CRM/Wci/Form/CreateWidget.tpl @@ -1,3 +1,25 @@ +{* + +--------------------------------------------------------------------+ + | 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. | + +--------------------------------------------------------------------+ +*} {* HEADER *}
@@ -5,7 +27,7 @@
{if $form.title.value != ""} - {php} + {php} if(isset($_REQUEST['id'])) { $widget_controller_path = getWciWidgetControllerPath(); $extension_root_path = getExtensionRootPath(); @@ -21,7 +43,7 @@ Click Save & Preview to save any changes to your settings, and preview the widget again on this page.
-
+
{help id="preview" file="CRM/Wci/Form/CreateWidget"}
@@ -32,12 +54,12 @@
{$form.title.label}
{$form.title.html}
- +
{$form.logo_image.label}
{$form.logo_image.html} {help id="logo_image" file="CRM/Wci/Form/CreateWidget"}
-
+
{$form.image.label}
{$form.image.html} {help id="image" file="CRM/Wci/Form/CreateWidget"}
@@ -55,7 +77,7 @@
{$form.progress_bar.label}
-
{$form.progress_bar.html}
+
{$form.progress_bar.html}{help id="add-new-pb" file="CRM/Wci/Form/CreateWidget"}
@@ -92,16 +114,16 @@ - + - + - +
{$form.hide_title.html}{$form.hide_title.label}{$form.hide_title.label}
{$form.hide_border.html} {$form.hide_border.label} {help id="hide-border" file="CRM/Wci/Form/CreateWidget"}
{$form.hide_pbcap.html} {$form.hide_pbcap.label}
diff --git a/templates/CRM/Wci/Form/NewEmbedCode.tpl b/templates/CRM/Wci/Form/NewEmbedCode.tpl index 1269a31..68172c7 100644 --- a/templates/CRM/Wci/Form/NewEmbedCode.tpl +++ b/templates/CRM/Wci/Form/NewEmbedCode.tpl @@ -1,3 +1,25 @@ +{* + +--------------------------------------------------------------------+ + | 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. | + +--------------------------------------------------------------------+ +*} {* HEADER *}
@@ -14,7 +36,7 @@
{/foreach} {if $form.title.value != ""} - {php} + {php} if(isset($_REQUEST['id'])) { $emb_id = $_REQUEST['id']; $wid_id = CRM_Wci_BAO_EmbedCode::getWidgetId($emb_id); @@ -39,7 +61,7 @@
Add this widget to any web page by copying and pasting the code below.
-
diff --git a/templates/CRM/Wci/Form/ProgressBar.tpl b/templates/CRM/Wci/Form/ProgressBar.tpl index ae6889d..e613158 100644 --- a/templates/CRM/Wci/Form/ProgressBar.tpl +++ b/templates/CRM/Wci/Form/ProgressBar.tpl @@ -1,3 +1,25 @@ +{* + +--------------------------------------------------------------------+ + | 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} {/literal} -{/if} +{/if} {if (1 == $wciform.hide_border)}
@@ -240,11 +240,11 @@ {/if}
{$wciform.description} -
+
{if $wciform.button_title && $cpageId} -
+ {if $wciform.email_signup_group_id} diff --git a/templates/CRM/Wci/Page/Widget.tpl b/templates/CRM/Wci/Page/Widget.tpl deleted file mode 100644 index a5ba67a..0000000 --- a/templates/CRM/Wci/Page/Widget.tpl +++ /dev/null @@ -1,188 +0,0 @@ -{literal} - - - -{/literal} - -
-
- {if $form.logo_image.value} - - {/if} - {$form.title} -
-
-
-
-
-
-
-
-
-
-
-
- {$form.description.value} -
-
-
- -
diff --git a/templates/CRM/Wci/Page/WidgetList.tpl b/templates/CRM/Wci/Page/WidgetList.tpl index de19ae0..b64c284 100644 --- a/templates/CRM/Wci/Page/WidgetList.tpl +++ b/templates/CRM/Wci/Page/WidgetList.tpl @@ -1,13 +1,25 @@ -{* -

This new page is generated by CRM/Wci/Page/WidgetList.php

+{* + +--------------------------------------------------------------------+ + | 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. | + +--------------------------------------------------------------------+ *} -{* Example: Display a variable directly -

The current time is {$currentTime}

-*} -{* Example: Display a translated string -- which happens to include a variable -

{ts 1=$currentTime}(In your native language) The current time is %1.{/ts}

-*} - {if $rows}
{strip} @@ -60,23 +72,8 @@ {/strip}
{else} - {if $isSearch eq 1} -
- {ts}status{/ts} - {capture assign=browseURL}{crmURL p='civicrm/contribute/manage' q="reset=1"}{/capture} - {ts}No available Contribution Pages match your search criteria. Suggestions:{/ts} -
-
    -
  • {ts}Check your spelling.{/ts}
  • -
  • {ts}Try a different spelling or use fewer letters.{/ts}
  • -
  • {ts}Make sure you have enough privileges in the access control system.{/ts}
  • -
- {ts 1=$browseURL}Or you can browse all available Contribution Pages.{/ts} -
- {else}
  {ts 1=$newPageURL}No wci widgets have been created yet. Click here to create a new wci widget.{/ts}
- {/if} {/if}