From: Rohan Katkar Date: Mon, 14 Jul 2014 07:14:35 +0000 (+0530) Subject: Patch - CRM-14953 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e1b976e1a97ad3fe6349d9ef15db9e4847ec69e;p=civicrm-core.git Patch - CRM-14953 --- diff --git a/templates/CRM/Member/Form/Membership.tpl b/templates/CRM/Member/Form/Membership.tpl index 5d56cc38ce..328ffa70ef 100644 --- a/templates/CRM/Member/Form/Membership.tpl +++ b/templates/CRM/Member/Form/Membership.tpl @@ -470,14 +470,14 @@ {if $context eq 'standalone' and $outBound_option != 2 } {literal} CRM.$(function($) { - cj("#contact_1").blur( function( ) { + cj("#contact_id").change( function( ) { checkEmail( ); } ); checkEmail( ); }); function checkEmail( ) { - var contactID = cj("input[name='contact_select_id[1]']").val(); + var contactID = cj("#contact_id").val(); if ( contactID ) { var postUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' h=0}{literal}"; cj.post( postUrl, {contact_id: contactID}, diff --git a/templates/CRM/Member/Form/MembershipStandalone.js b/templates/CRM/Member/Form/MembershipStandalone.js index 63c9a16ee9..82ad107e75 100644 --- a/templates/CRM/Member/Form/MembershipStandalone.js +++ b/templates/CRM/Member/Form/MembershipStandalone.js @@ -1,14 +1,12 @@ CRM.$(function($) { memberResults = new Array; - $("input[name='contact[1]']").result( function() { - var contact_id = cj("input[name='contact_select_id[1]']").val(); + var contact_id = cj("#contact_id").val(); CRM.api('Membership', 'get', {'sequential': 1, 'contact_id': contact_id}, {success: function(data) { if (data['values']) { memberResults = data['values']; checkExistingMemOrg(); } - }}); }); checkExistingMemOrg();