From 8e1b976e1a97ad3fe6349d9ef15db9e4847ec69e Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Mon, 14 Jul 2014 12:44:35 +0530 Subject: [PATCH] Patch - CRM-14953 --- templates/CRM/Member/Form/Membership.tpl | 4 ++-- templates/CRM/Member/Form/MembershipStandalone.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) 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(); -- 2.25.1