From 4d17a2333d93f083960fe581816f08ac7f60e4d4 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 21 Dec 2013 17:43:01 -0800 Subject: [PATCH] CRM-14015 - Extend everywhere via regex --- CRM/ACL/Page/ACL.php | 2 +- CRM/ACL/Page/EntityRole.php | 2 +- CRM/Admin/Page/AJAX.php | 104 +++++++----------- CRM/Admin/Page/ContactType.php | 7 +- CRM/Admin/Page/Job.php | 6 +- CRM/Admin/Page/LocationType.php | 6 +- CRM/Admin/Page/MessageTemplates.php | 7 +- CRM/Admin/Page/OptionGroup.php | 6 +- CRM/Admin/Page/OptionValue.php | 7 +- CRM/Admin/Page/Options.php | 1 - CRM/Admin/Page/ParticipantStatus.php | 7 +- CRM/Admin/Page/PaymentProcessor.php | 6 +- CRM/Admin/Page/PaymentProcessorType.php | 6 +- CRM/Admin/Page/RelationshipType.php | 6 +- CRM/Admin/Page/ScheduleReminders.php | 6 +- CRM/Badge/Page/Layout.php | 6 +- CRM/Campaign/Page/Campaign.php | 7 +- CRM/Campaign/Page/DashBoard.php | 19 ++-- CRM/Campaign/Page/Survey.php | 7 +- CRM/Campaign/Page/SurveyType.php | 7 +- CRM/Contact/BAO/Group.php | 6 +- CRM/Contribute/Page/ContributionPage.php | 6 +- CRM/Contribute/Page/ManagePremiums.php | 7 +- CRM/Contribute/Page/Tab.php | 4 +- CRM/Custom/Page/Field.php | 2 +- CRM/Custom/Page/Group.php | 6 +- CRM/Custom/Page/Option.php | 7 +- CRM/Event/Page/ManageEvent.php | 7 +- CRM/Financial/Page/FinancialAccount.php | 3 +- CRM/Financial/Page/FinancialType.php | 3 +- CRM/Mailing/Page/Component.php | 6 +- CRM/Member/Page/MembershipStatus.php | 7 +- CRM/Member/Page/MembershipType.php | 7 +- CRM/Price/Page/Field.php | 7 +- CRM/Price/Page/Option.php | 7 +- CRM/Price/Page/Set.php | 6 +- CRM/Report/Page/Options.php | 7 +- CRM/SMS/Page/Provider.php | 6 +- CRM/UF/Page/Field.php | 7 +- CRM/UF/Page/Group.php | 6 +- templates/CRM/Admin/Page/ContactType.tpl | 9 +- templates/CRM/Admin/Page/Extensions.tpl | 3 +- .../CRM/Admin/Page/Extensions/AddNew.tpl | 2 +- templates/CRM/Admin/Page/Extensions/Main.tpl | 4 +- templates/CRM/Admin/Page/Job.tpl | 5 +- templates/CRM/Admin/Page/JobLog.tpl | 5 +- templates/CRM/Admin/Page/LocationType.tpl | 5 +- templates/CRM/Admin/Page/MessageTemplates.tpl | 5 +- templates/CRM/Admin/Page/OptionGroup.tpl | 5 +- templates/CRM/Admin/Page/OptionValue.tpl | 7 +- .../CRM/Admin/Page/ParticipantStatus.tpl | 7 +- templates/CRM/Admin/Page/PaymentProcessor.tpl | 5 +- .../CRM/Admin/Page/PaymentProcessorType.tpl | 7 +- templates/CRM/Admin/Page/RelationshipType.tpl | 11 +- templates/CRM/Admin/Page/Reminders.tpl | 7 +- templates/CRM/Badge/Page/Layout.tpl | 5 +- .../CRM/Campaign/Form/Search/Campaign.tpl | 3 +- .../CRM/Campaign/Form/Search/Petition.tpl | 3 +- templates/CRM/Campaign/Form/Search/Survey.tpl | 3 +- templates/CRM/Campaign/Page/Campaign.tpl | 7 +- templates/CRM/Campaign/Page/Petition.tpl | 5 +- templates/CRM/Campaign/Page/Survey.tpl | 5 +- templates/CRM/Campaign/Page/SurveyType.tpl | 9 +- .../CRM/Contribute/Page/ContributionPage.tpl | 5 +- .../CRM/Contribute/Page/ContributionRecur.tpl | 5 +- .../CRM/Contribute/Page/ContributionType.tpl | 5 +- .../CRM/Contribute/Page/ManagePremiums.tpl | 3 +- templates/CRM/Custom/Page/Group.tpl | 4 +- templates/CRM/Custom/Page/Option.tpl | 6 +- templates/CRM/Event/Page/ManageEvent.tpl | 5 +- .../CRM/Financial/Page/FinancialAccount.tpl | 5 +- .../CRM/Financial/Page/FinancialType.tpl | 3 +- .../Financial/Page/FinancialTypeAccount.tpl | 3 +- templates/CRM/Group/Form/Search.tpl | 3 +- templates/CRM/Mailing/Page/Component.tpl | 3 +- .../CRM/Member/Page/MembershipStatus.tpl | 7 +- templates/CRM/Member/Page/MembershipType.tpl | 7 +- templates/CRM/Price/Page/Field.tpl | 7 +- templates/CRM/Price/Page/Option.tpl | 7 +- templates/CRM/Price/Page/Set.tpl | 7 +- templates/CRM/Report/Page/Options.tpl | 7 +- templates/CRM/SMS/Page/Provider.tpl | 5 +- templates/CRM/UF/Page/Field.tpl | 6 +- templates/CRM/UF/Page/Group.tpl | 8 +- templates/CRM/common/enableDisableApi.tpl | 36 ++++-- 85 files changed, 298 insertions(+), 318 deletions(-) diff --git a/CRM/ACL/Page/ACL.php b/CRM/ACL/Page/ACL.php index 1806602679..aa7f0c9d10 100644 --- a/CRM/ACL/Page/ACL.php +++ b/CRM/ACL/Page/ACL.php @@ -141,7 +141,6 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic { // finally browse the acl's if ($action & CRM_Core_Action::BROWSE) { - CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $this->browse(); } @@ -157,6 +156,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all acl's sorted by weight $acl = array(); diff --git a/CRM/ACL/Page/EntityRole.php b/CRM/ACL/Page/EntityRole.php index d91c6a19b4..806c6d6a95 100644 --- a/CRM/ACL/Page/EntityRole.php +++ b/CRM/ACL/Page/EntityRole.php @@ -140,7 +140,6 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic { // finally browse the acl's if ($action & CRM_Core_Action::BROWSE) { CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); - $this->browse(); } // parent run @@ -155,6 +154,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all acl's sorted by weight $entityRoles = array(); diff --git a/CRM/Admin/Page/AJAX.php b/CRM/Admin/Page/AJAX.php index 6c3be55a8c..582d090805 100644 --- a/CRM/Admin/Page/AJAX.php +++ b/CRM/Admin/Page/AJAX.php @@ -86,26 +86,23 @@ class CRM_Admin_Page_AJAX { require_once('api/v3/utils.php'); $recordID = CRM_Utils_Type::escape($_GET['id'], 'Integer'); $entity = CRM_Utils_Type::escape($_GET['entity'], 'String'); - $show = $status = NULL; + $ret = array(); - if ($recordID && $entity) { - $recordBAO = _civicrm_api3_get_BAO($entity); + if ($recordID && $entity && $recordBAO = _civicrm_api3_get_BAO($entity)) { switch ($recordBAO) { case 'CRM_Core_BAO_UFGroup': - require_once (str_replace('_', DIRECTORY_SEPARATOR, $recordBAO) . '.php'); $method = 'getUFJoinRecord'; $result = array($recordBAO, $method); $ufJoin = call_user_func_array(($result), array($recordID, TRUE)); if (!empty($ufJoin)) { - $status = ts('This profile is currently used for %1.', array(1 => implode(', ', $ufJoin))) . '

' . ts('If you disable the profile - it will be removed from these forms and/or modules. Do you want to continue?'); + $ret['content'] = ts('This profile is currently used for %1.', array(1 => implode(', ', $ufJoin))) . '

' . ts('If you disable the profile - it will be removed from these forms and/or modules. Do you want to continue?'); } else { - $status = ts('Are you sure you want to disable this profile?'); + $ret['content'] = ts('Are you sure you want to disable this profile?'); } break; case 'CRM_Price_BAO_PriceSet': - require_once (str_replace('_', DIRECTORY_SEPARATOR, $recordBAO) . '.php'); $usedBy = CRM_Price_BAO_PriceSet::getUsedBy($recordID); $priceSet = CRM_Price_BAO_PriceSet::getTitle($recordID); @@ -125,153 +122,134 @@ class CRM_Admin_Page_AJAX { } $template->assign('contexts', $contexts); - $show = 'noButton'; + $ret['illegal'] = TRUE; $table = $template->fetch('CRM/Price/Page/table.tpl'); - $status = ts('Unable to disable the \'%1\' price set - it is currently in use by one or more active events, contribution pages or contributions.', array( + $ret['content'] = ts('Unable to disable the \'%1\' price set - it is currently in use by one or more active events, contribution pages or contributions.', array( 1 => $priceSet)) . "
$table"; } else { - $status = ts('Are you sure you want to disable \'%1\' Price Set?', array(1 => $priceSet)); + $ret['content'] = ts('Are you sure you want to disable \'%1\' Price Set?', array(1 => $priceSet)); } break; case 'CRM_Event_BAO_Event': - $status = ts('Are you sure you want to disable this Event?'); + $ret['content'] = ts('Are you sure you want to disable this Event?'); break; case 'CRM_Core_BAO_UFField': - $status = ts('Are you sure you want to disable this CiviCRM Profile field?'); + $ret['content'] = ts('Are you sure you want to disable this CiviCRM Profile field?'); break; case 'CRM_Contribute_BAO_ManagePremiums': - $status = ts('Are you sure you want to disable this premium? This action will remove the premium from any contribution pages that currently offer it. However it will not delete the premium record - so you can re-enable it and add it back to your contribution page(s) at a later time.'); + $ret['content'] = ts('Are you sure you want to disable this premium? This action will remove the premium from any contribution pages that currently offer it. However it will not delete the premium record - so you can re-enable it and add it back to your contribution page(s) at a later time.'); break; case 'CRM_Contact_BAO_RelationshipType': - $status = ts('Are you sure you want to disable this relationship type?') . '

' . ts('Users will no longer be able to select this value when adding or editing relationships between contacts.'); + $ret['content'] = ts('Are you sure you want to disable this relationship type?') . '

' . ts('Users will no longer be able to select this value when adding or editing relationships between contacts.'); break; case 'CRM_Financial_BAO_FinancialType': - $status = ts('Are you sure you want to disable this financial type?'); + $ret['content'] = ts('Are you sure you want to disable this financial type?'); break; case 'CRM_Financial_BAO_FinancialAccount': if (!CRM_Financial_BAO_FinancialAccount::getARAccounts($recordID)) { - $show = 'noButton'; - $status = ts('The selected financial account cannot be disabled because at least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance).'); + $ret['illegal'] = TRUE; + $ret['content'] = ts('The selected financial account cannot be disabled because at least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance).'); } else { - $status = ts('Are you sure you want to disable this financial account?'); + $ret['content'] = ts('Are you sure you want to disable this financial account?'); } break; case 'CRM_Financial_BAO_PaymentProcessor': - $status = ts('Are you sure you want to disable this payment processor?') . '

' . ts('Users will no longer be able to select this value when adding or editing transaction pages.'); + $ret['content'] = ts('Are you sure you want to disable this payment processor?') . '

' . ts('Users will no longer be able to select this value when adding or editing transaction pages.'); break; case 'CRM_Financial_BAO_PaymentProcessorType': - $status = ts('Are you sure you want to disable this payment processor type?'); + $ret['content'] = ts('Are you sure you want to disable this payment processor type?'); break; case 'CRM_Core_BAO_LocationType': - $status = ts('Are you sure you want to disable this location type?') . '

' . ts('Users will no longer be able to select this value when adding or editing contact locations.'); + $ret['content'] = ts('Are you sure you want to disable this location type?') . '

' . ts('Users will no longer be able to select this value when adding or editing contact locations.'); break; case 'CRM_Event_BAO_ParticipantStatusType': - $status = ts('Are you sure you want to disable this Participant Status?') . '

' . ts('Users will no longer be able to select this value when adding or editing Participant Status.'); + $ret['content'] = ts('Are you sure you want to disable this Participant Status?') . '

' . ts('Users will no longer be able to select this value when adding or editing Participant Status.'); break; case 'CRM_Mailing_BAO_Component': - $status = ts('Are you sure you want to disable this component?'); + $ret['content'] = ts('Are you sure you want to disable this component?'); break; case 'CRM_Core_BAO_CustomField': - $status = ts('Are you sure you want to disable this custom data field?'); + $ret['content'] = ts('Are you sure you want to disable this custom data field?'); break; case 'CRM_Core_BAO_CustomGroup': - $status = ts('Are you sure you want to disable this custom data group? Any profile fields that are linked to custom fields of this group will be disabled.'); + $ret['content'] = ts('Are you sure you want to disable this custom data group? Any profile fields that are linked to custom fields of this group will be disabled.'); break; case 'CRM_Core_BAO_MessageTemplate': - $status = ts('Are you sure you want to disable this message tempate?'); + $ret['content'] = ts('Are you sure you want to disable this message tempate?'); break; case 'CRM_ACL_BAO_ACL': - $status = ts('Are you sure you want to disable this ACL?'); + $ret['content'] = ts('Are you sure you want to disable this ACL?'); break; case 'CRM_ACL_BAO_EntityRole': - $status = ts('Are you sure you want to disable this ACL Role Assignment?'); + $ret['content'] = ts('Are you sure you want to disable this ACL Role Assignment?'); break; case 'CRM_Member_BAO_MembershipType': - $status = ts('Are you sure you want to disable this membership type?'); + $ret['content'] = ts('Are you sure you want to disable this membership type?'); break; case 'CRM_Member_BAO_MembershipStatus': - $status = ts('Are you sure you want to disable this membership status rule?'); + $ret['content'] = ts('Are you sure you want to disable this membership status rule?'); break; case 'CRM_Price_BAO_PriceField': - $status = ts('Are you sure you want to disable this price field?'); + $ret['content'] = ts('Are you sure you want to disable this price field?'); break; case 'CRM_Contact_BAO_Group': - $status = ts('Are you sure you want to disable this Group?'); + $ret['content'] = ts('Are you sure you want to disable this Group?'); break; case 'CRM_Core_BAO_OptionGroup': - $status = ts('Are you sure you want to disable this Option?'); + $ret['content'] = ts('Are you sure you want to disable this Option?'); break; case 'CRM_Contact_BAO_ContactType': - $status = ts('Are you sure you want to disable this Contact Type?'); + $ret['content'] = ts('Are you sure you want to disable this Contact Type?'); break; case 'CRM_Core_BAO_OptionValue': - require_once (str_replace('_', DIRECTORY_SEPARATOR, $recordBAO) . '.php'); $label = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $recordID, 'label'); - $status = ts('Are you sure you want to disable the \'%1\' option ?', array(1 => $label)); - $status .= '

