Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
dc24e561
Commit
dc24e561
authored
5 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
[NFC] code formatting
parent
622c8dfa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Contact/Form/Edit/Address.php
+9
-4
9 additions, 4 deletions
CRM/Contact/Form/Edit/Address.php
with
9 additions
and
4 deletions
CRM/Contact/Form/Edit/Address.php
+
9
−
4
View file @
dc24e561
...
...
@@ -46,6 +46,8 @@ class CRM_Contact_Form_Edit_Address {
* False, if we want to skip the address sharing features.
* @param bool $inlineEdit
* True when edit used in inline edit.
*
* @throws \CiviCRM_API3_Exception
*/
public
static
function
buildQuickForm
(
&
$form
,
$addressBlockCount
=
NULL
,
$sharing
=
TRUE
,
$inlineEdit
=
FALSE
)
{
// passing this via the session is AWFUL. we need to fix this
...
...
@@ -130,13 +132,13 @@ class CRM_Contact_Form_Edit_Address {
continue
;
}
}
if
(
$name
==
'address_name'
)
{
if
(
$name
==
=
'address_name'
)
{
$name
=
'name'
;
}
$params
=
[
'entity'
=>
'address'
];
if
(
$name
==
'postal_code_suffix'
)
{
if
(
$name
==
=
'postal_code_suffix'
)
{
$params
[
'label'
]
=
ts
(
'Suffix'
);
}
...
...
@@ -366,7 +368,7 @@ class CRM_Contact_Form_Edit_Address {
$requireOmission
=
NULL
;
foreach
(
$groupTree
as
$csId
=>
$csVal
)
{
// only process Address entity fields
if
(
$csVal
[
'extends'
]
!=
'Address'
)
{
if
(
$csVal
[
'extends'
]
!=
=
'Address'
)
{
continue
;
}
...
...
@@ -391,6 +393,9 @@ class CRM_Contact_Form_Edit_Address {
* @param CRM_Core_Form $form
* @param int $entityId
* @param int $blockId
*
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
protected
static
function
addCustomDataToForm
(
&
$form
,
$entityId
,
$blockId
)
{
$groupTree
=
CRM_Core_BAO_CustomGroup
::
getTree
(
'Address'
,
NULL
,
$entityId
);
...
...
@@ -417,7 +422,7 @@ class CRM_Contact_Form_Edit_Address {
continue
;
}
// inorder to set correct defaults for checkbox custom data, we need to converted flat key to array
// in
order to set correct defaults for checkbox custom data, we need to converted flat key to array
// this works for all types custom data
$keyValues
=
explode
(
'['
,
str_replace
(
']'
,
''
,
$key
));
$addressDefaults
[
$keyValues
[
0
]][
$keyValues
[
1
]][
$keyValues
[
2
]]
=
$val
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment