// finally browse the acl's
if ($action & CRM_Core_Action::BROWSE) {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$this->browse();
}
* @static
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
// get all acl's sorted by weight
$acl = array();
// 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
* @static
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
// get all acl's sorted by weight
$entityRoles = array();
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))) . ' <br/><br/>' . 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))) . ' <br/><br/>' . 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);
}
$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)) . "<br/> $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?') . '<br/><br/>' . 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?') . '<br/><br/>' . 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?') . ' <br/><br/>' . 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?') . ' <br/><br/>' . 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?') . ' <br/><br/>' . 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?') . ' <br/><br/>' . 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?') . '<br/><br/> ' . 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?') . '<br/><br/> ' . 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 .= '<br /><br />' . 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'] .= '<br /><br />' . 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 .= '<br /><br /><strong>' . 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.') . '</strong>';
+ $ret['content'] = ts('Are you sure you want to mark this recurring contribution as cancelled?');
+ $ret['content'] .= '<br /><br /><strong>' . 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.') . '</strong>';
if ($recurDetails->membership_id) {
- $status .= '<br /><br /><strong>' . 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.') . '</strong>';
- }
- 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'] .= '<br /><br /><strong>' . 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.') . '</strong>';
}
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() {
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 =>
}
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;
),
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(
),
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(
),
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(
* @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;
),
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(
),
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(
* @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;
* @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');
),
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'),
),
);
}
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$statusTypes = array();
$dao = new CRM_Event_DAO_ParticipantStatusType;
),
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(
),
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(
),
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(
),
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(
),
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(
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'),
}
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$campaigns = CRM_Campaign_BAO_Campaign::getCampaignSummary();
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'),
),
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(
);
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(
}
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$this->_tabs = array('campaign' => ts('Campaigns'),
'survey' => ts('Surveys'),
'petition' => ts('Petitions'),
),
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(
}
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$surveys = CRM_Campaign_BAO_Survey::getSurveySummary();
),
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(
* @static
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
$groupParams = array('name' => $this->_gName);
),
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(
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(
),
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(
* @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();
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',
),
);
}
* @access public
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
// add annual contribution
$annual = array();
* @access public
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$customField = array();
$customFieldBAO = new CRM_Core_BAO_CustomField();
$this->preview($id);
}
else {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$this->browse();
}
),
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(
),
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(
* @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;
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(
* @return void
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter',
'String',
$this
),
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'),
),
* @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();
),
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'),
),
* @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();
),
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'),
),
);
),
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(
* @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();
),
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(
* @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();
),
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(
* @access public
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$priceField = array();
$priceFieldBAO = new CRM_Price_BAO_PriceField();
),
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(
* @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();
),
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(
),
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(
* @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;
),
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'),
),
);
),
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(
* @static
*/
function browse() {
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$ufField = array();
$ufFieldBAO = new CRM_Core_BAO_UFField();
),
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(
<div>
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-contactType {if NOT $row.is_active} disabled{/if}">
- <td class="crm-contactType-label">{ts}{$row.label}{/ts}</td>
+ <tr id="contact_type-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-contactType crm-entity {if NOT $row.is_active} disabled{/if}">
+ <td class="crm-contactType-label crm-editable" data-field="label">{ts}{$row.label}{/ts}</td>
<td class="crm-contactType-parent">{if $row.parent}{ts}{$row.parent_label}{/ts}{else}{ts}(built-in){/ts}{/if}</td>
- <td class="crm-contactType-description">{$row.description}</td>
+ <td class="crm-contactType-description crm-editable" data-field="description">{$row.description}</td>
<td>{$row.action|replace:'xx':$row.id}</td>
</tr>
{/foreach}
{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"}
<div id="mainTabContainer" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
{*
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}
<div id="extensions-addnew">
{*
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}
<div id="extensions">
</thead>
<tbody>
{foreach from=$localExtensionRows key=extKey item=row}
- <tr id="row_{$row.id}" class="crm-extensions crm-extensions_{$row.id}{if $row.status eq 'disabled'} disabled{/if}{if $row.status eq 'installed-missing' or $row.status eq 'disabled-missing'} extension-missing{/if}{if $row.upgradable} extension-upgradable{elseif $row.status eq 'installed'} extension-installed{/if}">
+ <tr id="extension-{$row.id}" class="crm-entity crm-extension_{$row.id}{if $row.status eq 'disabled'} disabled{/if}{if $row.status eq 'installed-missing' or $row.status eq 'disabled-missing'} extension-missing{/if}{if $row.upgradable} extension-upgradable{elseif $row.status eq 'installed'} extension-installed{/if}">
<td class="crm-extensions-label">
<a class="collapsed" href="#"></a> <strong>{$row.label}</strong><br/>({$row.key})
{if $extAddNewEnabled && $remoteExtensionRows[$extKey] && $remoteExtensionRows[$extKey].is_upgradeable}
<div id="ltype">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<br/><table class="selector">
<tr class="columnheader">
<th >{ts}Name (Frequency)/Description{/ts}</th>
<th ></th>
</tr>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-job {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="job-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-job-name"><strong>{$row.name}</strong> ({$row.run_frequency})<br/>
{$row.description}<br />
{ts}API Entity:{/ts} {$row.api_entity}<br/>
<div id="ltype">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table class="selector">
<tr class="columnheader">
<th >{ts}Date{/ts}</th>
<th >{ts}Command{/ts}/{ts}Job Status{/ts}/{ts}Additional Information{/ts}</th>
</tr>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-job {cycle values="odd-row,even-row"} {$row.class}">
+ <tr id="job-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}">
<td class="crm-joblog-run_datetime">{$row.run_time}</td>
<td class="crm-joblog-name">{$row.name}</td>
<td class="crm-joblog-details">
<div id="ltype">
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class} crm-locationType {if NOT $row.is_active} disabled{/if}">
+ <tr id="location_type-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-entity {if NOT $row.is_active} disabled{/if}">
<td class="crm-locationType-name">{$row.name}</td>
<td class="crm-locationType-display_name">{$row.display_name}</td>
<td class="crm-locationType-vcard_name">{$row.vcard_name}</td>
</ul>
{* 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}
<div id="{if $type eq 'userTemplates'}user{else}workflow{/if}" class='ui-tabs-panel ui-widget-content ui-corner-bottom'>
</thead>
<tbody>
{foreach from=$template_row item=row}
- <tr id="row_{$row.id}" class="{$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="message_template-{$row.id}" class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
<td>{$row.msg_title}</td>
{if $type eq 'userTemplates'}
<td>{$row.msg_subject}</td>
<div id="browseValues">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<tr class="columnheader">
<th>{ts}Title{/ts}</th>
<th></th>
</tr>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}"class="crm-admin-optionGroup {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="optionGroup-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-admin-optionGroup-title">{if $row.title}{$row.title}{else}( {ts}none{/ts} ){/if}</td>
<td class="crm-admin-optionGroup-name">{$row.name}</td>
<td><a href="{crmURL p="civicrm/admin/optionValue" q="gid=`$row.id`&reset=1"}" title="{ts}View and Edit Options{/ts}">{ts}Options{/ts}</a></td>
<div id="browseValues">
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}"class="crm-admin-optionValue {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td class="crm-admin-optionValue-label">{$row.label}</td>
+ <tr id="optionValue-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <td class="crm-admin-optionValue-label crm-editable" data-field="label">{$row.label}</td>
<td class="crm-admin-optionValue-value">{$row.value}</td>
<td class="crm-admin-optionValue-description">{$row.description}</td>
<td class="nowrap crm-admin-optionValue-weight">{$row.weight}</td>
<div class="crm-section participant-status">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Label{/ts}</th>
<th></th>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class=" crm-particpant crm-participant_{$row.id} {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td class="crm-particpant-label">{$row.label}</td>
+ <tr id="particpant_status_type-{$row.id}" class="crm-entity crm-participant_{$row.id} {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <td class="crm-particpant-label crm-editable" data-field="label">{$row.label}</td>
<td class="crm-particpant-name">{$row.name} ({$row.id})</td>
<td class="crm-particpant-class">{$row.class}</td>
<td class="yes-no crm-participant-is_reserved">{if $row.is_reserved}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Reserved{/ts}" />{/if}</td>
<div id="ltype">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table class="selector">
<tr class="columnheader">
<th >{ts}Name{/ts}</th>
<th ></th>
</tr>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-payment_processor {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="payment_processor-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-payment_processor-name">{$row.name}</td>
<td class="crm-payment_processor-payment_processor_type">{$row.payment_processor_type}</td>
<td class="crm-payment_processor-description">{$row.description}</td>
<p></p>
<div class="form-item">
{strip}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<tr class="columnheader">
<th>{ts}Name{/ts}</th>
<th></th>
</tr>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-paymentProcessorType {if NOT $row.is_active} disabled{/if}">
+ <tr id="paymentProcessorType-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-entity {if NOT $row.is_active} disabled{/if}">
<td class="crm-paymentProcessorType-name">{$row.name}</td>
- <td class="crm-paymentProcessorType-title">{$row.title}</td>
+ <td class="crm-paymentProcessorType-title crm-editable" data-field="title">{$row.title}</td>
<td class="crm-paymentProcessorType-description">{$row.description}</td>
<td id="row_{$row.id}_status" class="crm-paymentProcessorType-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<td class="crm-paymentProcessorType-is_default">{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if} </td>
{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"}
<table id="options" class="display">
<thead>
<tr>
- <th id="sortable">{ts}Relationship A to B{/ts}</th>
+ <th id="sortable">{t\function browses}Relationship A to B{/ts}</th>
<th>{ts}Relationship B to A{/ts}</th>
<th>{ts}Contact Type A{/ts}</th>
<th>{ts}Contact Type B{/ts}</th>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if} crm-relationship">
- <td class="crm-relationship-label_a_b">{$row.label_a_b}</td>
- <td class="crm-relationship-label_b_a">{$row.label_b_a}</td>
+ <tr id="relationship_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if} crm-relationship">
+ <td class="crm-relationship-label_a_b crm-editable" data-field="label_a_b">{$row.label_a_b}</td>
+ <td class="crm-relationship-label_b_a crm-editable" data-field="label_b_a">{$row.label_b_a}</td>
<td class="crm-relationship-contact_type_a_display">
{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} </td>
{* 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"}
<table id="scheduleReminders" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-scheduleReminders {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td class="crm-scheduleReminders-title">{$row.title}</td>
+ <tr id="scheduleReminders-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <td class="crm-scheduleReminders-title crm-editable" data-field="title">{$row.title}</td>
<td class="crm-scheduleReminders-value">{$row.entity} - {$row.value}</td>
<td class="crm-scheduleReminders-description">{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}</td>
<td class="crm-scheduleReminders-title">{$row.status}</td>
<div id="badge-layout">
{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"}
<table id="options" class="display">
<thead>
{foreach from=$rows item=row}
<tr id="row_{$row.id}"
class="{cycle values="odd-row,even-row"} {$row.class} crm-badge-layout {if NOT $row.is_active} disabled{/if}">
- <td class="crm-badge-layout-title">{$row.title}</td>
+ <td class="crm-badge-layout-title crm-editable" data-field="title">{$row.title}</td>
<td class="crm-badge-layout-description">{$row.description}</td>
<td id="row_{$row.id}_status" class="crm-badge-layout-is_active">
{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}
{* load campaign selector *}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
{literal}
<script type="text/javascript">
{* load petition selector *}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
{literal}
<script type="text/javascript">
<div id="survey-result-set-dialog" class="hiddenElement"></div>
{* load survey selector *}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
{literal}
<script type="text/javascript">
<div class="action-link">
<a href="{$addCampaignUrl}" class="button"><span>» {ts}Add Campaign{/ts}</span></a>
</div>
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<div id="campaignType">
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$campaigns item=campaign}
- <tr id="row_{$campaign.campaign_id}" {if $campaign.is_active neq 1}class="disabled"{/if}>
- <td>{$campaign.title}</td>
+ <tr id="campaign-{$campaign.campaign_id}" class="crm-entity {if $campaign.is_active neq 1} disabled{/if}">
+ <td class="crm-editable" data-field="title">{$campaign.title}</td>
<td>{$campaign.description}</td>
<td>{$campaign.start_date}</td>
<td>{$campaign.end_date}</td>
<div class="action-link">
<a href="{$addSurveyUrl}" class="button"><span>» {ts}Add Survey{/ts}</span></a>
</div>
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
{include file="CRM/common/jsortable.tpl"}
<div id="surveyList">
<table id="options" class="display">
</tr>
</thead>
{foreach from=$surveys item=survey}
- <tr id="row_{$survey.id}" {if $survey.is_active neq 1}class="disabled"{/if}>
+ <tr id="survey-{$survey.id}" class="crm-entity {if $survey.is_active neq 1} disabled{/if}">
<td>{$survey.title}</td>
<td>{$survey.campaign_id}</td>
<td>{$survey.activity_type_id}</td>
<div class="action-link">
<a href="{$addSurveyUrl}" class="button"><span>» {ts}Add Survey{/ts}</span></a>
</div>
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
{include file="CRM/common/jsortable.tpl"}
<div id="surveyList">
<table id="options" class="display">
</tr>
</thead>
{foreach from=$surveys item=survey}
- <tr id="row_{$survey.id}" {if $survey.is_active neq 1}class="disabled"{/if}>
+ <tr id="survey-{$survey.id}" class="crm-entity {if $survey.is_active neq 1} disabled{/if}">
<td>{$survey.title}</td>
<td>{$survey.campaign_id}</td>
<td>{$survey.activity_type_id}</td>
<div id={$gName}>
{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"}
<table class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-admin-options crm-admin-options_{$row.id} {if NOT $row.is_active} disabled{/if}">
- <td class="crm-admin-options-label">{$row.label}</td>
+ <tr id="option_value-{$row.id}" class="crm-entity crm-admin-options_{$row.id} {if NOT $row.is_active} disabled{/if}">
+ <td class="crm-admin-options-label crm-editable" data-field="label">{$row.label}</td>
<td class="crm-admin-options-value">{$row.value}</td>
<td class="crm-admin-options-description">{$row.description}</td>
<td class="nowrap crm-admin-options-order">{$row.order}</td>
</div>
{/if}
{/if}
-</div>
\ No newline at end of file
+</div>
{include file="CRM/common/pager.tpl" location="top"}
{include file="CRM/common/pagerAToZ.tpl"}
{* 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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="{if NOT $row.is_active} disabled{/if}">
+ <tr id="contribution_page-{$row.id}" class="crm-entity {if NOT $row.is_active} disabled{/if}">
<td><strong>{$row.title}</strong></td>
<td>{$row.id}</td>
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
+--------------------------------------------------------------------+
*}
-{include file="CRM/common/enableDisable.tpl"}
+{include file="CRM/common/enableDisableApi.tpl"}
+{include file="CRM/common/crmeditable.tpl"}
{if $action eq 4} {* when action is view *}
{if $recur}
{foreach from=$recurRows item=row}
{assign var=id value=$row.id}
- <tr id="row_{$row.id}" class="{cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
+ <tr id="contribution_recur-{$row.id}" class="crm-entity {cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
<td>{$row.amount|crmMoney}{if $row.is_test} ({ts}test{/ts}){/if}</td>
<td>{ts}Every{/ts} {$row.frequency_interval} {$row.frequency_unit} </td>
<td>{$row.start_date|crmDate}</td>
<div class="form-item">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Name{/ts}</th>
<th></th>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="contribution_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td>{$row.name}</td>
<td>{$row.description}</td>
<td>{$row.accounting_code}</td>
<p></p>
{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"}
<table id="options" class="display">
<thead>
<div id="custom_group">
{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"}
<table id="options" class="display">
<thead>
{/if}
{/if}
{/if}
-{include file="CRM/common/crmeditable.tpl"}
<div class="form-item">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table class="selector">
<tr class="columnheader">
<th>{ts}Label{/ts}</th>
</div>
{/if}
{/if}
-
-{include file="CRM/common/crmeditable.tpl"}
-
{include file="CRM/common/pager.tpl" location="top"}
{include file="CRM/common/pagerAToZ.tpl"}
{* 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"}
<table id="options" class="display">
<thead>
</thead>
{foreach from=$rows key=keys item=row}
{if $keys neq 'tab'}
- <tr id="row_{$row.id}" class="{if NOT $row.is_active} disabled{/if}">
+ <tr id="event-{$row.id}" class="crm-entity {if NOT $row.is_active} disabled{/if}">
<td class="crm-event_{$row.id}">
<a href="{crmURL p='civicrm/event/info' q="id=`$row.id`&reset=1"}"
title="{ts}View event info page{/ts}" class="bold">{$row.title}</a> ({ts}ID:{/ts} {$row.id})
<div class="form-item">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table id="crm-financial_accounts" class="display">
<thead class="sticky">
<th>{ts}Name{/ts}</th>
<th></th>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="financial_account-{$row.id} "class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td>{$row.name}</td>
<td>{$row.description}</td>
<td>{$row.accounting_code}</td>
<div class="form-item">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Name{/ts}</th>
{/if}
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Relationship{/ts}</th>
</table>
{* handle enable/disable actions*}
-{include file="CRM/common/enableDisable.tpl"}
+{include file="CRM/common/enableDisableApi.tpl"}
+{include file="CRM/common/crmeditable.tpl"}
{literal}
<script type="text/javascript">
<div class="form-item">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Name{/ts}</th>
<div id="membership_status_id">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Status{/ts}</th>
<th></th>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} {if NOT $row.is_active} disabled{/if} crm-membership-status">
- <td class="crm-membership-status-label">{$row.label}</td>
+ <tr id="membership_status-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class} {if NOT $row.is_active} disabled{/if} crm-membership-status">
+ <td class="crm-membership-status-label crm-editable" data-field="label">{$row.label}</td>
<td class="crm-membership-status-start_event">{$row.start_event}</td>
<td class="crm-membership-status-end_event">{$row.end_event}</td>
<td class="crm-membership-status-is_current_member">{if $row.is_current_member eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<div id="membership_type">
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="{cycle values='odd-row,even-row'} {$row.class} crm-membership-type {if NOT $row.is_active} disabled{/if}">
- <td class="crm-membership-type-type_name">{$row.name}</td>
+ <tr id="membership_type-{$row.id}" class="crm-entity {cycle values='odd-row,even-row'} {$row.class} crm-membership-type {if NOT $row.is_active} disabled{/if}">
+ <td class="crm-membership-type-type_name crm-editable" data-field="name">{$row.name}</td>
<td class="crm-memberhip-type-period_type">{$row.period_type}</td>
<td class="crm-membership-type-fixed_period_start_day">{$row.fixed_period_start_day}</td>
<td class="crm-membership-type-minimum_fee" align="right">{$row.minimum_fee|crmMoney}</td>
<div id="field_page">
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$priceField key=fid item=row}
- <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td>{$row.label}</td>
+ <tr id="price_field-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <td class="crm-editable" data-field="label">{$row.label}</td>
<td>{$row.html_type}</td>
<td class="nowrap">{$row.order}</td>
<td>{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<p></p>
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$customOption item=row}
- <tr id="row_{$row.id}"class=" crm-price-option crm-price-option_{$row.id} {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td class="crm-price-option-label">{$row.label}</td>
+ <tr id="price_option-{$row.id}" class="crm-entity crm-price-option_{$row.id} {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>
<p></p>
{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"}
<table id="price_set" class="display crm-price-set-listing">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}"class=" crm-price-set crm-price-set_{$row.id} {cycle values="even-row,odd-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
- <td class="crm-price-set-title">{$row.title}</td>
+ <tr id="price_set-{$row.id}" class="crm-entity crm-price-set_{$row.id} {cycle values="even-row,odd-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <td class="crm-price-set-title crm-editable" data-field="title">{$row.title}</td>
<td class="crm-price-set-extends">{$row.extends}</td>
<td id="row_{$row.id}_status" class="crm-price-set-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="optionList">
{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"}
<table id="options" class="display">
<thead>
</tr>
</thead>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-report {cycle values="odd-row,even-row"}{$row.class}{if NOT $row.is_active} crm-report-optionList crm-report-optionList-status_disable disabled{else} crm-report-optionList crm-report-optionList-status_enable{/if}">
- <td class="crm-report-optionList-label">{$row.label}</td>
+ <tr id="report-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}{$row.class}{if NOT $row.is_active} crm-report-optionList crm-report-optionList-status_disable disabled{else} crm-report-optionList crm-report-optionList-status_enable{/if}">
+ <td class="crm-report-optionList-label crm-editable" data-field="label">{$row.label}</td>
<td class="crm-report-optionList-value">{$row.value}</td>
<td class="crm-report-optionList-description">{$row.description}</td>
<td class="nowrap crm-report-optionList-order">{$row.order}</td>
<div id="ltype">
{strip}
{* handle enable/disable actions*}
- {include file="CRM/common/enableDisable.tpl"}
+ {include file="CRM/common/enableDisableApi.tpl"}
+ {include file="CRM/common/crmeditable.tpl"}
<br/><table class="selector">
<tr class="columnheader">
<th >{ts}Provider Details{/ts}</th>
<th >{ts}Action{/ts}</th>
</tr>
{foreach from=$rows item=row}
- <tr id="row_{$row.id}" class="crm-provider {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="provider-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-provider-name"><strong>{$row.name}</strong> ({$row.title})<br/>
{ts}API Type:{/ts} {$row.api_type}<br/>
{ts}API Url:{/ts} {$row.api_url}<br/>
{/if}
{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"}
<table id="options" class="display">
<thead>
{/if}
</div>
{/if}
-
-{include file="CRM/common/crmeditable.tpl"}
-
</ul>
{* 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"}
<div id="user-profiles">
<div class="crm-content-block">
<tbody>
{foreach from=$rows item=row}
{if !$row.is_reserved }
- <tr id="UFGroup-{$row.id}"class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="UFGroup-{$row.id}" class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
<td><span class="crmf-title crm-editable">{$row.title}</span></td>
<td>
{if $row.created_id && $row.created_by}
<tbody>
{foreach from=$rows item=row}
{if $row.is_reserved}
- <tr id="row_{$row.id}"class="{$row.class}{if NOT $row.is_active} disabled{/if}">
+ <tr id="UFGroup-{$row.id}" class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
<td>{$row.title}</td>
<td>
{if $row.created_id && $row.created_by}
{/if}
{/if}
{/if}
-{include file="CRM/common/crmeditable.tpl"}
{literal}
<script type="text/javascript">
cj(function($) {
- var $row, $table, entity, id, enabled;
+ var $row, $table, entity, id, enabled, fieldLabel;
function refresh() {
if (false && $.fn.DataTable.fnIsDataTable($table[0])) { // fixme why doesn't this work?
// Refresh an existing ajax container or create a new one
$row.closest('.crm-ajax-container, #crm-main-content-wrapper').crmSnippet().crmSnippet('refresh');
}
- CRM.alert('', enabled ? {/literal}'{ts escape="js"}Record Disabled{/ts}' : '{ts escape="js"}Record Enabled{/ts}'{literal}, 'success');
+ var msg = enabled ? {/literal}'{ts escape="js" 1="<em>%1</em>"}%1 Disabled{/ts}' : '{ts escape="js" 1="<em>%1</em>"}%1 Enabled{/ts}'{literal};
+ CRM.alert('', ts(msg, fieldLabel), 'success');
}
function save() {
$table = $row.closest('table');
$table.block();
- CRM.api(entity, 'create', {id: id, is_active: enabled ? 0 : 1}, {success: refresh});
+ CRM.api(entity, 'setvalue', {id: id, field: 'is_active', value: enabled ? 0 : 1}, {success: refresh});
+ if (enabled) {
+ $(this).dialog('close');
+ }
}
function confirmation() {
- var dialog = $(this);
+ var conf = $(this);
$.getJSON(CRM.url('civicrm/ajax/statusmsg', {entity: entity, id: id}), function(response) {
- dialog.html(response.content);
+ conf.html(response.content);
+ if (!response.illegal) {
+ conf.dialog('option', 'buttons', [
+ {text: {/literal}'{ts escape="js"}Disable{/ts}'{literal}, click: save},
+ {text: {/literal}'{ts escape="js"}Cancel{/ts}'{literal}, click: function() {$(this).dialog('close');}}
+ ]);
+ }
});
}
+ function getLabel() {
+ var label = {/literal}'{ts escape="js"}Record{/ts}'{literal};
+ var labelField = $('.crmf-label, .crmf-title, [data-field=label], [data-field=title]', $row);
+ if (labelField.length) {
+ label = labelField.first().text();
+ }
+ // Format as object the way ts() wants it
+ fieldLabel = {1: label};
+ }
+
function enableDisable() {
var $a = $(this);
$row = $a.closest('.crm-entity');
+ getLabel();
// FIXME: abstract and reuse code from $.crmEditable for fetching entity/id instead of reinventing it here
entity = $row.data('entity');
id = $row.data('id');
}
enabled = !$row.hasClass('disabled');
if (enabled) {
- CRM.confirm(save, {{/literal}
- title: '{ts escape="js"}Disable Record{/ts}',
+ CRM.confirm({}, {{/literal}
+ {* client-side variable substitutions in smarty are AWKWARD! *}
+ title: ts('{ts escape="js" 1='%1'}Disable %1{/ts}', fieldLabel),
message: '<div class="crm-loading-element">{ts escape="js"}Loading{/ts}...</div>',
width: 300,
open: confirmation