X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FPrice%2FPage%2FField.php;h=756fdce079690ab2f87685a3a3ea4883f3147288;hb=6f2311483b933b7547f5d24b2fdb2df1090b07a2;hp=f78efa343da3c45041ca943e66b0bb5c73d6eda4;hpb=0ce8483729744eef1649ad91f908fda25ee5223f;p=civicrm-core.git diff --git a/CRM/Price/Page/Field.php b/CRM/Price/Page/Field.php index f78efa343d..756fdce079 100644 --- a/CRM/Price/Page/Field.php +++ b/CRM/Price/Page/Field.php @@ -1,9 +1,9 @@ array( 'name' => ts('Edit Price Field'), @@ -106,7 +106,6 @@ class CRM_Price_Page_Field extends CRM_Core_Page { 'url' => 'civicrm/admin/price/field', 'qs' => 'action=delete&reset=1&sid=%%sid%%&fid=%%fid%%', 'title' => ts('Delete Price'), - 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"', ), ); } @@ -122,7 +121,11 @@ class CRM_Price_Page_Field extends CRM_Core_Page { * @access public */ function browse() { - CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); + $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(); @@ -169,7 +172,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page { // 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(), @@ -315,7 +318,9 @@ class CRM_Price_Page_Field extends CRM_Core_Page { /** * Preview price field * - * @param int $id price field id + * @param $fid + * + * @internal param int $id price field id * * @return void * @access public