Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
extensions
cc.tadpole.petitionemail
Commits
105c5eb9
Commit
105c5eb9
authored
Jan 14, 2015
by
Jamie McClelland
Browse files
ensure email has complete address
Due to template variable mis-match we were not displaying the state.
parent
4312a80d
Changes
1
Hide whitespace changes
Inline
Side-by-side
petitionemail.php
View file @
105c5eb9
...
...
@@ -829,7 +829,7 @@ function petitionemail_process_signature($activity_id, $profile_fields = NULL) {
function
petitionemail_get_address_block
(
$contact_id
)
{
$sql
=
"SELECT display_name, street_address, city, "
.
"s.
nam
e, postal_code FROM civicrm_contact c JOIN "
.
"s.
abbreviation AS state_provinc
e, postal_code FROM civicrm_contact c JOIN "
.
"civicrm_address a ON c.id = a.contact_id JOIN civicrm_state_province s "
.
"on a.state_province_id = s.id WHERE is_primary = 1 "
.
"AND c.id = %0"
;
...
...
@@ -839,8 +839,12 @@ function petitionemail_get_address_block($contact_id) {
if
(
$dao
->
N
==
0
)
{
return
NULL
;
}
$fields
=
(
array
)
$dao
;
$block
=
$dao
->
display_name
.
"
\n
"
.
CRM_Utils_Address
::
format
(
$fields
);
$block
=
$dao
->
display_name
.
"
\n
"
.
$dao
->
street_address
.
"
\n
"
.
$dao
->
city
.
", "
.
$dao
->
state_province
.
" "
.
$dao
->
postal_code
;
return
$block
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment