CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event Location Page "Create new location" button issue
Pages: [1]

Author Topic: Event Location Page "Create new location" button issue  (Read 1125 times)

sushant

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 8
  • CiviCRM version: v3.2.x,v3.3.x v4.0.x, v4.x,trunk
  • CMS version: Drupal 6/7 ,joomla 1.5,1.6
  • MySQL version: 5.1.51
  • PHP version: 5.3.3
Event Location Page "Create new location" button issue
April 21, 2014, 12:35:13 am
When we create new Event , on Event Location page we have radio button "Create new location " when we select this option all fields on form should get clear ( Address,email,phone). IMO if user is trying to create new location than we should give them fresh form (with no values in any fields ) .
Current behaviour : Previously selected locations data is populated.

Should I create issue for same or there is any reason behind this ?
I have fixed it like below:
Code: [Select]
index 3d07aec..fba092d 100644
--- a/templates/CRM/Event/Form/ManageEvent/Location.tpl
+++ b/templates/CRM/Event/Form/ManageEvent/Location.tpl
@@ -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();

CiviCRM Priority Support
http://support.civigardens.com/
http://osseed.com

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Event Location Page "Create new location" button issue
April 21, 2014, 08:58:47 am
Good idea.  Please file an issue and patch at: https://issues.civicrm.org
Try CiviTeacher: the online video tutorial CiviCRM learning library.

sushant

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 8
  • CiviCRM version: v3.2.x,v3.3.x v4.0.x, v4.x,trunk
  • CMS version: Drupal 6/7 ,joomla 1.5,1.6
  • MySQL version: 5.1.51
  • PHP version: 5.3.3
Re: Event Location Page "Create new location" button issue
April 21, 2014, 09:52:20 pm
Here is the issue on jira https://issues.civicrm.org/jira/browse/CRM-14502

S.
CiviCRM Priority Support
http://support.civigardens.com/
http://osseed.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event Location Page "Create new location" button issue

This forum was archived on 2017-11-26.