$domain = CRM_Core_Config::domainID();
$key = CRM_Core_BAO_Navigation::getCacheKey($contactID);
$src = CRM_Utils_System::url("civicrm/ajax/menujs/$contactID/$lang/$domain/$key");
- return '<script type="text/javascript" src="' . $src . '"></script>';
+ // CRM-15493 QFkey needed for quicksearch bar - must be unique on each page refresh so adding it directly to markup
+ $qfKey = CRM_Core_Key::get('CRM_Contact_Controller_Search', TRUE);
+ return '<script id="civicrm-navigation-menu" type="text/javascript" src="' . $src . '" data-qfkey=' . json_encode($qfKey) . '></script>';
}
}
return '';
<input type="text" class="form-text" id="sort_name_navigation" placeholder="{ts}Find Contacts{/ts}" name="sort_name" style="width: 12em;" />
<input type="text" id="sort_contact_id" style="display: none" />
<input type="hidden" name="hidden_location" value="1" />
- <input type="hidden" name="qfKey" value="{crmKey name='CRM_Contact_Controller_Search' addSequence=1}" />
+ <input type="hidden" name="qfKey" value="" />
<div style="height:1px; overflow:hidden;"><input type="submit" value="{ts}Go{/ts}" name="_qf_Advanced_refresh" class="crm-form-submit default" /></div>
</div>
</form>
$("#crm-nav-menu-container").html(menuMarkup).css({'padding-bottom': '10px'});
}
{/literal}{/if}{literal}
+ // CRM-15493 get the current qfKey
+ $("input[name=qfKey]", "#quickSearch").val($('#civicrm-navigation-menu').data('qfkey'));
+
$('#civicrm-menu').ready(function() {
$('#root-menu-div .outerbox').css({'margin-top': '6px'});
$('#root-menu-div .menu-ul li').css({'padding-bottom': '2px', 'margin-top': '2px'});