From ac79535cd5eb870b7d88ed8bdd63e39329fe0c1f Mon Sep 17 00:00:00 2001 From: Ravish Nair Date: Mon, 1 Jul 2013 19:55:00 +0530 Subject: [PATCH] -- fixes for CRM-12941, CRM-12863 & CRM-12824 ---------------------------------------- * CRM-12941: Redirect to proper contact tab after saving profile http://issues.civicrm.org/jira/browse/CRM-12941 * CRM-12863: Hide profile titles in HR tabs http://issues.civicrm.org/jira/browse/CRM-12863 * CRM-12824: Override message for empty tabs http://issues.civicrm.org/jira/browse/CRM-12824 --- CRM/Profile/Form/Edit.php | 9 +++++++++ .../CRM/Profile/Page/MultipleRecordFieldsListing.tpl | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CRM/Profile/Form/Edit.php b/CRM/Profile/Form/Edit.php index 0770be5384..049c7fd33f 100644 --- a/CRM/Profile/Form/Edit.php +++ b/CRM/Profile/Form/Edit.php @@ -62,6 +62,9 @@ class CRM_Profile_Form_Edit extends CRM_Profile_Form { function preProcess() { $this->_mode = CRM_Profile_Form::MODE_CREATE; + $this->_tabDisplay = CRM_Utils_Request::retrieve('tabDisplay', 'String', $this); + $this->assign('tabDisplay', $this->_tabDisplay); + //set the context for the profile $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this); @@ -213,6 +216,12 @@ SELECT module //passing the post url to template so the popup form does //proper redirection and proccess form errors if any $popupRedirect = CRM_Utils_System::url('civicrm/profile/edit', $urlParams, FALSE, NULL, FALSE); + + if ($this->_tabDisplay) { + $popupRedirect = CRM_Utils_System::url('civicrm/contact/view', + "reset=1&cid={$this->_id}&selectedChild=custom_{$this->_customGroupId}", FALSE, NULL, FALSE); + } + $this->assign('urlParams', $urlParams); $this->assign('postUrl', $popupRedirect); } diff --git a/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl b/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl index 85ec21318b..667c4bba25 100644 --- a/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl +++ b/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl @@ -24,7 +24,7 @@ +--------------------------------------------------------------------+ *} {if $showListing} -

{ts}{$customGroupTitle}{/ts}

+ {if !$tabDisplay}

{ts}{$customGroupTitle}{/ts}

{/if} {if $records and $headers} {include file="CRM/common/jsortable.tpl"}
@@ -94,7 +94,11 @@
  - {ts}No multi-record entries found. Note: check is Include in multi-record listing property of the fields you want to display in listings{/ts} + {if $tabDisplay} + {ts 1=$customGroupTitle}No records of type '%1' found.{/ts} + {else} + {ts}No multi-record entries found. Note: check is Include in multi-record listing property of the fields you want to display in listings{/ts} + {/if}
{/if} -- 2.25.1