Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
vimaljoseph committed Nov 23, 2014
2 parents 838b4d2 + 2712a17 commit 093e2f9
Show file tree
Hide file tree
Showing 12 changed files with 206 additions and 296 deletions.
4 changes: 2 additions & 2 deletions CRM/Wci/Form/CreateWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Wci/WidgetCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']));
}
Expand Down
30 changes: 30 additions & 0 deletions templates/CRM/Wci/Form/CreateWidget.hlp
Original file line number Diff line number Diff line change
@@ -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 <strong>none</strong> in the <i>Background color</i> field{/ts}
{/htxt}
Expand All @@ -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, <a accesskey="N" href='embed-code/add'>create</a> 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}
38 changes: 30 additions & 8 deletions templates/CRM/Wci/Form/CreateWidget.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
{*
+--------------------------------------------------------------------+
| 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 *}
<div class="crm-block crm-form-block ">
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="top"}
</div>

{if $form.title.value != ""}
{php}
{php}
if(isset($_REQUEST['id'])) {
$widget_controller_path = getWciWidgetControllerPath();
$extension_root_path = getExtensionRootPath();
Expand All @@ -21,7 +43,7 @@
Click <strong>Save &amp; Preview</strong> to save any changes to your settings, and preview the widget again on this page.
</div>
<script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?id={php}echo $_REQUEST['id'];{/php}&preview=1"></script>
<div id='widgetwci'></div>
<div id='widgetwci'></div>{help id="preview" file="CRM/Wci/Form/CreateWidget"}
</div>
</div>
<div class="clear"></div>
Expand All @@ -32,12 +54,12 @@
<div class="label">{$form.title.label}</div>
<div class="content">{$form.title.html}</div>
<div class="clear"></div>
</div>
</div>
<div class="crm-section">
<div class="label">{$form.logo_image.label}</div>
<div class="content">{$form.logo_image.html} {help id="logo_image" file="CRM/Wci/Form/CreateWidget"}</div>
<div class="clear"></div>
</div>
</div>
<div class="crm-section">
<div class="label">{$form.image.label}</div>
<div class="content">{$form.image.html} {help id="image" file="CRM/Wci/Form/CreateWidget"}</div>
Expand All @@ -55,7 +77,7 @@
</div>
<div class="crm-section">
<div class="label">{$form.progress_bar.label}</div>
<div class="content">{$form.progress_bar.html}</div>
<div class="content">{$form.progress_bar.html}{help id="add-new-pb" file="CRM/Wci/Form/CreateWidget"}</div>
<div class="clear"></div>
</div>
<div class="crm-section">
Expand Down Expand Up @@ -92,16 +114,16 @@
<table class="form-layout-compressed">
<tr>
<td>{$form.hide_title.html}</td>
<td>{$form.hide_title.label}</td>
<td>{$form.hide_title.label}</td>
</tr>
<tr>
<td>{$form.hide_border.html}</td>
<td>{$form.hide_border.label} {help id="hide-border" file="CRM/Wci/Form/CreateWidget"}</td>
</tr>
</tr>
<tr>
<td>{$form.hide_pbcap.html}</td>
<td>{$form.hide_pbcap.label}</td>
</tr>
</tr>
</table>
</div>
</div>
Expand Down
26 changes: 24 additions & 2 deletions templates/CRM/Wci/Form/NewEmbedCode.tpl
Original file line number Diff line number Diff line change
@@ -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 *}
<div class="crm-block crm-form-block">
<div class="crm-submit-buttons">
Expand All @@ -14,7 +36,7 @@
</div>
{/foreach}
{if $form.title.value != ""}
{php}
{php}
if(isset($_REQUEST['id'])) {
$emb_id = $_REQUEST['id'];
$wid_id = CRM_Wci_BAO_EmbedCode::getWidgetId($emb_id);
Expand All @@ -39,7 +61,7 @@
<div class="description">
Add this widget to any web page by copying and pasting the code below.
</div>
<textarea rows="8" cols="40" name="widget_code" id="widget_code"><script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?id={php}echo $emb_id;{/php}&referal_id=2442"> </script>
<textarea rows="8" cols="40" name="widget_code" id="widget_code"><script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?id={php}echo $emb_id;{/php}&referal_id=2442"> </script>
<div id='widgetwci'></div></textarea>
<br>
<strong>
Expand Down
22 changes: 22 additions & 0 deletions templates/CRM/Wci/Form/ProgressBar.tpl
Original file line number Diff line number Diff line change
@@ -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}
<style>
.crm-wci-pb hr {
Expand Down
22 changes: 22 additions & 0 deletions templates/CRM/Wci/Form/WCISettings.tpl
Original file line number Diff line number Diff line change
@@ -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 *}
<div class="crm-block crm-form-block">
<div class="crm-submit-buttons">
Expand Down
45 changes: 22 additions & 23 deletions templates/CRM/Wci/Page/ManageEmbedCode.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
{*<h3>This new page is generated by CRM/Wci/Page/ManageEmbedCode.php</h3>
Example: Display a variable directly
<p>The current time is {$currentTime}</p>*}

