From 5e7dd08241e527ba8ecac1b4ae3125b92f05c675 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 20 Dec 2013 19:31:10 -0800 Subject: [PATCH] CRM-14015 - Extend to option value page --- CRM/Admin/Page/Options.php | 6 ++---- templates/CRM/Admin/Page/Options.tpl | 9 +++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CRM/Admin/Page/Options.php b/CRM/Admin/Page/Options.php index 2a2acc7112..e8d3c4a239 100644 --- a/CRM/Admin/Page/Options.php +++ b/CRM/Admin/Page/Options.php @@ -162,14 +162,12 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionValue' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable %1', array(1 => self::$_gName)), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionValue' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable %1', array(1 => self::$_gName)), ), CRM_Core_Action::DELETE => array( diff --git a/templates/CRM/Admin/Page/Options.tpl b/templates/CRM/Admin/Page/Options.tpl index 9fb92e0f4c..e15baf7785 100644 --- a/templates/CRM/Admin/Page/Options.tpl +++ b/templates/CRM/Admin/Page/Options.tpl @@ -75,7 +75,7 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} {include file="CRM/common/jsortable.tpl"} @@ -118,11 +118,11 @@ {foreach from=$rows item=row} - + {if $showComponent} {/if} - + {if $gName eq "case_status"} {/if} @@ -134,7 +134,7 @@ {/if} {if $showVisibility}{/if} - + {if $showIsDefault} @@ -147,6 +147,7 @@ {/foreach}
{$row.component_name}{$row.label}{$row.label}{$row.grouping}{if $row.filter eq 1}{ts}Counted{/ts}{/if}{$row.visibility_label}{$row.description}{$row.description} {$row.order}{if $row.is_default eq 1}{ts}Default{/ts}{/if} 
+ {include file="CRM/common/crmeditable.tpl"} {/strip} {if $action ne 1 and $action ne 2} -- 2.25.1