$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'];
}
}
// 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,
</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>