{* Example: Display a translated string -- which happens to include a variable
<p>{ts 1=$currentTime}(In your native language) The current time is %1.{/ts}</p>*}

{*
+--------------------------------------------------------------------+
| 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. |
+--------------------------------------------------------------------+
*}
{if $rows}
<div id="configure_contribution_page">
{strip}
Expand Down Expand Up @@ -58,23 +72,8 @@
{/strip}
</div>
{else}
{if $isSearch eq 1}
<div class="status messages">
<img src="{$config->resourceBase}i/Inform.gif" alt="{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}
<div class="spacer"></div>
<ul>
<li>{ts}Check your spelling.{/ts}</li>
<li>{ts}Try a different spelling or use fewer letters.{/ts}</li>
<li>{ts}Make sure you have enough privileges in the access control system.{/ts}</li>
</ul>
{ts 1=$browseURL}Or you can <a href='%1'>browse all available Contribution Pages</a>.{/ts}
</div>
{else}
<div class="messages status no-popup">
<div class="icon inform-icon"></div> &nbsp;
{ts 1=$newPageURL}No embeded code have been selected yet. Click <a accesskey="N" href='embed-code/add'>here</a> to select a wci widget for the embeded code.{/ts}
</div>
{/if}
{/if}
66 changes: 25 additions & 41 deletions templates/CRM/Wci/Page/ProgressBarList.tpl
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{*<h3>This new page is generated by CRM/Wci/Page/ProgressBarList.php</h3> *}

{* Example: Display a variable directly
<p>The current time is {$currentTime}</p>
*}
{* Example: Display a translated string -- which happens to include a variable
<p>{ts 1=$currentTime}(In your native language) The current time is %1.{/ts}</p>
*}

{*
{capture assign=newPageURL}{crmURL p='civicrm/admin/contribute/add' q='action=add&reset=1'}{/capture}
<div id="help">
{ts}CiviContribute allows you to create and maintain any number of Online Contribution Pages. You can create different pages for different programs or campaigns - and customize text, amounts, types of information collected from contributors, etc.{/ts} {help id="id-intro"}
</div>
{include file="CRM/Contribute/Form/SearchContribution.tpl"}
{if NOT ($action eq 1 or $action eq 2) }
<table class="form-layout-compressed">
<tr>
<td><a href="{$newPageURL}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contribution Page{/ts}</span></a></td>
<td style="vertical-align: top"><a class="button" href="{crmURL p="civicrm/admin/pcp" q="reset=1"}"><span>{ts}Manage Personal Campaign Pages{/ts}</span></a> {help id="id-pcp-intro" file="CRM/PCP/Page/PCP.hlp"}</td>
</tr>
</table>
{/if}
+--------------------------------------------------------------------+
| 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. |
+--------------------------------------------------------------------+
*}
{if $rows}
<div id="configure_contribution_page">
Expand Down Expand Up @@ -64,34 +61,21 @@

<div class="crm-contribution-page-more">
{$row.action|replace:'xx':$row.id}
</div>

</div>
</td>

</tr>
{/foreach}
</table>

{/strip}
</div>
<div class="description">
To use a progress bar, <a accesskey="N" href='widget/add'>create</a> a widget and associate it with the progressbar.
</div>
{else}
{if $isSearch eq 1}
<div class="status messages">
<img src="{$config->resourceBase}i/Inform.gif" alt="{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}
<div class="spacer"></div>
<ul>
<li>{ts}Check your spelling.{/ts}</li>
<li>{ts}Try a different spelling or use fewer letters.{/ts}</li>
<li>{ts}Make sure you have enough privileges in the access control system.{/ts}</li>
</ul>
{ts 1=$browseURL}Or you can <a href='%1'>browse all available Contribution Pages</a>.{/ts}
</div>
{else}
<div class="messages status no-popup">
<div class="icon inform-icon"></div> &nbsp;
{ts 1=$newPageURL}No Progressbars have been created yet. Click <a accesskey="N" href='progress-bar/add'>here</a> to create a new Progressbar.{/ts}
</div>
{/if}

{/if}
Loading

0 comments on commit 093e2f9

Please sign in to comment.