* @access public
*/
public function preProcess() {
-
+ $this->setPageTitle(ts('Price Option'));
$this->_fid = CRM_Utils_Request::retrieve('fid', 'Positive',
$this
);
}
}
- if ($this->_sid) {
+ if ($action & CRM_Core_Action::DELETE) {
+ CRM_Utils_System::setTitle(ts('Delete Price Field'));
+ }
+ elseif ($this->_sid) {
$groupTitle = CRM_Price_BAO_PriceSet::getTitle($this->_sid);
$this->assign('sid', $this->_sid);
$this->assign('groupTitle', $groupTitle);
$controller->process();
$controller->run();
-
- $this->browse();
-
if ($action & CRM_Core_Action::DELETE) {
// add breadcrumb
$url = CRM_Utils_System::url('civicrm/admin/price/field/option', 'reset=1');
{/if}
<div class="action-link">
<a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contact Type{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
{/if}
<div class="action-link">
<a href="{crmURL q="action=add&reset=1"}" id="newLocationType" class="button"><span><div class="icon add-icon"></div>{ts}Add Location Type{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
{/if}
<div class="action-link">
<a href="{crmURL q="action=add&reset=1"}" id="newMailSettings" class="button"><span><div class="icon add-icon"></div>{ts}Add Mail Account{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
{if $action ne 1 and $action ne 2}
<div class="action-link">
<a href="{crmURL q="action=add&reset=1"}" id="newOptionGroup" class="button"><span><div class="icon add-icon"></div>{ts}Add Option Group{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
</div>
{ts}None found.{/ts}
</div>
{/if}
- {if $isLocked ne 1}
<div class="action-link">
- <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
+ {if $isLocked ne 1}
+ <a href="{crmURL p="civicrm/admin/options/$gName" q='action=add&reset=1'}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
+ {/if}
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
- {/if}
</div>
{/if}
{if $action ne 1 and $action ne 2}
<div class="action-link">
- <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Participant Status{/ts}</span></a>
+ <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div> {ts}Add Participant Status{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
</div>
{/strip}
{if $action ne 1 and $action ne 2}
- <div class="action-link">
- <a href="{crmURL q="action=add&reset=1"}" id="newPaymentProcessor">» {ts}New Payment Processor{/ts}</a>
+ <div class="action-link">
+ <a href="{crmURL q="action=add&reset=1"}" id="newPaymentProcessor">» {ts}New Payment Processor{/ts}</a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
</div>
</div>
{elseif $action ne 1}
<div class="messages status no-popup">
- <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
- {capture assign=crmURL}{crmURL p='civicrm/admin/paymentProcessorType' q="action=add&reset=1"}{/capture}
- {ts 1=$crmURL}There are no Payment Processors entered. You can <a href='%1'>add one</a>.{/ts}
+ <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+ {ts}None found.{/ts}
</div>
{/if}
{/if}
{else}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
- {capture assign=link}href="{crmURL q="action=add&reset=1"}" class="action-item"{/capture}
- {ts 1=$link}There are no PDF Page Formats configured. You can <a %1>add one</a>.{/ts}
+ {ts}None found.{/ts}
</div>
{/if}
<div class="spacer"></div>
<div class="action-link">
- <a href="{crmURL q="action=add&reset=1"}" id="newPdfFormat" class="button"><span><div class="icon add-icon"></div>{ts}Add PDF Page Format{/ts}</span></a>
+ <a href="{crmURL q="action=add&reset=1"}" id="newPdfFormat" class="button"><span><div class="icon add-icon"></div>{ts}Add PDF Page Format{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
{/if}
<div class="action-link">
<a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
</table>
{/strip}
- {if $action ne 1 and $action ne 2}
- <div class="action-link">
- <a href="{crmURL q="action=add&reset=1"}" id="newContributionType" class="button"><span><div class="icon add-icon"></div>{ts}Add Financial Type{/ts}</span></a>
- </div>
- {/if}
</div>
</div>
{else}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
- {capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
- {ts 1=$crmURL}There are no Financial Types entered. You can <a href='%1'>add one</a>.{/ts}
+ {ts}None found.{/ts}
</div>
{/if}
+ {if $action ne 1 and $action ne 2}
+ <div class="action-link">
+ <a href="{crmURL q="action=add&reset=1"}" id="newContributionType" class="button"><span><div class="icon add-icon"></div>{ts}Add Financial Type{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
+ </div>
+ {/if}
{/if}
{/if}
<div class="action-link">
<a href="{crmURL p='civicrm/admin/custom/group/field/add' q="reset=1&action=add&gid=$gid"}" id="newCustomField" class="button action-item"><span><div class="icon add-icon"></div>{ts}Add Custom Field{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin/custom/group" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
<div class="action-link">
<a href="{crmURL q="reset=1&action=add&fid=$fid&gid=$gid"}" class="button action-item"><span><div class="icon add-icon"></div> {ts 1=$fieldTitle}Add Option for '%1'{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin/custom/group/field" q="reset=1&action=browse&gid=$gid"}" class="button action-item cancel"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
</div>
</div>
{/foreach}
</table>
{/strip}
-
- {if $action ne 1 and $action ne 2}
- <div class="action-link">
- <a href="{crmURL q="action=add&reset=1"}" id="newFinancialType" class="button"><span><div class="icon add-icon"></div>{ts}Add Financial Type{/ts}</span></a>
- </div>
- {/if}
</div>
</div>
{else}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
- {capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
- {ts 1=$crmURL}There are no Financial Types entered. You can <a href='%1'>add one</a>.{/ts}
+ {ts}None found.{/ts}
</div>
{/if}
+ {if $action ne 1 and $action ne 2}
+ <div class="action-link">
+ <a href="{crmURL q="action=add&reset=1"}" id="newFinancialType" class="button"><span><div class="icon add-icon"></div>{ts}Add Financial Type{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
+ </div>
+ {/if}
{/if}
{/strip}
{if $action ne 1 and $action ne 2}
- <div class="action-link">
- <a href="{crmURL q="action=add&reset=1"}" id="newMembershipStatus" class="button"><span><div class="icon add-icon"></div>{ts}Add Membership Status{/ts}</span></a>
+ <div class="action-link">
+ <a href="{crmURL q="action=add&reset=1"}" id="newMembershipStatus" class="button"><span><div class="icon add-icon"></div>{ts}Add Membership Status{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
</div>
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if $action eq 8}
- <div class="messages status no-popup">
- <div class="icon inform-icon"></div>
- {ts}WARNING: Deleting this option will result in the loss of all data.{/ts} {ts}This action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
-
- </div>
- {/if}
-<h3>{if $action eq 8 }{ts}Delete Option{/ts}{elseif $action eq 1}{ts}New Option{/ts}{elseif $action eq 2}{ts}Edit Option{/ts}{/if}</h3>
<div class="crm-form-block">
- {if $action neq 8}
- <table class="form-layout">
+ {if $action eq 8}
+ <div class="messages status no-popup">
+ <div class="icon inform-icon"></div>
+ {ts}WARNING: Deleting this option will result in the loss of all data.{/ts} {ts}This action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
+ </div>
+ {else}
+ <table class="form-layout">
{if $showMember}
- <tr class="crm-price-option-form-block-membership_type_id">
- <td class="label">{$form.membership_type_id.label}</td>
- <td>{$form.membership_type_id.html}
- <br /> <span class="description">{ts}If a membership type is selected, a membership will be created or renewed when users select this option. Leave this blank if you are using this for non-membership options (e.g. magazine subscription).{/ts} {help id="id-member-price-options" file="CRM/Price/Page/Field.hlp"}</span></td>
- </tr>
- <tr class="crm-price-option-form-block-membership_num_terms">
- <td class="label">{$form.membership_num_terms.label}</td>
- <td>{$form.membership_num_terms.html}
- <br /> <span class="description">{ts}You can set this to a number other than one to allow multiple membership terms.{/ts}</span></td>
- </tr>
+ <tr class="crm-price-option-form-block-membership_type_id">
+ <td class="label">{$form.membership_type_id.label}</td>
+ <td>{$form.membership_type_id.html}
+ <br /> <span class="description">{ts}If a membership type is selected, a membership will be created or renewed when users select this option. Leave this blank if you are using this for non-membership options (e.g. magazine subscription).{/ts} {help id="id-member-price-options" file="CRM/Price/Page/Field.hlp"}</span></td>
+ </tr>
+ <tr class="crm-price-option-form-block-membership_num_terms">
+ <td class="label">{$form.membership_num_terms.label}</td>
+ <td>{$form.membership_num_terms.html}
+ <br /> <span class="description">{ts}You can set this to a number other than one to allow multiple membership terms.{/ts}</span></td>
+ </tr>
{/if}
<tr class="crm-price-option-form-block-label">
- <td class="label">{$form.label.label}</td>
- <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='label' id=$sid}{/if}{$form.label.html}</td>
- </tr>
- <tr class="crm-price-option-form-block-amount">
- <td class="label">{$form.amount.label}</td>
- <td>{$form.amount.html}</td>
- </tr>
- <tr class="crm-price-option-form-block-description">
- <td class="label">{$form.description.label}</td>
- <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$sid}{/if}{$form.description.html}</td>
- </tr>
+ <td class="label">{$form.label.label}</td>
+ <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='label' id=$sid}{/if}{$form.label.html}</td>
+ </tr>
+ <tr class="crm-price-option-form-block-amount">
+ <td class="label">{$form.amount.label}</td>
+ <td>{$form.amount.html}</td>
+ </tr>
+ <tr class="crm-price-option-form-block-description">
+ <td class="label">{$form.description.label}</td>
+ <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$sid}{/if}{$form.description.html}</td>
+ </tr>
<tr class="crm-price-option-form-block-financial-type">
- <td class="label">{$form.financial_type_id.label}</td>
- <td>
- {if !$financialType }
- {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture}
- {ts 1=$ftUrl}There are no financial types configured with a linked 'Revenue Account of' account. <a href='%1'>Click here</a> if you want to configure financial types for your site.{/ts}
+ <td class="label">{$form.financial_type_id.label}</td>
+ <td>
+ {if !$financialType }
+ {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture}
+ {ts 1=$ftUrl}There are no financial types configured with a linked 'Revenue Account of' account. <a href='%1'>Click here</a> if you want to configure financial types for your site.{/ts}
{else}
- {$form.financial_type_id.html}
- {/if}
- </td>
- </tr>
- {* fix for CRM-10241 *}
- {if $form.count.html}
- <tr class="crm-price-option-form-block-count">
- <td class="label">{$form.count.label}</td>
- <td>{$form.count.html} {help id="id-participant-count" file="CRM/Price/Page/Field.hlp"}</td>
- </tr>
- {* 2 line fix for CRM-10241 *}
- {/if}
- {if $form.max_value.html}
- <tr class="crm-price-option-form-block-max_value">
- <td class="label">{$form.max_value.label}</td>
- <td>{$form.max_value.html} {help id="id-participant-max" file="CRM/Price/Page/Field.hlp"}</td>
- </tr>
- {* fix for CRM-10241 *}
- {/if}
- <tr class="crm-price-option-form-block-weight">
- <td class="label">{$form.weight.label}</td>
- <td>{$form.weight.html}</td>
- </tr>
- <tr class="crm-price-option-form-block-is_active">
- <td class="label">{$form.is_active.label}</td>
- <td>{$form.is_active.html}</td>
- {if !$hideDefaultOption}
+ {$form.financial_type_id.html}
+ {/if}
+ </td>
+ </tr>
+ {* fix for CRM-10241 *}
+ {if $form.count.html}
+ <tr class="crm-price-option-form-block-count">
+ <td class="label">{$form.count.label}</td>
+ <td>{$form.count.html} {help id="id-participant-count" file="CRM/Price/Page/Field.hlp"}</td>
+ </tr>
+ {* 2 line fix for CRM-10241 *}
+ {/if}
+ {if $form.max_value.html}
+ <tr class="crm-price-option-form-block-max_value">
+ <td class="label">{$form.max_value.label}</td>
+ <td>{$form.max_value.html} {help id="id-participant-max" file="CRM/Price/Page/Field.hlp"}</td>
+ </tr>
+ {* fix for CRM-10241 *}
+ {/if}
+ <tr class="crm-price-option-form-block-weight">
+ <td class="label">{$form.weight.label}</td>
+ <td>{$form.weight.html}</td>
+ </tr>
+ <tr class="crm-price-option-form-block-is_active">
+ <td class="label">{$form.is_active.label}</td>
+ <td>{$form.is_active.html}</td>
+ {if !$hideDefaultOption}
<tr class="crm-price-option-form-block-is_default">
- <td class="label">{$form.is_default.label}</td>
- <td>{$form.is_default.html}</td>
- </tr>
- {/if}
- </table>
+ <td class="label">{$form.is_default.label}</td>
+ <td>{$form.is_default.html}</td>
+ </tr>
{/if}
+ </table>
+ {literal}
+ <script type="text/javascript">
- <div id="crm-submit-buttons" class="form-item">
- <table class="form-layout">
- <tr>
- <td> </td>
- <td>{include file="CRM/common/formButtons.tpl"}</td>
- </tr>
- </table>
- </div>
+ function calculateRowValues( ) {
+ var mtype = cj("#membership_type_id").val();
+ var postUrl = "{/literal}{crmURL p='civicrm/ajax/memType' h=0}{literal}";
+ cj.post( postUrl, {mtype: mtype}, function( data ) {
+ cj("#amount").val( data.total_amount );
+ cj("#label").val( data.name );
-</div>
+ }, 'json');
+ }
+ {/literal}
+ </script>
+ {/if}
-{literal}
- <script type="text/javascript">
- function calculateRowValues( ) {
- var mtype = cj("#membership_type_id").val();
- var postUrl = "{/literal}{crmURL p='civicrm/ajax/memType' h=0}{literal}";
- cj.post( postUrl, {mtype: mtype}, function( data ) {
- cj("#amount").val( data.total_amount );
- cj("#label").val( data.name );
+ <div class="crm-submit-buttons">
+ {include file="CRM/common/formButtons.tpl"}
+ </div>
- }, 'json');
- }
- {/literal}
-</script>
+</div>
{include file="CRM/Price/Form/DeleteField.tpl"}
{elseif $action eq 1024 }
{include file="CRM/Price/Form/Preview.tpl"}
-{else}
- {if ($usedBy and $action eq 8) or $usedBy.civicrm_event or $usedBy.civicrm_contribution_page}
- <div id="price_set_used_by" class="messages status no-popup">
- <div class="icon inform-icon"></div>
- {if $action eq 8}
- {ts 1=$usedPriceSetTitle}Unable to delete the '%1' Price Field - it is currently in use by one or more active events or contribution pages or contributions or event templates.{/ts}
- {/if}
+{elseif ($usedBy and $action eq 8) or $usedBy.civicrm_event or $usedBy.civicrm_contribution_page}
+ <div id="price_set_used_by" class="messages status no-popup">
+ <div class="icon inform-icon"></div>
+ {if $action eq 8}
+ {ts 1=$usedPriceSetTitle}Unable to delete the '%1' Price Field - it is currently in use by one or more active events or contribution pages or contributions or event templates.{/ts}
+ {/if}
- {if $usedBy.civicrm_event or $usedBy.civicrm_contribution_page or $usedBy.civicrm_event_template}
- {include file="CRM/Price/Page/table.tpl"}
- {/if}
- </div>
- {/if}
+ {if $usedBy.civicrm_event or $usedBy.civicrm_contribution_page or $usedBy.civicrm_event_template}
+ {include file="CRM/Price/Page/table.tpl"}
+ {/if}
+ </div>
+{else}
<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"}{$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 class="action-item" 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>
</tr>
{/foreach}
*}
{if ($action eq 1 or $action eq 2 or $action eq 4 or $action eq 8 and !$usedBy) and !$isReserved}
{include file="CRM/Price/Form/Option.tpl"}
-{/if}
-{if $usedBy}
+{elseif $usedBy}
<div class='spacer'></div>
<div id="price_set_used_by" class="messages status no-popup">
<div class="icon inform-icon"></div>
{/if}
</div>
-{/if}
-
+{else}
-{if $customOption}
+ {if $customOption}
- <div id="field_page">
- <p></p>
- {strip}
- {* handle enable/disable actions*}
- {include file="CRM/common/enableDisableApi.tpl"}
- {include file="CRM/common/crmeditable.tpl"}
- <table id="options" class="row-highlight">
- <thead>
- <tr>
- <th>{ts}Option Label{/ts}</th>
- <th>{ts}Option Amount{/ts}</th>
- <th>{ts}Default{/ts}</th>
- <th>{ts}Financial Type{/ts}</th>
- <th>{ts}Order{/ts}</th>
- <th>{ts}Enabled?{/ts}</th>
- <th></th>
- </tr>
- </thead>
- {foreach from=$customOption item=row}
- <tr id="price_field_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td class="crm-price-option-label crm-editable" data-field="label">{$row.label}</td>
- <td class="crm-price-option-value">{$row.amount|crmMoney}</td>
- <td class="crm-price-option-is_default">{if $row.is_default}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}</td>
- <td class="nowrap crm-price-option-financial-type-id">{$row.financial_type_id}</td>
- <td class="nowrap crm-price-option-order">{$row.weight}</td>
- <td id="row_{$row.id}_status" class="crm-price-option-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
- <td>{$row.action|replace:'xx':$row.id}</td>
+ <div id="field_page">
+ <p></p>
+ {strip}
+ {* handle enable/disable actions*}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
+ <table id="options" class="row-highlight">
+ <thead>
+ <tr>
+ <th>{ts}Option Label{/ts}</th>
+ <th>{ts}Option Amount{/ts}</th>
+ <th>{ts}Default{/ts}</th>
+ <th>{ts}Financial Type{/ts}</th>
+ <th>{ts}Order{/ts}</th>
+ <th>{ts}Enabled?{/ts}</th>
+ <th></th>
</tr>
- {/foreach}
- </tbody>
- </table>
- {/strip}
- {if $addMoreFields && !$isReserved}
- <div class="action-link">
- <a href="{crmURL q="reset=1&action=add&fid=$fid&sid=$sid"}" class="button"><span><div class="icon add-icon"></div> {ts 1=$fieldTitle}New Option for '%1'{/ts}</span></a>
+ </thead>
+ <tbody>
+ {foreach from=$customOption item=row}
+ <tr id="price_field_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <td class="crm-price-option-label crm-editable" data-field="label">{$row.label}</td>
+ <td class="crm-price-option-value">{$row.amount|crmMoney}</td>
+ <td class="crm-price-option-is_default">{if $row.is_default}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}</td>
+ <td class="nowrap crm-price-option-financial-type-id">{$row.financial_type_id}</td>
+ <td class="nowrap crm-price-option-order">{$row.weight}</td>
+ <td id="row_{$row.id}_status" class="crm-price-option-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
+ <td>{$row.action|replace:'xx':$row.id}</td>
+ </tr>
+ {/foreach}
+ </tbody>
+ </table>
+ {/strip}
+ </div>
+
+ {else}
+ {if $action eq 16}
+ <div class="messages status no-popup">
+ <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
+ {ts}None found.{/ts}
</div>
{/if}
- </div>
-
-{else}
- {if $action eq 16}
- <div class="messages status no-popup">
- <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
- {capture assign=crmURL}{crmURL p='civicrm/admin/price/field/option' q="action=add&fid=$fid&sid=$sid"}{/capture}{ts 1=$fieldTitle 2=$crmURL}There are no options for the price field '%1', <a href='%2'>add one</a>.{/ts}
+ {/if}
+ {if $addMoreFields && !$isReserved}
+ <div class="action-link">
+ <a href="{crmURL q="reset=1&action=add&fid=$fid&sid=$sid"}" class="button"><span><div class="icon add-icon"></div> {ts 1=$fieldTitle}New Option for '%1'{/ts}</span></a>
+ <a href="{crmURL p="civicrm/admin/price/field" q="reset=1&sid=$sid"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a>
</div>
{/if}
{/if}