multicurrency - delete old D6 module
authorColeman Watts <coleman@civicrm.org>
Wed, 26 Oct 2016 19:15:17 +0000 (15:15 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 26 Oct 2016 19:15:17 +0000 (15:15 -0400)
tools/drupal/modules/multicurrency/multicurrency.info [deleted file]
tools/drupal/modules/multicurrency/multicurrency.module [deleted file]
tools/drupal/modules/multicurrency/multicurrency.module.discount [deleted file]
tools/drupal/modules/multicurrency/multicurrency.module.original [deleted file]
tools/drupal/modules/multicurrency/templates/CRM/Event/Form/Registration/4/Register.tpl [deleted file]
tools/drupal/modules/multicurrency/templates/CRM/Event/Form/Registration/8/Register.tpl [deleted file]
tools/drupal/modules/multicurrency/templates/CRM/Event/Page/4/EventInfo.tpl [deleted file]
tools/drupal/modules/multicurrency/templates/CRM/Event/Page/8/EventInfo.tpl [deleted file]

diff --git a/tools/drupal/modules/multicurrency/multicurrency.info b/tools/drupal/modules/multicurrency/multicurrency.info
deleted file mode 100755 (executable)
index 5d9dfef..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-name = Multi Currency Support for CiviCRM\r
-description = Multi Currency Support for a specific Event\r
-version = 3.4\r
-dependencies[] = civicrm\r
-package = CiviCRM\r
-core = 6.x\r
-php = 5.2\r
diff --git a/tools/drupal/modules/multicurrency/multicurrency.module b/tools/drupal/modules/multicurrency/multicurrency.module
deleted file mode 100644 (file)
index 62d9f52..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM 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 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 CiviCRM LLC       |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
- * $Id$
- *
- */
-
-define('MULTICURRENCY_EVENT_ID_1', 4);
-define('MULTICURRENCY_EVENT_ID_2', 8);
-define('DISCOUNT_EVENT_ID_1', 4);
-define('DISCOUNT_EVENT_ID_2', 8);
-/**
- * @param $formName
- * @param $form
- */
-function multicurrency_civicrm_buildForm($formName,
-  &$form
-) {
-  if ((strpos($formName, 'CRM_Event_Form_Registration_') !== FALSE) &&
-    (($form->getVar('_eventId') == MULTICURRENCY_EVENT_ID_1) ||
-      ($form->getVar('_eventId') == MULTICURRENCY_EVENT_ID_2)
-    )
-  ) {
-    multicurrency_set_currency($form);
-  }
-
-  //------- Coupon field --------//
-  if ($formName == 'CRM_Event_Form_Registration_Register' &&
-    (($form->getVar('_eventId') == DISCOUNT_EVENT_ID_1) ||
-      ($form->getVar('_eventId') == DISCOUNT_EVENT_ID_2)
-    )
-  ) {
-    $form->addElement('text', 'discountCode', ts('Discount Code'));
-
-    // also assign to template
-    $template = &CRM_Core_Smarty::singleton();
-    $beginHookFormElements = $template->get_template_vars('beginHookFormElements');
-    if (!$beginHookFormElements) {
-      $beginHookFormElements = array();
-    }
-    $beginHookFormElements[] = 'discountCode';
-    //$form->assign( 'beginHookFormElements', $beginHookFormElements );
-
-    $discountCode = CRM_Utils_Request::retrieve('discountCode', 'String', $form, FALSE, NULL, $_REQUEST);
-    if ($discountCode) {
-      $defaults = array('discountCode' => $discountCode);
-      $form->setDefaults($defaults);
-    }
-  }
-}
-
-/**
- * @param $form
- *
- * @return string
- */
-function multicurrency_set_currency(&$form) {
-  static $processed = FALSE;
-
-  if ($processed) {
-    return;
-  }
-
-  $processed = TRUE;
-  $currency  = CRM_Utils_Request::retrieve('currency', 'String', $form, FALSE, 'GBP');
-  $config    = &CRM_Core_Config::singleton();
-  if (strtoupper($currency) == 'EUR') {
-    $config->defaultCurrency = 'EUR';
-  }
-  else {
-    $config->defaultCurrency = 'GBP';
-  }
-
-  return $config->defaultCurrency;
-}
-
-/**
- * @param $pageType
- * @param $form
- * @param $amount
- */
-function multicurrency_civicrm_buildAmount($pageType,
-  &$form,
-  &$amount
-) {
-
-  // only modify the event pages for the UK event
-  if (($form->getVar('_eventId') == MULTICURRENCY_EVENT_ID_1) ||
-    ($form->getVar('_eventId') == MULTICURRENCY_EVENT_ID_2)
-  ) {
-    $currency = multicurrency_set_currency($form);
-
-    // as of may 5th: 1 USD = 0.75 EUR, 1 USD = 0.667 GBP
-    $ratio = ($currency == 'EUR') ? 0.75 : (2.0 / 3.0);
-
-    foreach ($amount as $amountID => & $amountInfo) {
-      $amountInfo['value'] = ceil($amountInfo['value'] * $ratio);
-    }
-  }
-
-  //---- DISCOUNT Code ----//
-  $eventID = $form->getVar('_eventId');
-  if ($pageType != 'event' ||
-    ($eventID != DISCOUNT_EVENT_ID_1 && $eventID != DISCOUNT_EVENT_ID_2)
-  ) {
-    return;
-  }
-
-  $discountCode = CRM_Utils_Request::retrieve('discountCode', 'String', $form, FALSE, NULL, $_REQUEST);
-  if (!$discountCode) {
-    return;
-  }
-
-  list($discountID, $discountPercent, $discountNumber) = _multicurrency_discountHelper($eventID, $discountCode);
-  if ($discountNumber <= 0) {
-    // no more discount left
-    return;
-  }
-
-  foreach ($amount as $amountId => $amountInfo) {
-    $amount[$amountId]['value'] = $amount[$amountId]['value'] - ceil($amount[$amountId]['value'] * $discountPercent / 100);
-    $amount[$amountId]['label'] = $amount[$amountId]['label'] . "\t - with {$discountPercent}% discount";
-  }
-}
-
-/**
- * @param $page
- */
-function multicurrency_civicrm_pageRun(&$page) {
-
-  if ($page->getVar('_name') == 'CRM_Event_Page_EventInfo' &&
-    (($page->getVar('_id') == MULTICURRENCY_EVENT_ID_1) ||
-      ($page->getVar('_id') == MULTICURRENCY_EVENT_ID_2)
-    )
-  ) {
-    multicurrency_set_currency($page);
-  }
-}
-
-//---- Discount using codes ------//
-/**
- * @param $eventID
- * @param $discountCode
- *
- * @return array
- */
-function _multicurrency_discountHelper($eventID, $discountCode) {
-  $sql = "
-SELECT v.id as id, v.value as value, v.weight as weight
-FROM   civicrm_option_value v,
-       civicrm_option_group g
-WHERE  v.option_group_id = g.id
-AND    v.name = %1
-AND    g.name = %2
-
-";
-  $params = array(1 => array($discountCode, 'String'),
-    2 => array("event_discount_{$eventID}", 'String'),
-  );
-  $dao = CRM_Core_DAO::executeQuery($sql, $params);
-  if ($dao->fetch()) {
-    // ensure discountPercent is a valid numeric number <= 100
-    if ($dao->value &&
-      is_numeric($dao->value) &&
-      $dao->value >= 0 &&
-      $dao->value <= 100 &&
-      is_numeric($dao->weight)
-    ) {
-      return array($dao->id, $dao->value, $dao->weight);
-    }
-  }
-  return array(NULL, NULL, NULL);
-}
-
-/*
- * The hook updates the random code used with event signup.
- */
-/**
- * @param $class
- * @param $form
- */
-function multicurrency_civicrm_postProcess($class, &$form) {
-  $eventID = $form->getVar('_eventId');
-  if (!is_a($form, 'CRM_Event_Form_Registration_Confirm') ||
-    ($eventID != DISCOUNT_EVENT_ID_1 && $eventID != DISCOUNT_EVENT_ID_2)
-  ) {
-    return;
-  }
-
-  $discountCode = CRM_Utils_Request::retrieve('discountCode', 'String', $form, FALSE, NULL, $_REQUEST);
-  if (!$discountCode) {
-    return;
-  }
-
-  list($discountID, $discountPercent, $discountNumber) = _multicurrency_discountHelper($eventID, $discountCode);
-  if (!$discountID ||
-    $discountNumber <= 0 ||
-    $discountNumber == 123456789
-  ) {
-    return;
-  }
-
-  $query = "
-UPDATE civicrm_option_value v
-SET    v.weight = v.weight - 1
-WHERE  v.id = %1
-AND    v.weight > 0
-";
-  $params = array(1 => array($discountID, 'Integer'));
-
-  CRM_Core_DAO::executeQuery($query, $params);
-}
-
diff --git a/tools/drupal/modules/multicurrency/multicurrency.module.discount b/tools/drupal/modules/multicurrency/multicurrency.module.discount
deleted file mode 100644 (file)
index 5abdd7a..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-<?php
-
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM 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 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 CiviCRM LLC       |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
- * $Id$
- *
- */
-
-define( 'MULTICURRENCY_EVENT_ID', 4  );
-define( 'DISCOUNT_EVENT_ID',      4  );
-
-function multicurrency_civicrm_buildForm( $formName,
-            &$form ) {
-    if ( ( strpos( $formName, 'CRM_Event_Form_Registration_' ) !== false ) &&
-   ( $form->getVar( '_eventId' ) == MULTICURRENCY_EVENT_ID ) ) {
-      multicurrency_set_currency( $form );
-    }
-
-    //------- Coupon field --------//
-    if ( $formName == 'CRM_Event_Form_Registration_Register' &&
-         $form->getVar( '_eventId' ) == DISCOUNT_EVENT_ID ) {
-        $form->addElement( 'text', 'discountCode', ts( 'Discount Code' ) );
-
-        // also assign to template
-        $template =& CRM_Core_Smarty::singleton( );
-        $beginHookFormElements = $template->get_template_vars( 'beginHookFormElements' );
-        if ( ! $beginHookFormElements ) {
-            $beginHookFormElements = array( );
-        }
-        $beginHookFormElements[] = 'discountCode';
-        $form->assign( 'beginHookFormElements', $beginHookFormElements );
-
-        $discountCode = CRM_Utils_Request::retrieve( 'discountCode', 'String', $form, false, null, $_REQUEST );
-        if ( $discountCode ) {
-            $defaults = array( 'discountCode' => $discountCode );
-            $form->setDefaults( $defaults );
-        }
-    }
-}
-
-function multicurrency_set_currency( &$form ) {
-    static $processed = false;
-
-    if ( $processed ) {
-        return;
-    }
-
-    $processed = true;
-    $currency  = CRM_Utils_Request::retrieve( 'currency', 'String', $form, false, 'GBP' );
-    $config    =& CRM_Core_Config::singleton( );
-    if ( strtoupper( $currency ) == 'EUR' ) {
-        $config->defaultCurrency = 'EUR';
-    } else {
-        $config->defaultCurrency = 'GBP';
-    }
-
-    return $config->defaultCurrency;
-}
-
-function multicurrency_civicrm_buildAmount( $pageType,
-              &$form,
-              &$amount ) {
-
-  // only modify the event pages for the UK event
-  if ( $form->getVar( '_eventId' ) == MULTICURRENCY_EVENT_ID ) {
-    $currency = multicurrency_set_currency( $form );
-
-    // as of may 5th: 1 USD = 0.75 EUR, 1 USD = 0.667 GBP
-    $ratio = ( $currency == 'EUR' ) ? 0.75 : ( 2.0 / 3.0 );
-
-    foreach ( $amount as $amountID =>& $amountInfo ) {
-      $amountInfo['value'] = ceil( $amountInfo['value'] * $ratio );
-    }
-  }
-
-    //---- DISCOUNT Code ----//
-    $eventID = $form->getVar( '_eventId' );
-    if ( $pageType != 'event' ||
-         $eventID  != DISCOUNT_EVENT_ID ) {
-        return;
-    }
-
-    $discountCode = CRM_Utils_Request::retrieve( 'discountCode', 'String', $form, false, null, $_REQUEST );
-    if ( ! $discountCode ) {
-        return;
-    }
-
-    list( $discountID, $discountPercent, $discountNumber ) = _multicurrency_discountHelper( $eventID, $discountCode );
-    if ( $discountNumber <= 0 ) {
-        // no more discount left
-        return;
-    }
-
-    foreach ( $amount as $amountId => $amountInfo ) {
-        $amount[$amountId]['value'] = $amount[$amountId]['value'] -
-            ceil($amount[$amountId]['value'] * $discountPercent / 100);
-        $amount[$amountId]['label'] = $amount[$amountId]['label'] .
-            "\t - with {$discountPercent}% discount";
-    }
-}
-
-function multicurrency_civicrm_pageRun( &$page ) {
-
-  if ( $page->getVar( '_name' ) == 'CRM_Event_Page_EventInfo' &&
-       $page->getVar( '_id' )   == MULTICURRENCY_EVENT_ID ) {
-    multicurrency_set_currency( $page );
-  }
-
-}
-
-//---- Discount using codes ------//
-function _multicurrency_discountHelper( $eventID, $discountCode ) {
-    $sql = "
-SELECT v.id as id, v.value as value, v.weight as weight
-FROM   civicrm_option_value v,
-       civicrm_option_group g
-WHERE  v.option_group_id = g.id
-AND    v.name = %1
-AND    g.name = %2
-
-";
-    $params = array( 1 => array( $discountCode              , 'String' ),
-                     2 => array( "event_discount_{$eventID}", 'String' ) );
-    $dao = CRM_Core_DAO::executeQuery( $sql, $params );
-    if ( $dao->fetch( ) ) {
-        // ensure discountPercent is a valid numeric number <= 100
-        if ( $dao->value &&
-             is_numeric( $dao->value ) &&
-             $dao->value >= 0 &&
-             $dao->value <= 100 &&
-             is_numeric( $dao->weight ) ) {
-            return array( $dao->id, $dao->value, $dao->weight );
-        }
-    }
-    return array( null, null, null );
-
-}
-
-/*
- * The hook updates the random code used with event signup.
- */
-function multicurrency_civicrm_postProcess( $class, &$form ) {
-    $eventID = $form->getVar( '_eventId' );
-    if ( ! is_a($form, 'CRM_Event_Form_Registration_Confirm') ||
-         $eventID != DISCOUNT_EVENT_ID ) {
-        return;
-    }
-
-    $discountCode = CRM_Utils_Request::retrieve( 'discountCode', 'String', $form, false, null, $_REQUEST );
-    if ( ! $discountCode ) {
-        return;
-    }
-
-    list( $discountID, $discountPercent, $discountNumber ) = _multicurrency_discountHelper( $eventID, $discountCode );
-    if ( ! $discountID ||
-         $discountNumber <= 0 ||
-         $discountNumber == 123456789 ) {
-        return;
-    }
-
-    $query = "
-UPDATE civicrm_option_value v
-SET    v.weight = v.weight - 1
-WHERE  v.id = %1
-AND    v.weight > 0
-";
-    $params = array( 1 => array( $discountID, 'Integer' ) );
-
-    CRM_Core_DAO::executeQuery( $query, $params );
-}
diff --git a/tools/drupal/modules/multicurrency/multicurrency.module.original b/tools/drupal/modules/multicurrency/multicurrency.module.original
deleted file mode 100644 (file)
index 89b34ba..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM 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 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 CiviCRM LLC       |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
- * $Id$
- *
- */
-
-define( 'MULTICURRENCY_EVENT_ID', 4 );
-
-function multicurrency_civicrm_buildForm( $formName,
-            &$form ) {
-    if ( ( strpos( $formName, 'CRM_Event_Form_Registration_' ) !== false ) &&
-   ( $form->getVar( '_eventId' ) == MULTICURRENCY_EVENT_ID ) ) {
-      multicurrency_set_currency( $form );
-    }
-}
-
-function multicurrency_set_currency( &$form ) {
-    static $processed = false;
-
-    if ( $processed ) {
-        return;
-    }
-
-    $processed = true;
-    $currency  = CRM_Utils_Request::retrieve( 'currency', 'String', $form, false, 'GBP' );
-    $config    =& CRM_Core_Config::singleton( );
-    if ( strtoupper( $currency ) == 'EUR' ) {
-        $config->defaultCurrency = 'EUR';
-    } else {
-        $config->defaultCurrency = 'GBP';
-    }
-
-    return $config->defaultCurrency;
-}
-
-function multicurrency_civicrm_buildAmount( $pageType,
-              &$form,
-              &$amount ) {
-
-  // only modify the event pages for the UK event
-  if ( $form->getVar( '_eventId' ) == MULTICURRENCY_EVENT_ID ) {
-    $currency = multicurrency_set_currency( $form );
-
-    // as of may 5th: 1 USD = 0.75 EUR, 1 USD = 0.667 GBP
-    $ratio = ( $currency == 'EUR' ) ? 0.75 : ( 2.0 / 3.0 );
-
-    foreach ( $amount as $amountID =>& $amountInfo ) {
-      $amountInfo['value'] = ceil( $amountInfo['value'] * $ratio );
-    }
-  }
-}
-
-function multicurrency_civicrm_pageRun( &$page ) {
-
-  if ( $page->getVar( '_name' ) == 'CRM_Event_Page_EventInfo' &&
-       $page->getVar( '_id' )   == MULTICURRENCY_EVENT_ID ) {
-    multicurrency_set_currency( $page );
-  }
-
-}
-
diff --git a/tools/drupal/modules/multicurrency/templates/CRM/Event/Form/Registration/4/Register.tpl b/tools/drupal/modules/multicurrency/templates/CRM/Event/Form/Registration/4/Register.tpl
deleted file mode 100644 (file)
index 73fea2f..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-{if $action & 1024}
-    {include file="CRM/Event/Form/Registration/PreviewHeader.tpl"}
-{/if}
-
-<div class="form-item">
-{if $event.intro_text}
-    <div id="intro_text">
-        <p>{$event.intro_text}</p>
-    </div>
-{/if}
-
-{if $priceSet}
-    <fieldset id="priceset"><legend>{$event.fee_label}</legend>
-    <dl>
-{if $priceSet.help_pre}
-  <dt>&nbsp;</dt>
-  <dd class="description">{$priceSet.help_pre}</dd>
-{/if}
-    {foreach from=$priceSet.fields item=element key=field_id}
-        {if ($element.html_type eq 'CheckBox' || $element.html_type == 'Radio') && $element.options_per_line}
-            {assign var="element_name" value=price_$field_id}
-            <dt style="margin-top: .5em;">{$form.$element_name.label}</dt>
-            <dd>
-            {assign var="count" value="1"}
-                <table class="form-layout-compressed">
-                    <tr>
-                    {foreach name=outer key=key item=item from=$form.$element_name}
-                        {if is_numeric($key) }
-                                <td class="labels font-light">{$form.$element_name.$key.html}</td>
-                            {if $count == $element.options_per_line}
-                            {assign var="count" value="1"}
-                            </tr>
-                            <tr>
-                            {else}
-                                {assign var="count" value=`$count+1`}
-                            {/if}
-                        {/if}
-                {/foreach}
-                    </tr>
-                </table>
-            </dd>
-        {else}
-            {assign var="name" value=`$element.name`}
-            {assign var="element_name" value="price_"|cat:$field_id}
-            <dt>{$form.$element_name.label}</dt>
-            <dd>&nbsp;{$form.$element_name.html}</dd>
-        {/if}
-        {if $element.help_post}
-            <dt>&nbsp;</dt>
-            <dd class="description">{$element.help_post}</dd>
-        {/if}
-    {/foreach}
-<div class="form-item">
-     <dt></dt>
-     <dd>{include file="CRM/Event/Form/CalculatePriceset.tpl"}</dd>
-</div>
-{if $priceSet.help_post}
-  <dt>&nbsp;</dt>
-  <dd class="description">{$priceSet.help_post}</dd>
-{/if}
-    </dl>
-    </fieldset>
-    <dl>
-        {if $form.is_pay_later}
-            <dt>&nbsp;</dt>
-            <dd>{$form.is_pay_later.html}&nbsp;{$form.is_pay_later.label}</dd>
-        {/if}
-    </dl>
-{else}
-    {if $paidEvent}
-<div class="status">
-{if $config->defaultCurrency eq 'EUR'}
-{ts}If you want to pay in pounds, click {/ts}<a href="{crmURL p='civicrm/event/register' q="reset=1&id=`$event.id`&currency=GBP"}"title="{ts}Pay for Camp in pounds.{/ts}"><strong>{ts}here{/ts}</strong></a>
-{else}
-{ts}If you want to pay in euros, click {/ts}<a href="{crmURL p='civicrm/event/register' q="reset=1&id=`$event.id`&currency=EUR"}"title="{ts}Pay for Camp in euros.{/ts}"><strong>{ts}here{/ts}</strong></a>
-{/if}
-
-</div>
-     <table class="form-layout-compressed">
-        <tr><td class="label nowrap">{$event.fee_label} <span class="crm-marker">*</span></td>
-            <td>&nbsp;</td>
-            <td>{$form.amount.html}</td>
-        </tr>
-        {if $form.is_pay_later}
-        <tr><td>&nbsp;</td>
-            <td>&nbsp;</td>
-            <td>{$form.is_pay_later.html}&nbsp;{$form.is_pay_later.label}</td>
-        </tr>
-        {/if}
-    </table>
-    {/if}
-{/if}
-
-{assign var=n value=email-$bltID}
-<table class="form-layout-compressed">
-    <tr><td class="label nowrap">{$form.$n.label}</td><td>{$form.$n.html}</td></tr>
- </table>
- {if $form.additional_participants.html}
-    <div id="noOfparticipants_show">
-        <a href="#" class="button" onclick="hide('noOfparticipants_show'); show('noOfparticipants'); document.getElementById('additional_participants').focus(); return false;"><span>&raquo; {ts}Register additional people for this event{/ts}</span></a>
-    </div><div class="spacer"></div>
- {/if}
-    <div id="noOfparticipants" style="display:none">
-        <div class="form-item">
-            <table class="form-layout">
-            <tr><td><a href="#" onclick="hide('noOfparticipants'); show('noOfparticipants_show'); return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}close section{/ts}"/></a></a>
-                    <label>{$form.additional_participants.label}</label></td>
-                <td>{$form.additional_participants.html|crmReplace:class:two}<br />
-                    <span class="description">{ts}You will be able to enter registration information for each additional person after you complete this page and click Continue.{/ts}</span>
-                </td>
-             </tr>
-            </table>
-        </div>
-    </div>
-
-{* User account registration option. Displays if enabled for one of the profiles on this page. *}
-{include file="CRM/common/CMSUser.tpl"}
-
-{include file="CRM/UF/Form/Block.tpl" fields=$customPre}
-
-{if $paidEvent}
-    {include file='CRM/Core/BillingBlock.tpl'}
-{/if}
-
-{include file="CRM/UF/Form/Block.tpl" fields=$customPost}
-
-{if $isCaptcha}
-  {include file='CRM/common/ReCAPTCHA.tpl'}
-{/if}
-
-<div id="paypalExpress">
-{* Put PayPal Express button after customPost block since it's the submit button in this case. *}
-{if $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}
-    {assign var=expressButtonName value='_qf_Register_upload_express'}
-    <fieldset><legend>{ts}Checkout with PayPal{/ts}</legend>
-    <table class="form-layout-compressed">
-    <tr><td class="description">{ts}Click the PayPal button to continue.{/ts}</td></tr>
-    <tr><td>{$form.$expressButtonName.html} <span style="font-size:11px; font-family: Arial, Verdana;">{ts}Checkout securely. Pay without sharing your financial information.{/ts}</span></td></tr>
-    </table>
-    </fieldset>
-{/if}
-</div>
-
-   <div id="crm-submit-buttons">
-     {$form.buttons.html}
-   </div>
-
-    {if $event.footer_text}
-        <div id="footer_text">
-            <p>{$event.footer_text}</p>
-        </div>
-    {/if}
-</div>
-
-{* Hide Credit Card Block and Billing information if registration is pay later. *}
-{if $form.is_pay_later and $hidePaymentInformation}
-{include file="CRM/common/showHideByFieldValue.tpl"
-    trigger_field_id    ="is_pay_later"
-    trigger_value       =""
-    target_element_id   ="payment_information"
-    target_element_type ="table-row"
-    field_type          ="radio"
-    invert              = 1
-}
-{/if}
-{literal}
-<script type="text/javascript">
-
-    function allowParticipant( ) {
-  var additionalParticipant = document.getElementById('additional_participants').value;
-  var validNumber = "";
-  for( i = 0; i< additionalParticipant.length; i++ ) {
-      if ( additionalParticipant.charAt(i) >=1 || additionalParticipant.charAt(i) <=9 ) {
-    validNumber += additionalParticipant.charAt(i);
-      } else {
-    document.getElementById('additional_participants').value = validNumber;
-      }
-  }
-    }
-    {/literal}{if $form.is_pay_later and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}{literal}
-  showHidePayPalExpressOption();
-    {/literal} {/if}{literal}
-    function showHidePayPalExpressOption()
-    {
-        if (document.getElementsByName("is_pay_later")[0].checked) {
-      show("crm-submit-buttons");
-      hide("paypalExpress");
-  } else {
-            show("paypalExpress");
-            hide("crm-submit-buttons");
-        }
-    }
-
-</script>
-{/literal}
diff --git a/tools/drupal/modules/multicurrency/templates/CRM/Event/Form/Registration/8/Register.tpl b/tools/drupal/modules/multicurrency/templates/CRM/Event/Form/Registration/8/Register.tpl
deleted file mode 100644 (file)
index 73fea2f..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-{if $action & 1024}
-    {include file="CRM/Event/Form/Registration/PreviewHeader.tpl"}
-{/if}
-
-<div class="form-item">
-{if $event.intro_text}
-    <div id="intro_text">
-        <p>{$event.intro_text}</p>
-    </div>
-{/if}
-
-{if $priceSet}
-    <fieldset id="priceset"><legend>{$event.fee_label}</legend>
-    <dl>
-{if $priceSet.help_pre}
-  <dt>&nbsp;</dt>
-  <dd class="description">{$priceSet.help_pre}</dd>
-{/if}
-    {foreach from=$priceSet.fields item=element key=field_id}
-        {if ($element.html_type eq 'CheckBox' || $element.html_type == 'Radio') && $element.options_per_line}
-            {assign var="element_name" value=price_$field_id}
-            <dt style="margin-top: .5em;">{$form.$element_name.label}</dt>
-            <dd>
-            {assign var="count" value="1"}
-                <table class="form-layout-compressed">
-                    <tr>
-                    {foreach name=outer key=key item=item from=$form.$element_name}
-                        {if is_numeric($key) }
-                                <td class="labels font-light">{$form.$element_name.$key.html}</td>
-                            {if $count == $element.options_per_line}
-                            {assign var="count" value="1"}
-                            </tr>
-                            <tr>
-                            {else}
-                                {assign var="count" value=`$count+1`}
-                            {/if}
-                        {/if}
-                {/foreach}
-                    </tr>
-                </table>
-            </dd>
-        {else}
-            {assign var="name" value=`$element.name`}
-            {assign var="element_name" value="price_"|cat:$field_id}
-            <dt>{$form.$element_name.label}</dt>
-            <dd>&nbsp;{$form.$element_name.html}</dd>
-        {/if}
-        {if $element.help_post}
-            <dt>&nbsp;</dt>
-            <dd class="description">{$element.help_post}</dd>
-        {/if}
-    {/foreach}
-<div class="form-item">
-     <dt></dt>
-     <dd>{include file="CRM/Event/Form/CalculatePriceset.tpl"}</dd>
-</div>
-{if $priceSet.help_post}
-  <dt>&nbsp;</dt>
-  <dd class="description">{$priceSet.help_post}</dd>
-{/if}
-    </dl>
-    </fieldset>
-    <dl>
-        {if $form.is_pay_later}
-            <dt>&nbsp;</dt>
-            <dd>{$form.is_pay_later.html}&nbsp;{$form.is_pay_later.label}</dd>
-        {/if}
-    </dl>
-{else}
-    {if $paidEvent}
-<div class="status">
-{if $config->defaultCurrency eq 'EUR'}
-{ts}If you want to pay in pounds, click {/ts}<a href="{crmURL p='civicrm/event/register' q="reset=1&id=`$event.id`&currency=GBP"}"title="{ts}Pay for Camp in pounds.{/ts}"><strong>{ts}here{/ts}</strong></a>
-{else}
-{ts}If you want to pay in euros, click {/ts}<a href="{crmURL p='civicrm/event/register' q="reset=1&id=`$event.id`&currency=EUR"}"title="{ts}Pay for Camp in euros.{/ts}"><strong>{ts}here{/ts}</strong></a>
-{/if}
-
-</div>
-     <table class="form-layout-compressed">
-        <tr><td class="label nowrap">{$event.fee_label} <span class="crm-marker">*</span></td>
-            <td>&nbsp;</td>
-            <td>{$form.amount.html}</td>
-        </tr>
-        {if $form.is_pay_later}
-        <tr><td>&nbsp;</td>
-            <td>&nbsp;</td>
-            <td>{$form.is_pay_later.html}&nbsp;{$form.is_pay_later.label}</td>
-        </tr>
-        {/if}
-    </table>
-    {/if}
-{/if}
-
-{assign var=n value=email-$bltID}
-<table class="form-layout-compressed">
-    <tr><td class="label nowrap">{$form.$n.label}</td><td>{$form.$n.html}</td></tr>
- </table>
- {if $form.additional_participants.html}
-    <div id="noOfparticipants_show">
-        <a href="#" class="button" onclick="hide('noOfparticipants_show'); show('noOfparticipants'); document.getElementById('additional_participants').focus(); return false;"><span>&raquo; {ts}Register additional people for this event{/ts}</span></a>
-    </div><div class="spacer"></div>
- {/if}
-    <div id="noOfparticipants" style="display:none">
-        <div class="form-item">
-            <table class="form-layout">
-            <tr><td><a href="#" onclick="hide('noOfparticipants'); show('noOfparticipants_show'); return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}close section{/ts}"/></a></a>
-                    <label>{$form.additional_participants.label}</label></td>
-                <td>{$form.additional_participants.html|crmReplace:class:two}<br />
-                    <span class="description">{ts}You will be able to enter registration information for each additional person after you complete this page and click Continue.{/ts}</span>
-                </td>
-             </tr>
-            </table>
-        </div>
-    </div>
-
-{* User account registration option. Displays if enabled for one of the profiles on this page. *}
-{include file="CRM/common/CMSUser.tpl"}
-
-{include file="CRM/UF/Form/Block.tpl" fields=$customPre}
-
-{if $paidEvent}
-    {include file='CRM/Core/BillingBlock.tpl'}
-{/if}
-
-{include file="CRM/UF/Form/Block.tpl" fields=$customPost}
-
-{if $isCaptcha}
-  {include file='CRM/common/ReCAPTCHA.tpl'}
-{/if}
-
-<div id="paypalExpress">
-{* Put PayPal Express button after customPost block since it's the submit button in this case. *}
-{if $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}
-    {assign var=expressButtonName value='_qf_Register_upload_express'}
-    <fieldset><legend>{ts}Checkout with PayPal{/ts}</legend>
-    <table class="form-layout-compressed">
-    <tr><td class="description">{ts}Click the PayPal button to continue.{/ts}</td></tr>
-    <tr><td>{$form.$expressButtonName.html} <span style="font-size:11px; font-family: Arial, Verdana;">{ts}Checkout securely. Pay without sharing your financial information.{/ts}</span></td></tr>
-    </table>
-    </fieldset>
-{/if}
-</div>
-
-   <div id="crm-submit-buttons">
-     {$form.buttons.html}
-   </div>
-
-    {if $event.footer_text}
-        <div id="footer_text">
-            <p>{$event.footer_text}</p>
-        </div>
-    {/if}
-</div>
-
-{* Hide Credit Card Block and Billing information if registration is pay later. *}
-{if $form.is_pay_later and $hidePaymentInformation}
-{include file="CRM/common/showHideByFieldValue.tpl"
-    trigger_field_id    ="is_pay_later"
-    trigger_value       =""
-    target_element_id   ="payment_information"
-    target_element_type ="table-row"
-    field_type          ="radio"
-    invert              = 1
-}
-{/if}
-{literal}
-<script type="text/javascript">
-
-    function allowParticipant( ) {
-  var additionalParticipant = document.getElementById('additional_participants').value;
-  var validNumber = "";
-  for( i = 0; i< additionalParticipant.length; i++ ) {
-      if ( additionalParticipant.charAt(i) >=1 || additionalParticipant.charAt(i) <=9 ) {
-    validNumber += additionalParticipant.charAt(i);
-      } else {
-    document.getElementById('additional_participants').value = validNumber;
-      }
-  }
-    }
-    {/literal}{if $form.is_pay_later and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}{literal}
-  showHidePayPalExpressOption();
-    {/literal} {/if}{literal}
-    function showHidePayPalExpressOption()
-    {
-        if (document.getElementsByName("is_pay_later")[0].checked) {
-      show("crm-submit-buttons");
-      hide("paypalExpress");
-  } else {
-            show("paypalExpress");
-            hide("crm-submit-buttons");
-        }
-    }
-
-</script>
-{/literal}
diff --git a/tools/drupal/modules/multicurrency/templates/CRM/Event/Page/4/EventInfo.tpl b/tools/drupal/modules/multicurrency/templates/CRM/Event/Page/4/EventInfo.tpl
deleted file mode 100644 (file)
index d215b86..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{* this template is used for displaying event information *}
-
-<div class="vevent">
-  <h2><span class="summary">{$event.title}</span></h2>
-    <div class="display-block">
-  <table class="form-layout">
-        {if $event.summary}
-    <tr><td colspan="2" class="report">{$event.summary}</td></tr>
-        {/if}
-        {if $event.description}
-          <tr><td colspan="2" class="report">
-    <span class="summary">{$event.description}</span></td></tr>
-  {/if}
-  <tr><td><label>{ts}When{/ts}</label></td>
-            <td width="90%">
-      <abbr class="dtstart" title="{$event.event_start_date|crmDate}">
-        {$event.event_start_date|crmDate}</abbr>
-
-  {if $event.event_end_date}
-    &nbsp; {ts}through{/ts} &nbsp;
-                {* Only show end time if end date = start date *}
-                {if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}
-      <abbr class="dtend" title="{$event.event_end_date|crmDate:0:1}">
-      {$event.event_end_date|crmDate:0:1}
-      </abbr>
-                {else}
-      <abbr class="dtend" title="{$event.event_end_date|crmDate}">
-      {$event.event_end_date|crmDate}
-      </abbr>
-                {/if}
-            {/if}
-            </td>
-  </tr>
-
-  {if $isShowLocation}
-        {if $location.1.name || $location.1.address}
-            <tr><td><label>{ts}Location{/ts}</label></td>
-                <td>
-                {if $location.1.name}
-                    <span class="fn org">{$location.1.name}</span><br />
-                {/if}
-                {$location.1.address.display|nl2br}
-                {if ( $event.is_map && $config->mapAPIKey && ( is_numeric($location.1.address.geo_code_1)  || ( $location.1.address.city AND $location.1.address.state_province ) ) ) }
-                    <br/><a href="{$mapURL}" title="{ts}Map this Address{/ts}">{ts}Map this Location{/ts}</a>
-                {/if}
-                </td>
-            </tr>
-    {/if}
-        {/if}{*End of isShowLocation condition*}
-
-  {if $location.1.phone.1.phone || $location.1.email.1.email}
-        <tr><td><label>{ts}Contact{/ts}</label></td>
-            <td>  {* loop on any phones and emails for this event *}
-            {foreach from=$location.1.phone item=phone}
-                {if $phone.phone}
-                    {if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}:
-                    <span class="tel">{$phone.phone}</span> <br />
-                    {/if}
-                {/foreach}
-
-            {foreach from=$location.1.email item=email}
-                {if $email.email}
-                    {ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
-                {/if}
-            {/foreach}
-            </td>
-        </tr>
-    {/if}
-  </table>
-
-    {include file="CRM/Custom/Page/CustomDataView.tpl"}
-
-    {* Show link to Event Registration page if event if configured for online reg AND we are NOT coming from Contact Dashboard (CRM-2046) *}
-    {if $is_online_registration AND $context NEQ 'dashboard'}
-        <div class="action-link">
-            <strong><a href="{$registerURL}" title="{$registerText}">&raquo; {$registerText}</a></strong>
-        </div>
-    {/if}
-    { if $event.is_public }
-        <br />{include file="CRM/Event/Page/iCalLinks.tpl"}
-    {/if}
-  </div>
-</div>
diff --git a/tools/drupal/modules/multicurrency/templates/CRM/Event/Page/8/EventInfo.tpl b/tools/drupal/modules/multicurrency/templates/CRM/Event/Page/8/EventInfo.tpl
deleted file mode 100644 (file)
index d215b86..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{* this template is used for displaying event information *}
-
-<div class="vevent">
-  <h2><span class="summary">{$event.title}</span></h2>
-    <div class="display-block">
-  <table class="form-layout">
-        {if $event.summary}
-    <tr><td colspan="2" class="report">{$event.summary}</td></tr>
-        {/if}
-        {if $event.description}
-          <tr><td colspan="2" class="report">
-    <span class="summary">{$event.description}</span></td></tr>
-  {/if}
-  <tr><td><label>{ts}When{/ts}</label></td>
-            <td width="90%">
-      <abbr class="dtstart" title="{$event.event_start_date|crmDate}">
-        {$event.event_start_date|crmDate}</abbr>
-
-  {if $event.event_end_date}
-    &nbsp; {ts}through{/ts} &nbsp;
-                {* Only show end time if end date = start date *}
-                {if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}
-      <abbr class="dtend" title="{$event.event_end_date|crmDate:0:1}">
-      {$event.event_end_date|crmDate:0:1}
-      </abbr>
-                {else}
-      <abbr class="dtend" title="{$event.event_end_date|crmDate}">
-      {$event.event_end_date|crmDate}
-      </abbr>
-                {/if}
-            {/if}
-            </td>
-  </tr>
-
-  {if $isShowLocation}
-        {if $location.1.name || $location.1.address}
-            <tr><td><label>{ts}Location{/ts}</label></td>
-                <td>
-                {if $location.1.name}
-                    <span class="fn org">{$location.1.name}</span><br />
-                {/if}
-                {$location.1.address.display|nl2br}
-                {if ( $event.is_map && $config->mapAPIKey && ( is_numeric($location.1.address.geo_code_1)  || ( $location.1.address.city AND $location.1.address.state_province ) ) ) }
-                    <br/><a href="{$mapURL}" title="{ts}Map this Address{/ts}">{ts}Map this Location{/ts}</a>
-                {/if}
-                </td>
-            </tr>
-    {/if}
-        {/if}{*End of isShowLocation condition*}
-
-  {if $location.1.phone.1.phone || $location.1.email.1.email}
-        <tr><td><label>{ts}Contact{/ts}</label></td>
-            <td>  {* loop on any phones and emails for this event *}
-            {foreach from=$location.1.phone item=phone}
-                {if $phone.phone}
-                    {if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}:
-                    <span class="tel">{$phone.phone}</span> <br />
-                    {/if}
-                {/foreach}
-
-            {foreach from=$location.1.email item=email}
-                {if $email.email}
-                    {ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
-                {/if}
-            {/foreach}
-            </td>
-        </tr>
-    {/if}
-  </table>
-
-    {include file="CRM/Custom/Page/CustomDataView.tpl"}
-
-    {* Show link to Event Registration page if event if configured for online reg AND we are NOT coming from Contact Dashboard (CRM-2046) *}
-    {if $is_online_registration AND $context NEQ 'dashboard'}
-        <div class="action-link">
-            <strong><a href="{$registerURL}" title="{$registerText}">&raquo; {$registerText}</a></strong>
-        </div>
-    {/if}
-    { if $event.is_public }
-        <br />{include file="CRM/Event/Page/iCalLinks.tpl"}
-    {/if}
-  </div>
-</div>