Merge remote-tracking branch 'upstream/4.4' into 4.4-4.5-2014-09-08-20-42-29
authorkurund <kurund@civicrm.org>
Mon, 8 Sep 2014 15:20:44 +0000 (20:50 +0530)
committerkurund <kurund@civicrm.org>
Mon, 8 Sep 2014 15:20:44 +0000 (20:50 +0530)
Conflicts:
CRM/Contribute/Form/Contribution/Main.php
templates/CRM/Price/Page/Field.tpl

1  2 
CRM/Contribute/Form/Contribution/Main.php
CRM/Core/Menu.php
CRM/Price/BAO/PriceSet.php
CRM/Price/Page/Field.php
templates/CRM/Price/Page/Field.tpl
tests/phpunit/CRM/Member/BAO/MembershipTest.php

index a60ad3019b29db9e8fb47331e6d86d5c24f94067,cdc7ea57e1d516f69a14352e2f3b921429ec72d2..75c1c1b1d407f5db919fc2d64b788b5f18e14f44
@@@ -891,9 -842,13 +891,13 @@@ class CRM_Contribute_Form_Contribution_
                $priceFieldIDS[] = $fields['price_' . $priceId];
              }
  
 -            if (CRM_Utils_Array::value('options', $value)) {
 +            if (!empty($value['options'])) {
                foreach ($value['options'] as $val) {
-                 if (!empty($val['membership_type_id'])) {
 -                if (CRM_Utils_Array::value('membership_type_id', $val) && (
++                if (!empty($val['membership_type_id']) && (
+                     ($fields['price_' . $priceId] == $val['id']) ||
+                     (isset($fields['price_' . $priceId]) && !empty($fields['price_' . $priceId][$val['id']]))
+                   )
+                 ) {
                    $priceFieldMemTypes[] = $val['membership_type_id'];
                  }
                }
Simple merge
Simple merge
index ec19d9238b9adcc535c7889b1607ed08ead86482,dae7188aae0fb50d5901b2a475ee3e3547669474..406927930323f86836dc7d292898113d1df80475
@@@ -167,11 -170,9 +167,11 @@@ class CRM_Price_Page_Field extends CRM_
  
        // need to translate html types from the db
        $htmlTypes = CRM_Price_BAO_PriceField::htmlTypes();
-       $priceField[$priceFieldBAO->id]['html_type'] = $htmlTypes[$priceField[$priceFieldBAO->id]['html_type']];
+       $priceField[$priceFieldBAO->id]['html_type_display'] = $htmlTypes[$priceField[$priceFieldBAO->id]['html_type']];
        $priceField[$priceFieldBAO->id]['order'] = $priceField[$priceFieldBAO->id]['weight'];
 -      $priceField[$priceFieldBAO->id]['action'] = CRM_Core_Action::formLink(self::actionLinks(), $action,
 +      $priceField[$priceFieldBAO->id]['action'] = CRM_Core_Action::formLink(
 +        self::actionLinks(),
 +        $action,
          array(
            'fid' => $priceFieldBAO->id,
            'sid' => $this->_sid,
index 470e131067699edbfe550eba33d4bbd2fc962d94,d5ec72cefa165d03c6c86e35d269143c3dd5280d..c8d0262bf0ac3303a2211c25f62b123355691365
          </tr>
          </thead>
          {foreach from=$priceField key=fid item=row}
 -      <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
 -            <td>{$row.label}</td>
 +      <tr id="price_field-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
 +            <td class="crm-editable" data-field="label">{$row.label}</td>
-             <td>{$row.html_type}</td>
+             <td>{$row.html_type_display}</td>
 -            <td class="nowrap">{$row.order}</td>
 +            <td class="nowrap">{$row.weight}</td>
              <td>{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
              <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
              <td>{if $row.active_on}{$row.active_on|date_format:"%Y-%m-%d %T"}{/if}</td>
              <td>{if $row.expire_on}{$row.expire_on|date_format:"%Y-%m-%d %T"}{/if}</td>
-             <td>{if $row.html_type eq "Text / Numeric Quantity"}{$row.price|crmMoney}{else}<a href="{crmURL p="civicrm/admin/price/field/option" q="action=browse&reset=1&sid=$sid&fid=$fid"}">{if $isReserved}{ts}View Price Options{/ts}{else}{ts}Edit Price Options{/ts}{/if}</a>{/if}</td>
+             <td>{if $row.html_type eq "Text"}{$row.price|crmMoney}{else}<a href="{crmURL p="civicrm/admin/price/field/option" q="action=browse&reset=1&sid=$sid&fid=$fid"}">{if $isReserved}{ts}View Price Options{/ts}{else}{ts}Edit Price Options{/ts}{/if}</a>{/if}</td>
              <td class="field-action">{$row.action|replace:'xx':$row.id}</td>
 -            <td class="order hiddenElement">{$row.weight}</td>
          </tr>
          {/foreach}
          </table>