----------------------------------------
* CRM-14081: Create Contribution screen initially scrolls to and puts cursor in "Soft Credit" field
http://issues.civicrm.org/jira/browse/CRM-14081
{if !in_array($context, array('search','advanced', 'builder')) || $parent eq 'activity'}
{assign var='fldName' value=$prefix|cat:'contact'}
{assign var='profSelect' value=$prefix|cat:'profiles'}
-
+ {* Focus on select contact element unless focus=false is passed in. *}
+ {assign var='focus' value=$focus|default:true}
+
{if $noLabel}
<div>
{if !$skipBreak}
eval("{$newContactCallback}");
{/if}
{literal}
- }).focus( );
+ }){/literal}{if $focus}.focus( ){/if}{literal};
cj( contactElement ).click( function( ) {
cj( contactHiddenElement ).val('');
{assign var='createNewStatus' value=false}
{/if}
{include file="CRM/Contact/Form/NewContact.tpl" noLabel=true skipBreak=true blockNo=$rowNumber
- prefix="soft_credit_" showNewSelect=$createNewStatus}
+ prefix="soft_credit_" showNewSelect=$createNewStatus focus=false}
</td>
<td>
{$form.soft_credit_amount.$rowNumber.label} {$form.soft_credit_amount.$rowNumber.html|crmAddClass:eight}