QuickSearch - Fix 'not found' message
authorcolemanw <coleman@civicrm.org>
Sat, 2 Sep 2023 16:41:49 +0000 (12:41 -0400)
committercolemanw <coleman@civicrm.org>
Sat, 2 Sep 2023 16:59:17 +0000 (12:59 -0400)
js/crm.menubar.js

index 5a4946e204ffa0bd490fedf32cbe767f7ea86dd8..d5e98fd532a60f1b8b66cd51ec71a85de5b987fc 100644 (file)
                 var label = option.closest('label').text();
                 var msg = ts('%1 not found.', {1: label});
                 // Remind user they are not searching by contact name (unless they enter a number)
-                if (params.field_name !== 'sort_name' && !(/[\d].*/.test(params.name))) {
+                if (option.val() !== 'sort_name' && !(/[\d].*/.test(params.name))) {
                   msg += ' ' + ts('Did you mean to search by Name/Email instead?');
                 }
                 ret.push({value: '0', label: msg});