CRM-14015 - Extend everywhere via regex
[civicrm-core.git] / CRM / Custom / Page / Option.php
index 95c2a655859712574ae3e356b28a7f8e03d63aba..73cdb12c6a98663f3b5ae1008848b3a3f210385f 100644 (file)
@@ -92,14 +92,12 @@ class CRM_Custom_Page_Option extends CRM_Core_Page {
         ),
         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 Mutliple Choice Option'),
         ),
         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 Mutliple Choice Option'),
         ),
         CRM_Core_Action::DELETE => array(
@@ -122,6 +120,7 @@ class CRM_Custom_Page_Option extends CRM_Core_Page {
    * @access public
    */
   function browse() {
+    CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
     //get the default value from custom fields
     $customFieldBAO = new CRM_Core_BAO_CustomField();
     $customFieldBAO->id = $this->_fid;