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);
//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);
}
+--------------------------------------------------------------------+
*}
{if $showListing}
- <h1>{ts}{$customGroupTitle}{/ts}</h1>
+ {if !$tabDisplay}<h1>{ts}{$customGroupTitle}{/ts}</h1>{/if}
{if $records and $headers}
{include file="CRM/common/jsortable.tpl"}
<div id="browseValues">
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
- {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}
</div>
{/if}