Patch - CRM-14953
authorRohan Katkar <rohan.katkar@webaccess.co.in>
Mon, 14 Jul 2014 07:14:35 +0000 (12:44 +0530)
committerRohan Katkar <rohan.katkar@webaccess.co.in>
Mon, 14 Jul 2014 07:14:35 +0000 (12:44 +0530)
templates/CRM/Member/Form/Membership.tpl
templates/CRM/Member/Form/MembershipStandalone.js

index 5d56cc38ce2fc083be201839b73d7b7c791249b7..328ffa70ef63b7351b8dcd0f19b9474e8669ceb0 100644 (file)
     {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},
index 63c9a16ee9463e7ded49768b99087637626b8bd0..82ad107e75c59411b8050ade41bbdddd65e464b8 100644 (file)
@@ -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();