' . ts('WARNING - Disabling an option which has been assigned to existing records will result in that option being cleared when the record is edited.'); + $ret['content'] = ts('Are you sure you want to disable the \'%1\' option ?', array(1 => $label)); + $ret['content'] .= '

' . ts('WARNING - Disabling an option which has been assigned to existing records will result in that option being cleared when the record is edited.'); break; case 'CRM_Contribute_BAO_ContributionRecur': $recurDetails = CRM_Contribute_BAO_ContributionRecur::getSubscriptionDetails($recordID); - $status = ts('Are you sure you want to mark this recurring contribution as cancelled?'); - $status .= '

' . ts('WARNING - This action sets the CiviCRM recurring contribution status to Cancelled, but does NOT send a cancellation request to the payment processor. You will need to ensure that this recurring payment (subscription) is cancelled by the payment processor.') . ''; + $ret['content'] = ts('Are you sure you want to mark this recurring contribution as cancelled?'); + $ret['content'] .= '

' . ts('WARNING - This action sets the CiviCRM recurring contribution status to Cancelled, but does NOT send a cancellation request to the payment processor. You will need to ensure that this recurring payment (subscription) is cancelled by the payment processor.') . ''; if ($recurDetails->membership_id) { - $status .= '

' . ts('This recurring contribution is linked to an auto-renew membership. If you cancel it, the associated membership will no longer renew automatically. However, the current membership status will not be affected.') . ''; - } - break; - - case 'CRM_Batch_BAO_Batch': - if ($op == 'close') { - $status = ts('Are you sure you want to close this batch?'); - } - elseif ($op == 'open') { - $status = ts('Are you sure you want to reopen this batch?'); - } - elseif ($op == 'delete') { - $status = ts('Are you sure you want to delete this batch?'); - } - elseif ($op == 'remove') { - $status = ts('Are you sure you want to remove this financial transaction?'); - } - elseif ($op == 'export') { - $status = ts('Are you sure you want to close and export this batch?'); - } - else { - $status = ts('Are you sure you want to assign this financial transaction to the batch?'); + $ret['content'] .= '

' . ts('This recurring contribution is linked to an auto-renew membership. If you cancel it, the associated membership will no longer renew automatically. However, the current membership status will not be affected.') . ''; } break; default: - $status = ts('Are you sure you want to disable this record?'); + $ret['content'] = ts('Are you sure you want to disable this record?'); break; } } - CRM_Core_Page_AJAX::returnJsonResponse($status); + else { + $ret = array('status' => 'error', 'content' => 'Error: Unknown entity type.', 'illegal' => TRUE); + } + CRM_Core_Page_AJAX::returnJsonResponse($ret); } static function getTagList() { diff --git a/CRM/Admin/Page/ContactType.php b/CRM/Admin/Page/ContactType.php index 870e7038b5..169a06b14c 100644 --- a/CRM/Admin/Page/ContactType.php +++ b/CRM/Admin/Page/ContactType.php @@ -73,15 +73,13 @@ class CRM_Admin_Page_ContactType extends CRM_Core_Page_Basic { CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contact_BAO_ContactType' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Contact Type'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contact_BAO_ContactType' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Contact Type'), ), CRM_Core_Action::DELETE => @@ -107,6 +105,7 @@ class CRM_Admin_Page_ContactType extends CRM_Core_Page_Basic { } function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $rows = CRM_Contact_BAO_ContactType::contactTypeInfo(TRUE); foreach ($rows as $key => $value) { $mask = NULL; diff --git a/CRM/Admin/Page/Job.php b/CRM/Admin/Page/Job.php index 2bc2e5c496..7d9305c534 100644 --- a/CRM/Admin/Page/Job.php +++ b/CRM/Admin/Page/Job.php @@ -83,14 +83,12 @@ class CRM_Admin_Page_Job extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_Job' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Scheduled Job'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_Job' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Scheduled Job'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Admin/Page/LocationType.php b/CRM/Admin/Page/LocationType.php index 0ea8f4067d..f1052979c7 100644 --- a/CRM/Admin/Page/LocationType.php +++ b/CRM/Admin/Page/LocationType.php @@ -71,14 +71,12 @@ class CRM_Admin_Page_LocationType extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_LocationType' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Location Type'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_LocationType' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Location Type'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Admin/Page/MessageTemplates.php b/CRM/Admin/Page/MessageTemplates.php index a2a834b7fd..d9a75806e5 100644 --- a/CRM/Admin/Page/MessageTemplates.php +++ b/CRM/Admin/Page/MessageTemplates.php @@ -100,14 +100,12 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_MessageTemplate' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable this message template'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_MessageTemplate' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable this message template'), ), CRM_Core_Action::DELETE => array( @@ -225,6 +223,7 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { * @access public */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $action = func_num_args() ? func_get_arg(0) : NULL; if ($this->_action & CRM_Core_Action::ADD) { return; diff --git a/CRM/Admin/Page/OptionGroup.php b/CRM/Admin/Page/OptionGroup.php index adbc1e3d6e..0d39c0816d 100644 --- a/CRM/Admin/Page/OptionGroup.php +++ b/CRM/Admin/Page/OptionGroup.php @@ -77,14 +77,12 @@ class CRM_Admin_Page_OptionGroup extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionGroup' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Option'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionGroup' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Option'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Admin/Page/OptionValue.php b/CRM/Admin/Page/OptionValue.php index 396a97f2a1..7f28c87ce9 100644 --- a/CRM/Admin/Page/OptionValue.php +++ b/CRM/Admin/Page/OptionValue.php @@ -81,14 +81,12 @@ class CRM_Admin_Page_OptionValue 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 Option Value'), ), 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 Option Value'), ), CRM_Core_Action::DELETE => array( @@ -149,6 +147,7 @@ class CRM_Admin_Page_OptionValue extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $dao = new CRM_Core_DAO_OptionValue(); $dao->option_group_id = $this->_gid; diff --git a/CRM/Admin/Page/Options.php b/CRM/Admin/Page/Options.php index e8d3c4a239..de748d0e6c 100644 --- a/CRM/Admin/Page/Options.php +++ b/CRM/Admin/Page/Options.php @@ -211,7 +211,6 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic { * @static */ function browse() { - CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $groupParams = array('name' => self::$_gName); $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight'); diff --git a/CRM/Admin/Page/ParticipantStatus.php b/CRM/Admin/Page/ParticipantStatus.php index c87e99e18b..5140c14b75 100644 --- a/CRM/Admin/Page/ParticipantStatus.php +++ b/CRM/Admin/Page/ParticipantStatus.php @@ -55,14 +55,12 @@ class CRM_Admin_Page_ParticipantStatus extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Event_BAO_ParticipantStatusType' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Status'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Event_BAO_ParticipantStatusType' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Status'), ), ); @@ -71,6 +69,7 @@ class CRM_Admin_Page_ParticipantStatus extends CRM_Core_Page_Basic { } function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $statusTypes = array(); $dao = new CRM_Event_DAO_ParticipantStatusType; diff --git a/CRM/Admin/Page/PaymentProcessor.php b/CRM/Admin/Page/PaymentProcessor.php index b5a4b5e837..2196e12513 100644 --- a/CRM/Admin/Page/PaymentProcessor.php +++ b/CRM/Admin/Page/PaymentProcessor.php @@ -71,14 +71,12 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Financial_BAO_PaymentProcessor' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Payment Processor'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Financial_BAO_PaymentProcessor' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Payment Processor'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Admin/Page/PaymentProcessorType.php b/CRM/Admin/Page/PaymentProcessorType.php index c1e9cecb28..d324b330c5 100644 --- a/CRM/Admin/Page/PaymentProcessorType.php +++ b/CRM/Admin/Page/PaymentProcessorType.php @@ -71,14 +71,12 @@ class CRM_Admin_Page_PaymentProcessorType extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Financial_BAO_PaymentProcessorType' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Payment ProcessorType'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Financial_BAO_PaymentProcessorType' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Payment ProcessorType'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Admin/Page/RelationshipType.php b/CRM/Admin/Page/RelationshipType.php index 83353333d2..ae551ea2e4 100644 --- a/CRM/Admin/Page/RelationshipType.php +++ b/CRM/Admin/Page/RelationshipType.php @@ -77,14 +77,12 @@ class CRM_Admin_Page_RelationshipType extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contact_BAO_RelationshipType' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Relationship Type'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contact_BAO_RelationshipType' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Relationship Type'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Admin/Page/ScheduleReminders.php b/CRM/Admin/Page/ScheduleReminders.php index 6c684af78d..8d117b33d6 100644 --- a/CRM/Admin/Page/ScheduleReminders.php +++ b/CRM/Admin/Page/ScheduleReminders.php @@ -73,14 +73,12 @@ class CRM_Admin_Page_ScheduleReminders extends CRM_Core_Page_Basic { ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_ActionSchedule' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Label Format'), ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_ActionSchedule' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Label Format'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Badge/Page/Layout.php b/CRM/Badge/Page/Layout.php index a60ec2b478..fe8ec2974b 100644 --- a/CRM/Badge/Page/Layout.php +++ b/CRM/Badge/Page/Layout.php @@ -71,14 +71,12 @@ class CRM_Badge_Page_Layout extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_DAO_PrintLabel' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Badge Layout'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_DAO_PrintLabel' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Badge Layout'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Campaign/Page/Campaign.php b/CRM/Campaign/Page/Campaign.php index 3523409c36..d17f23ec3b 100644 --- a/CRM/Campaign/Page/Campaign.php +++ b/CRM/Campaign/Page/Campaign.php @@ -65,14 +65,12 @@ class CRM_Campaign_Page_Campaign extends CRM_Core_Page { CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), 'title' => ts('Disable Campaign'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Campaign' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), 'title' => ts('Enable Campaign'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Campaign' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', ), CRM_Core_Action::DELETE => array( 'name' => ts('Delete'), @@ -86,6 +84,7 @@ class CRM_Campaign_Page_Campaign extends CRM_Core_Page { } function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $campaigns = CRM_Campaign_BAO_Campaign::getCampaignSummary(); diff --git a/CRM/Campaign/Page/DashBoard.php b/CRM/Campaign/Page/DashBoard.php index 7fceadf1df..de364c9b6c 100644 --- a/CRM/Campaign/Page/DashBoard.php +++ b/CRM/Campaign/Page/DashBoard.php @@ -67,14 +67,12 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), 'title' => ts('Disable Campaign'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Campaign' . '\',\'' . 'enable-disable' . '\',\'' . NULL . '\',\'' . 'campaign_row' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), 'title' => ts('Enable Campaign'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Campaign' . '\',\'' . 'disable-enable' . '\',\'' . NULL . '\',\'' . 'campaign_row' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', ), CRM_Core_Action::DELETE => array( 'name' => ts('Delete'), @@ -100,14 +98,12 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'enable-disable' . '\',\'' . NULL . '\',\'' . 'survey_row' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Survey'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'disable-enable' . '\',\'' . NULL . '\',\'' . 'survey_row' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Survey'), ), CRM_Core_Action::DELETE => array( @@ -133,14 +129,12 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { ); self::$_petitionActionLinks[CRM_Core_Action::DISABLE] = array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'enable-disable' . '\',\'' . NULL . '\',\'' . 'petition_row' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Petition'), ); self::$_petitionActionLinks[CRM_Core_Action::ENABLE] = array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'disable-enable' . '\',\'' . NULL . '\',\'' . 'petition_row' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Petition'), ); self::$_petitionActionLinks[CRM_Core_Action::DELETE] = array( @@ -426,6 +420,7 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { } function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $this->_tabs = array('campaign' => ts('Campaigns'), 'survey' => ts('Surveys'), 'petition' => ts('Petitions'), diff --git a/CRM/Campaign/Page/Survey.php b/CRM/Campaign/Page/Survey.php index 0d0448f0b2..02bca24b49 100644 --- a/CRM/Campaign/Page/Survey.php +++ b/CRM/Campaign/Page/Survey.php @@ -53,14 +53,12 @@ class CRM_Campaign_Page_Survey extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Survey'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Survey'), ), CRM_Core_Action::DELETE => array( @@ -75,6 +73,7 @@ class CRM_Campaign_Page_Survey extends CRM_Core_Page { } function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $surveys = CRM_Campaign_BAO_Survey::getSurveySummary(); diff --git a/CRM/Campaign/Page/SurveyType.php b/CRM/Campaign/Page/SurveyType.php index 5227132789..37174e2c67 100644 --- a/CRM/Campaign/Page/SurveyType.php +++ b/CRM/Campaign/Page/SurveyType.php @@ -117,14 +117,12 @@ class CRM_Campaign_Page_SurveyType 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 => $this->_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 => $this->_gName)), ), CRM_Core_Action::DELETE => array( @@ -157,6 +155,7 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign'); $groupParams = array('name' => $this->_gName); diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index ac1a27fa0b..da200837d4 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -1184,14 +1184,12 @@ WHERE {$whereClause}"; ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contact_BAO_Group' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Group'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contact_BAO_Group' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Group'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Contribute/Page/ContributionPage.php b/CRM/Contribute/Page/ContributionPage.php index 8c97a37225..54a2902593 100644 --- a/CRM/Contribute/Page/ContributionPage.php +++ b/CRM/Contribute/Page/ContributionPage.php @@ -85,13 +85,11 @@ class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page { CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), 'title' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contribute_BAO_ContributionPage' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contribute_BAO_ContributionPage' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Contribute/Page/ManagePremiums.php b/CRM/Contribute/Page/ManagePremiums.php index 3ee39d0d45..bbc1f161dd 100644 --- a/CRM/Contribute/Page/ManagePremiums.php +++ b/CRM/Contribute/Page/ManagePremiums.php @@ -77,14 +77,12 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contribute_BAO_ManagePremiums' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Premium'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contribute_BAO_ManagePremiums' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Premium'), ), CRM_Core_Action::DELETE => array( @@ -143,6 +141,7 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all custom groups sorted by weight $premiums = array(); $dao = new CRM_Contribute_DAO_Product(); diff --git a/CRM/Contribute/Page/Tab.php b/CRM/Contribute/Page/Tab.php index d80848fcde..bedc1f5f67 100644 --- a/CRM/Contribute/Page/Tab.php +++ b/CRM/Contribute/Page/Tab.php @@ -114,8 +114,7 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page { CRM_Core_Action::DISABLE => array( 'name' => ts('Cancel'), 'title' => ts('Cancel'), - 'extra' => 'onclick = "enableDisable( %%crid%%,\'' . 'CRM_Contribute_BAO_ContributionRecur' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', ), ); } @@ -147,6 +146,7 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page { * @access public */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // add annual contribution $annual = array(); diff --git a/CRM/Custom/Page/Field.php b/CRM/Custom/Page/Field.php index d0a53d861c..a31ae10f4d 100644 --- a/CRM/Custom/Page/Field.php +++ b/CRM/Custom/Page/Field.php @@ -124,6 +124,7 @@ class CRM_Custom_Page_Field extends CRM_Core_Page { * @access public */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $customField = array(); $customFieldBAO = new CRM_Core_BAO_CustomField(); @@ -288,7 +289,6 @@ class CRM_Custom_Page_Field extends CRM_Core_Page { $this->preview($id); } else { - CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $this->browse(); } diff --git a/CRM/Custom/Page/Group.php b/CRM/Custom/Page/Group.php index 5f0984f98f..b26cea535d 100644 --- a/CRM/Custom/Page/Group.php +++ b/CRM/Custom/Page/Group.php @@ -82,14 +82,12 @@ class CRM_Custom_Page_Group extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_CustomGroup' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Custom Set'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_CustomGroup' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Custom Set'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Custom/Page/Option.php b/CRM/Custom/Page/Option.php index 95c2a65585..73cdb12c6a 100644 --- a/CRM/Custom/Page/Option.php +++ b/CRM/Custom/Page/Option.php @@ -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; diff --git a/CRM/Event/Page/ManageEvent.php b/CRM/Event/Page/ManageEvent.php index 7af2bac53c..a52317e577 100644 --- a/CRM/Event/Page/ManageEvent.php +++ b/CRM/Event/Page/ManageEvent.php @@ -70,14 +70,12 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page { self::$_actionLinks = array( CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Event_BAO_Event' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Event'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Event_BAO_Event' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Event'), ), CRM_Core_Action::DELETE => array( @@ -230,6 +228,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page { * @return void */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter', 'String', $this diff --git a/CRM/Financial/Page/FinancialAccount.php b/CRM/Financial/Page/FinancialAccount.php index 7da3b02267..5b90a3d1f4 100644 --- a/CRM/Financial/Page/FinancialAccount.php +++ b/CRM/Financial/Page/FinancialAccount.php @@ -70,13 +70,11 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\''. 'CRM_Financial_BAO_FinancialAccount' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Financial Type'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\''. 'CRM_Financial_BAO_FinancialAccount' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Financial Type'), ), @@ -128,6 +126,7 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all custom groups sorted by weight $contributionType = array(); $dao = new CRM_Financial_DAO_FinancialAccount(); diff --git a/CRM/Financial/Page/FinancialType.php b/CRM/Financial/Page/FinancialType.php index 3559b4d90c..d00c6c6dbe 100644 --- a/CRM/Financial/Page/FinancialType.php +++ b/CRM/Financial/Page/FinancialType.php @@ -76,13 +76,11 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\''. 'CRM_Financial_BAO_FinancialType' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Financial Type'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\''. 'CRM_Financial_BAO_FinancialType' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Financial Type'), ), @@ -134,6 +132,7 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all financial types sorted by weight $financialType = array(); $dao = new CRM_Financial_DAO_FinancialType(); diff --git a/CRM/Mailing/Page/Component.php b/CRM/Mailing/Page/Component.php index f53d2125f4..9daf5bef40 100644 --- a/CRM/Mailing/Page/Component.php +++ b/CRM/Mailing/Page/Component.php @@ -72,14 +72,12 @@ class CRM_Mailing_Page_Component extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Mailing_BAO_Component' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Mailing Component'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Mailing_BAO_Component' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Mailing Component'), ), ); diff --git a/CRM/Member/Page/MembershipStatus.php b/CRM/Member/Page/MembershipStatus.php index cb80347356..07c5b07579 100644 --- a/CRM/Member/Page/MembershipStatus.php +++ b/CRM/Member/Page/MembershipStatus.php @@ -71,14 +71,12 @@ class CRM_Member_Page_MembershipStatus extends CRM_Core_Page_Basic { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Member_BAO_MembershipStatus' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Membership Status'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Member_BAO_MembershipStatus' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Membership Status'), ), CRM_Core_Action::DELETE => array( @@ -136,6 +134,7 @@ class CRM_Member_Page_MembershipStatus extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all custom groups sorted by weight $membershipStatus = array(); $dao = new CRM_Member_DAO_MembershipStatus(); diff --git a/CRM/Member/Page/MembershipType.php b/CRM/Member/Page/MembershipType.php index 8b530cf97c..0ad3122ced 100644 --- a/CRM/Member/Page/MembershipType.php +++ b/CRM/Member/Page/MembershipType.php @@ -62,14 +62,12 @@ class CRM_Member_Page_MembershipType extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Member_BAO_MembershipType' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Membership Type'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Member_BAO_MembershipType' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Membership Type'), ), CRM_Core_Action::DELETE => array( @@ -110,6 +108,7 @@ class CRM_Member_Page_MembershipType extends CRM_Core_Page { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); // get all membership types sorted by weight $membershipType = array(); $dao = new CRM_Member_DAO_MembershipType(); diff --git a/CRM/Price/Page/Field.php b/CRM/Price/Page/Field.php index 46494f77a6..f78efa343d 100644 --- a/CRM/Price/Page/Field.php +++ b/CRM/Price/Page/Field.php @@ -93,14 +93,12 @@ class CRM_Price_Page_Field extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%fid%%,\'' . 'CRM_Price_BAO_PriceField' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Price'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%fid%%,\'' . 'CRM_Price_BAO_PriceField' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Price'), ), CRM_Core_Action::DELETE => array( @@ -124,6 +122,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page { * @access public */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $priceField = array(); $priceFieldBAO = new CRM_Price_BAO_PriceField(); diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index 8662d8c4ef..8f7220e393 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -99,14 +99,12 @@ class CRM_Price_Page_Option extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%oid%%,\'' . 'CRM_Price_BAO_PriceFieldValue' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Price Option'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%oid%%,\'' . 'CRM_Price_BAO_PriceFieldValue' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Price Option'), ), CRM_Core_Action::DELETE => array( @@ -129,6 +127,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { * @access public */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $customOption = array(); CRM_Price_BAO_PriceFieldValue::getValues($this->_fid, $customOption); $config = CRM_Core_Config::singleton(); diff --git a/CRM/Price/Page/Set.php b/CRM/Price/Page/Set.php index a0a7c9cbdd..c6523bb90f 100644 --- a/CRM/Price/Page/Set.php +++ b/CRM/Price/Page/Set.php @@ -84,14 +84,12 @@ class CRM_Price_Page_Set extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%sid%%,\'' . 'CRM_Price_BAO_PriceSet' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Price Set'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%sid%%,\'' . 'CRM_Price_BAO_PriceSet' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Price Set'), ), CRM_Core_Action::DELETE => array( diff --git a/CRM/Report/Page/Options.php b/CRM/Report/Page/Options.php index 9130a3831d..9adf3b1ed6 100644 --- a/CRM/Report/Page/Options.php +++ b/CRM/Report/Page/Options.php @@ -126,14 +126,12 @@ class CRM_Report_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( @@ -167,6 +165,7 @@ class CRM_Report_Page_Options extends CRM_Core_Page_Basic { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $groupParams = array('name' => self::$_gName); $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'weight'); $gName = self::$_gName; diff --git a/CRM/SMS/Page/Provider.php b/CRM/SMS/Page/Provider.php index 4b58e551d3..1f06458f9b 100644 --- a/CRM/SMS/Page/Provider.php +++ b/CRM/SMS/Page/Provider.php @@ -77,14 +77,12 @@ class CRM_SMS_Page_Provider extends CRM_Core_Page_Basic { ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_SMS_BAO_Provider' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Provider'), ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_SMS_BAO_Provider' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Provider'), ), ); diff --git a/CRM/UF/Page/Field.php b/CRM/UF/Page/Field.php index bd3ab1e047..37b6701798 100644 --- a/CRM/UF/Page/Field.php +++ b/CRM/UF/Page/Field.php @@ -81,14 +81,12 @@ class CRM_UF_Page_Field extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_UFField' . '\',\'' . 'enable-disable' . '\',0,\'UFField\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable CiviCRM Profile Field'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_UFField' . '\',\'' . 'disable-enable' . '\',0,\'UFField\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable CiviCRM Profile Field'), ), CRM_Core_Action::DELETE => array( @@ -110,6 +108,7 @@ class CRM_UF_Page_Field extends CRM_Core_Page { * @static */ function browse() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $ufField = array(); $ufFieldBAO = new CRM_Core_BAO_UFField(); diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 6494f3ea56..8279ba3980 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -90,14 +90,12 @@ class CRM_UF_Page_Group extends CRM_Core_Page { ), CRM_Core_Action::DISABLE => array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_UFGroup' . '\',\'' . 'enable-disable\',0,\'UFGroup' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable CiviCRM Profile Group'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_UFGroup' . '\',\'' . 'disable-enable\',0,\'UFGroup' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable CiviCRM Profile Group'), ), CRM_Core_Action::DELETE => array( diff --git a/templates/CRM/Admin/Page/ContactType.tpl b/templates/CRM/Admin/Page/ContactType.tpl index eeb3a78240..3220342843 100644 --- a/templates/CRM/Admin/Page/ContactType.tpl +++ b/templates/CRM/Admin/Page/ContactType.tpl @@ -35,7 +35,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"} @@ -47,10 +48,10 @@ {foreach from=$rows item=row} - - + + - + {/foreach} diff --git a/templates/CRM/Admin/Page/Extensions.tpl b/templates/CRM/Admin/Page/Extensions.tpl index 6bc3e1ef21..3519adffb0 100644 --- a/templates/CRM/Admin/Page/Extensions.tpl +++ b/templates/CRM/Admin/Page/Extensions.tpl @@ -39,7 +39,8 @@ {include file="CRM/Admin/Page/Extensions/About.tpl"} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
diff --git a/templates/CRM/Admin/Page/Extensions/AddNew.tpl b/templates/CRM/Admin/Page/Extensions/AddNew.tpl index 3d38ef14f7..1274a773c0 100644 --- a/templates/CRM/Admin/Page/Extensions/AddNew.tpl +++ b/templates/CRM/Admin/Page/Extensions/AddNew.tpl @@ -1,7 +1,7 @@ {* Display a table of remotely-available extensions -Depends: CRM/common/enableDisable.tpl and CRM/common/jsortable.tpl +Depends: CRM/common/enableDisableApi.tpl and CRM/common/jsortable.tpl *} {if $remoteExtensionRows}
diff --git a/templates/CRM/Admin/Page/Extensions/Main.tpl b/templates/CRM/Admin/Page/Extensions/Main.tpl index d9c8a8331f..fe07c0ffe5 100644 --- a/templates/CRM/Admin/Page/Extensions/Main.tpl +++ b/templates/CRM/Admin/Page/Extensions/Main.tpl @@ -1,7 +1,7 @@ {* Display a table of locally-available extensions. -Depends: CRM/common/enableDisable.tpl and CRM/common/jsortable.tpl +Depends: CRM/common/enableDisableApi.tpl and CRM/common/jsortable.tpl *} {if $localExtensionRows}
@@ -19,7 +19,7 @@ Depends: CRM/common/enableDisable.tpl and CRM/common/jsortable.tpl
{foreach from=$localExtensionRows key=extKey item=row} - +
{ts}{$row.label}{/ts}
{ts}{$row.label}{/ts} {if $row.parent}{ts}{$row.parent_label}{/ts}{else}{ts}(built-in){/ts}{/if}{$row.description}{$row.description} {$row.action|replace:'xx':$row.id}
 {$row.label}
({$row.key}) {if $extAddNewEnabled && $remoteExtensionRows[$extKey] && $remoteExtensionRows[$extKey].is_upgradeable} diff --git a/templates/CRM/Admin/Page/Job.tpl b/templates/CRM/Admin/Page/Job.tpl index c9aa8bc101..f67d3374dd 100644 --- a/templates/CRM/Admin/Page/Job.tpl +++ b/templates/CRM/Admin/Page/Job.tpl @@ -44,7 +44,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"}
@@ -54,7 +55,7 @@ {foreach from=$rows item=row} - +
{ts}Name (Frequency)/Description{/ts}
{$row.name} ({$row.run_frequency})
{$row.description}
{ts}API Entity:{/ts} {$row.api_entity}
diff --git a/templates/CRM/Admin/Page/JobLog.tpl b/templates/CRM/Admin/Page/JobLog.tpl index a17114c98a..886c1f8a47 100644 --- a/templates/CRM/Admin/Page/JobLog.tpl +++ b/templates/CRM/Admin/Page/JobLog.tpl @@ -39,7 +39,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} @@ -47,7 +48,7 @@ {foreach from=$rows item=row} - +
{ts}Date{/ts}{ts}Command{/ts}/{ts}Job Status{/ts}/{ts}Additional Information{/ts}
{$row.run_time} {$row.name} diff --git a/templates/CRM/Admin/Page/LocationType.tpl b/templates/CRM/Admin/Page/LocationType.tpl index 5a56359883..3756ad48b8 100644 --- a/templates/CRM/Admin/Page/LocationType.tpl +++ b/templates/CRM/Admin/Page/LocationType.tpl @@ -35,7 +35,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"} @@ -50,7 +51,7 @@ {foreach from=$rows item=row} - + diff --git a/templates/CRM/Admin/Page/MessageTemplates.tpl b/templates/CRM/Admin/Page/MessageTemplates.tpl index d2e6b5a74e..b0f2637130 100644 --- a/templates/CRM/Admin/Page/MessageTemplates.tpl +++ b/templates/CRM/Admin/Page/MessageTemplates.tpl @@ -94,7 +94,8 @@ {* create two selector tabs, first being the ‘user’ one, the second being the ‘workflow’ one *} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"} {foreach from=$rows item=template_row key=type}
@@ -122,7 +123,7 @@
{foreach from=$template_row item=row} - + {if $type eq 'userTemplates'} diff --git a/templates/CRM/Admin/Page/OptionGroup.tpl b/templates/CRM/Admin/Page/OptionGroup.tpl index 598171adcb..3054e66a39 100644 --- a/templates/CRM/Admin/Page/OptionGroup.tpl +++ b/templates/CRM/Admin/Page/OptionGroup.tpl @@ -38,7 +38,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"}
{$row.name} {$row.display_name} {$row.vcard_name}
{$row.msg_title}{$row.msg_subject}
@@ -46,7 +47,7 @@ {foreach from=$rows item=row} - + diff --git a/templates/CRM/Admin/Page/OptionValue.tpl b/templates/CRM/Admin/Page/OptionValue.tpl index 050d6b3a5a..4a9d60038c 100644 --- a/templates/CRM/Admin/Page/OptionValue.tpl +++ b/templates/CRM/Admin/Page/OptionValue.tpl @@ -37,7 +37,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
{ts}Title{/ts}
{if $row.title}{$row.title}{else}( {ts}none{/ts} ){/if} {$row.name} {ts}Options{/ts}
@@ -55,8 +56,8 @@ {foreach from=$rows item=row} - - + + diff --git a/templates/CRM/Admin/Page/ParticipantStatus.tpl b/templates/CRM/Admin/Page/ParticipantStatus.tpl index 27b1b69df2..395cfe7cb1 100644 --- a/templates/CRM/Admin/Page/ParticipantStatus.tpl +++ b/templates/CRM/Admin/Page/ParticipantStatus.tpl @@ -31,7 +31,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"}
{$row.label}
{$row.label} {$row.value} {$row.description} {$row.weight}
@@ -45,8 +46,8 @@ {foreach from=$rows item=row} - - + + diff --git a/templates/CRM/Admin/Page/PaymentProcessor.tpl b/templates/CRM/Admin/Page/PaymentProcessor.tpl index 33beefb106..d69ec827a2 100644 --- a/templates/CRM/Admin/Page/PaymentProcessor.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessor.tpl @@ -36,7 +36,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"}
{ts}Label{/ts}
{$row.label}
{$row.label} {$row.name} ({$row.id}) {$row.class} {if $row.is_reserved}{ts}Reserved{/ts}{/if}
@@ -48,7 +49,7 @@ {foreach from=$rows item=row} - + diff --git a/templates/CRM/Admin/Page/PaymentProcessorType.tpl b/templates/CRM/Admin/Page/PaymentProcessorType.tpl index a927654d43..95213b3c18 100644 --- a/templates/CRM/Admin/Page/PaymentProcessorType.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessorType.tpl @@ -36,7 +36,8 @@

{strip} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"}
{ts}Name{/ts}
{$row.name} {$row.payment_processor_type} {$row.description}
@@ -47,9 +48,9 @@ {foreach from=$rows item=row} - + - + diff --git a/templates/CRM/Admin/Page/RelationshipType.tpl b/templates/CRM/Admin/Page/RelationshipType.tpl index 51f711ce08..45f9f7dc45 100644 --- a/templates/CRM/Admin/Page/RelationshipType.tpl +++ b/templates/CRM/Admin/Page/RelationshipType.tpl @@ -45,12 +45,13 @@ {strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
{ts}Name{/ts}
{$row.name}{$row.title}{$row.title} {$row.description} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.is_default eq 1}{ts}Default{/ts}{/if} 
- + @@ -59,9 +60,9 @@ {foreach from=$rows item=row} - - - + + + diff --git a/templates/CRM/Admin/Page/Reminders.tpl b/templates/CRM/Admin/Page/Reminders.tpl index 77439fb3ee..c43c32729a 100755 --- a/templates/CRM/Admin/Page/Reminders.tpl +++ b/templates/CRM/Admin/Page/Reminders.tpl @@ -27,7 +27,8 @@ {* this template is for configuring Scheduled Reminders Table*} {strip} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
{ts}Relationship A to B{/ts}{t unction browses}Relationship A to B{/ts} {ts}Relationship B to A{/ts} {ts}Contact Type A{/ts} {ts}Contact Type B{/ts}
{$row.label_a_b}{$row.label_b_a}
{$row.label_a_b}{$row.label_b_a} {if $row.contact_type_a_display} {$row.contact_type_a_display} {if $row.contact_sub_type_a} - {$row.contact_sub_type_a} {/if}{else} {ts}All Contacts{/ts} {/if}
@@ -43,8 +44,8 @@ {foreach from=$rows item=row} - - + + diff --git a/templates/CRM/Badge/Page/Layout.tpl b/templates/CRM/Badge/Page/Layout.tpl index 6701144f42..93e0af073b 100644 --- a/templates/CRM/Badge/Page/Layout.tpl +++ b/templates/CRM/Badge/Page/Layout.tpl @@ -35,7 +35,8 @@
{strip} {* handle enable/disable actions*} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
{$row.title}
{$row.title} {$row.entity} - {$row.value} {if $row.absolute_date}{$row.absolute_date|crmDate}{else}{$row.start_action_offset} {$row.start_action_unit}{if $row.start_action_offset > 1}{ts}(s){/ts}{/if} {$row.start_action_condition} {$row.entityDate}{/if} {$row.status}
@@ -50,7 +51,7 @@ {foreach from=$rows item=row} - +
{$row.title}{$row.title} {$row.description} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} diff --git a/templates/CRM/Campaign/Form/Search/Campaign.tpl b/templates/CRM/Campaign/Form/Search/Campaign.tpl index e39864aa26..2e7ab3157d 100755 --- a/templates/CRM/Campaign/Form/Search/Campaign.tpl +++ b/templates/CRM/Campaign/Form/Search/Campaign.tpl @@ -38,7 +38,8 @@ {* load campaign selector *} - {include file="CRM/common/enableDisable.tpl"} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/crmeditable.tpl"} {literal}