Ian province abbreviation patch - issue 724
[civicrm-core.git] / templates / CRM / Contact / Form / OnBehalfOf.tpl
index b8a074e90ff7a4f6613f1b2f18a11b9a538d708e..0ca2a1a8f3f2b409d26b60035050df1f4d8aa106 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
    <fieldset><legend></legend>
  {/if}
   <div class="crm-section organizationName-section">
-      {if $relatedOrganizationFound}
-      <div class="section crm-section">
-    <div class="content">{$form.org_option.html}</div>
-      </div>
-      <div id="select_org" class="crm-section select_org-section">
-        <div class="label">{$form.organization_name.label}</div>
-        <div class="content">{$form.organization_id.html|crmAddClass:big}</div>
-      </div>
-      {/if}
       <div id="create_org" class="crm-section create_org-section">
     <div class="label">{$form.organization_name.label}</div>
         <div class="content">{$form.organization_name.html|crmAddClass:big}</div>
          invert              = "false"
     }
 {/if}
-
-{literal}
-<script type="text/javascript">
-{/literal}
-{* If mid present in the url, take the required action (poping up related existing contact ..etc) *}
-{if $membershipContactID}
-    {literal}
-    cj( function( ) {
-        cj( '#organization_id' ).val("{/literal}{$membershipContactName}{literal}");
-        cj( '#organization_name' ).val("{/literal}{$membershipContactName}{literal}");
-        cj( '#onbehalfof_id' ).val("{/literal}{$membershipContactID}{literal}");
-        setLocationDetails( "{/literal}{$membershipContactID}{literal}" );
-    });
-    {/literal}
-{/if}
-{* Javascript method to populate the location fields when a different existing related contact is selected *}
-{literal}
-    var dataUrl   = "{/literal}{$employerDataURL}{literal}";
-    cj('#organization_id').autocomplete( dataUrl, { width : 180, selectFirst : false, matchContains: true, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
-    }).result( function(event, data, formatted) {
-        cj('#organization_name').val( data[0] );
-        cj('#onbehalfof_id').val( data[1] );
-        setLocationDetails( data[1] );
-    });
-
-    var orgId = {/literal}"{$orgId}"{literal};
-    if ( orgId ) {
-        setLocationDetails( orgId );
-    }
-
-    function setLocationDetails( contactID ) {
-        var locationUrl = {/literal}"{$locDataURL}"{literal}+ contactID + "&relContact=1";
-
-        cj.ajax({
-            url         : locationUrl,
-            dataType    : "json",
-            timeout     : 5000, //Time in milliseconds
-            success     : function( data, status ) {
-                for (var ele in data) {
-                    cj( "#"+ele ).val( data[ele] );
-                }
-            },
-            error       : function( XMLHttpRequest, textStatus, errorThrown ) {
-                console.error("HTTP error status: ", textStatus);
-            }
-        });
-    }
-</script>
-{/literal}