CRM-14015 - Extend to option value page
authorColeman Watts <coleman@civicrm.org>
Sat, 21 Dec 2013 03:31:10 +0000 (19:31 -0800)
committerColeman Watts <coleman@civicrm.org>
Mon, 6 Jan 2014 19:10:40 +0000 (11:10 -0800)
CRM/Admin/Page/Options.php
templates/CRM/Admin/Page/Options.tpl

index 2a2acc7112a51d7e031ab267f543c120236bad82..e8d3c4a239aa3bbe924a278216b5b7922fa06fd2 100644 (file)
@@ -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(
index 9fb92e0f4c1fb4ab3cd5a770df8f76c876f4a987..e15baf77850f3867877a5bc758582029a2331d61 100644 (file)
@@ -75,7 +75,7 @@
 <div id={$gName}>
         {strip}
   {* handle enable/disable actions*}
-  {include file="CRM/common/enableDisable.tpl"}
+  {include file="CRM/common/enableDisableApi.tpl"}
     {include file="CRM/common/jsortable.tpl"}
         <table id="options" class="display">
          <thead>
           </thead>
           <tbody>
         {foreach from=$rows item=row}
-          <tr id="row_{$row.id}" class="crm-admin-options crm-admin-options_{$row.id} {cycle values="odd-row,even-row"}{if NOT $row.is_active} disabled{/if}">
+          <tr id="option_value-{$row.id}" class="crm-admin-options crm-admin-options_{$row.id} crm-entity {cycle values="odd-row,even-row"}{if NOT $row.is_active} disabled{/if}">
             {if $showComponent}
               <td class="crm-admin-options-component_name">{$row.component_name}</td>
             {/if}
-            <td class="crm-admin-options-label">{$row.label}</td>
+            <td class="crm-admin-options-label crm-editable" data-field="label">{$row.label}</td>
             {if $gName eq "case_status"}
               <td class="crm-admin-options-grouping">{$row.grouping}</td>
             {/if}
               <td class="yes-no crm-admin-options-filter">{if $row.filter eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Counted{/ts}" />{/if}</td>
             {/if}
             {if $showVisibility}<td class="crm-admin-visibility_label">{$row.visibility_label}</td>{/if}
-            <td class="crm-admin-options-description">{$row.description}</td>
+            <td class="crm-admin-options-description crm-editable" data-field="description" data-action="create">{$row.description}</td>
             <td class="nowrap crm-admin-options-order">{$row.order}</td>
             {if $showIsDefault}
               <td class="crm-admin-options-is_default" align="center">{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
         {/foreach}
         </tbody>
         </table>
+        {include file="CRM/common/crmeditable.tpl"}
         {/strip}
 
         {if $action ne 1 and $action ne 2}