<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
* @access public
*/ function &actionLinks() {
if (!isset(self::$_actionLinks)) {
- // helper variable for nicer formatting
- $deleteExtra = ts('Are you sure you want to delete this price field?');
self::$_actionLinks = array(
CRM_Core_Action::UPDATE => array(
'name' => ts('Edit Price Field'),
'url' => 'civicrm/admin/price/field',
'qs' => 'action=delete&reset=1&sid=%%sid%%&fid=%%fid%%',
'title' => ts('Delete Price'),
- 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"',
),
);
}
* @access public
*/
function browse() {
+ $resourceManager = CRM_Core_Resources::singleton();
+ if (!empty($_GET['new']) && $resourceManager->ajaxPopupsEnabled) {
+ $resourceManager->addScriptFile('civicrm', 'js/crm.addNew.js', 999);
+ }
+
$priceField = array();
$priceFieldBAO = new CRM_Price_BAO_PriceField();
// need to translate html types from the db
$htmlTypes = CRM_Price_BAO_PriceField::htmlTypes();
- $priceField[$priceFieldBAO->id]['html_type'] = $htmlTypes[$priceField[$priceFieldBAO->id]['html_type']];
+ $priceField[$priceFieldBAO->id]['html_type_display'] = $htmlTypes[$priceField[$priceFieldBAO->id]['html_type']];
$priceField[$priceFieldBAO->id]['order'] = $priceField[$priceFieldBAO->id]['weight'];
$priceField[$priceFieldBAO->id]['action'] = CRM_Core_Action::formLink(
self::actionLinks(),
/**
* Preview price field
*
- * @param int $id price field id
+ * @param $fid
+ *
+ * @internal param int $id price field id
*
* @return void
* @access public