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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • 3.0 New Individual 'Use Organization Address'
Pages: [1]

Author Topic: 3.0 New Individual 'Use Organization Address'  (Read 1460 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
3.0 New Individual 'Use Organization Address'
October 28, 2009, 12:46:22 pm
In 3.0 when you are putting in an address for an individual, there's a checkbox to use a household address. how hard would it be to extend this and add another checkbox to 'use organization address' (grabs address from current employer org)....what would i have to do?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 3.0 New Individual 'Use Organization Address'
October 28, 2009, 01:29:13 pm

here's the issue:

http://issues.civicrm.org/jira/browse/CRM-3338

u can track the code from: CRM/Contact/Form/Contact.php

the current implementation is a hack (it does a copy) and hence not great. I dont think its a trivial change

lboo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 3.0 New Individual 'Use Organization Address'
November 02, 2009, 03:11:33 pm
Hi,

I did the following:
1) Changed the translation so it says "Shared Address" instead of "Household address"
2) Modified the template so the autocomplete search on "org" instead of "hh"
3) modified the lookup (org instead of hh) so the edit fetches the the right contact (lookup on mail_household_id)

Extension of the initial hack, but works so far
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: 3.0 New Individual 'Use Organization Address'
November 03, 2009, 08:11:12 am
hey xavier

you had mentioned in this thread http://forum.civicrm.org/index.php/topic,5520.msg45498.html#msg45498 that you could make a patch for this...should i wait on that or are you just suggesting i make these changes? if so, on 2 & 3, which templates/php page are you referring to?

thanks much.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 3.0 New Individual 'Use Organization Address'
November 11, 2009, 11:02:22 pm
Sorry for the delay.

Here comes the patch.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • 3.0 New Individual 'Use Organization Address'

This forum was archived on 2017-11-26.