Create new location button fixes for event location
authorsushantpaste <sushant@osseed.com>
Tue, 22 Apr 2014 04:44:25 +0000 (10:14 +0530)
committersushantpaste <sushant@osseed.com>
Tue, 22 Apr 2014 04:44:25 +0000 (10:14 +0530)
templates/CRM/Event/Form/ManageEvent/Location.tpl

index 3d07aecc6a6b673c7afa8513ea5a23ee1ba43e53..fba092d0db6eda3910145a0a0711954fd41e2982 100644 (file)
@@ -146,6 +146,12 @@ function showLocFields( ) {
    var useExisting = document.getElementsByName("location_option")[1].checked;
    if ( createNew ) {
      cj('#existingLoc').hide();
+     //clear all location fields values.
+     cj("input[id *= 'address_1_']").val("");
+     cj("input[id *= 'email_1_']").val("");
+     cj("input[id *= 'phone_1_']").val("");
+     //reset country/state.
+     cj("select[id *= 'address_1_']").val("");
      displayMessage(false);
    } else if ( useExisting ) {
      cj('#existingLoc').show();