From: Pratik Joshi Date: Fri, 28 Mar 2014 08:31:30 +0000 (+0530) Subject: CRM-14400 : migration to use LivePage AJAX X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fcc8f20731b70e861cfbd0777393c3a2062fd8d0;p=civicrm-core.git CRM-14400 : migration to use LivePage AJAX --- diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 038806f42a..f5a346eaff 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -358,6 +358,7 @@ class CRM_Profile_Form extends CRM_Core_Form { } elseif (!empty($this->_multiRecordFields) && (!$this->_multiRecord || !in_array($this->_multiRecord, array(CRM_Core_Action::DELETE, CRM_Core_Action::UPDATE)) )) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); //multirecord listing page $multiRecordFieldListing = TRUE; $page = new CRM_Profile_Page_MultipleRecordFieldsListing(); diff --git a/CRM/Profile/Page/Dynamic.php b/CRM/Profile/Page/Dynamic.php index c187b66793..e8cd0aa4e0 100644 --- a/CRM/Profile/Page/Dynamic.php +++ b/CRM/Profile/Page/Dynamic.php @@ -352,7 +352,7 @@ class CRM_Profile_Page_Dynamic extends CRM_Core_Page { $fieldDetail = reset($fields); $fieldId = CRM_Core_BAO_CustomField::getKeyID($fieldDetail['name']); $customGroupDetails = CRM_Core_BAO_CustomGroup::getGroupTitles(array($fieldId)); - $title = $customGroupDetails[$fieldId]['groupTitle']; + $multiRecTitle = $customGroupDetails[$fieldId]['groupTitle']; } else { $title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title'); } @@ -374,6 +374,7 @@ class CRM_Profile_Page_Dynamic extends CRM_Core_Page { $title .= ' - ' . $displayName; } + $title = isset($multiRecTitle) ? ts('View %1 Record', array(1 => $multiRecTitle)) : $title; CRM_Utils_System::setTitle($title); // invoke the pagRun hook, CRM-3906 diff --git a/CRM/Profile/Page/MultipleRecordFieldsListing.php b/CRM/Profile/Page/MultipleRecordFieldsListing.php index 3dfaabc4ee..316edbc0f2 100644 --- a/CRM/Profile/Page/MultipleRecordFieldsListing.php +++ b/CRM/Profile/Page/MultipleRecordFieldsListing.php @@ -53,6 +53,7 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic { protected $_pageViewType = NULL; protected $_contactType = NULL; + /** * Get BAO Name * diff --git a/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl b/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl index 015c3ccaf8..f3bd6b9cd7 100644 --- a/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl +++ b/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl @@ -87,60 +87,4 @@ class="button action-item">
{ts}Add New Record{/ts}
{/if} {/if} -{/if} -{literal} - - {/literal} +{/if} \ No newline at end of file