Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
justinfreeman (Agileware)
Core
Commits
de5fdccd
Commit
de5fdccd
authored
11 years ago
by
Kurund Jalmi
Browse files
Options
Downloads
Plain Diff
Merge pull request #1122 from kurund/CRM-12966
clean and notice fixes CRM-12966
parents
2d5e5ce1
8d5579e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Badge/BAO/Badge.php
+14
-6
14 additions, 6 deletions
CRM/Badge/BAO/Badge.php
CRM/Event/Form/Task/Badge.php
+15
-12
15 additions, 12 deletions
CRM/Event/Form/Task/Badge.php
with
29 additions
and
18 deletions
CRM/Badge/BAO/Badge.php
+
14
−
6
View file @
de5fdccd
...
...
@@ -86,10 +86,13 @@ class CRM_Badge_BAO_Badge {
if
(
CRM_Utils_Array
::
value
(
'rowElements'
,
$layout
[
'data'
]))
{
foreach
(
$layout
[
'data'
][
'rowElements'
]
as
$key
=>
$element
)
{
$value
=
$row
[
$element
];
// hack to fix date field display format
if
(
strpos
(
$element
,
'_date'
))
{
$value
=
CRM_Utils_Date
::
customFormat
(
$value
,
"%e %b"
);
$value
=
''
;
if
(
$element
)
{
$value
=
$row
[
$element
];
// hack to fix date field display format
if
(
strpos
(
$element
,
'_date'
))
{
$value
=
CRM_Utils_Date
::
customFormat
(
$value
,
"%e %b"
);
}
}
$formattedRow
[
'token'
][
$key
]
=
array
(
...
...
@@ -131,8 +134,13 @@ class CRM_Badge_BAO_Badge {
$x
=
$this
->
pdf
->
GetAbsX
();
$y
=
$this
->
pdf
->
GetY
();
$this
->
printImage
(
$formattedRow
[
'image_1'
]);
//$this->printImage($formattedRow['image_2']);
if
(
CRM_Utils_Array
::
value
(
'image_1'
,
$formattedRow
))
{
$this
->
printImage
(
$formattedRow
[
'image_1'
]);
}
if
(
CRM_Utils_Array
::
value
(
'image_2'
,
$formattedRow
))
{
//$this->printImage($formattedRow['image_2']);
}
$this
->
pdf
->
SetLineStyle
(
array
(
'width'
=>
0.1
,
'cap'
=>
'round'
,
'join'
=>
'round'
,
'dash'
=>
'2,2'
,
'color'
=>
array
(
0
,
0
,
200
)));
...
...
This diff is collapsed.
Click to expand it.
CRM/Event/Form/Task/Badge.php
+
15
−
12
View file @
de5fdccd
...
...
@@ -118,20 +118,23 @@ class CRM_Event_Form_Task_Badge extends CRM_Event_Form_Task {
$returnProperties
=
array
();
if
(
!
empty
(
$layoutInfo
[
'data'
][
'token'
]))
{
foreach
(
$layoutInfo
[
'data'
][
'token'
]
as
$index
=>
$value
)
{
$token
=
CRM_Utils_Token
::
getTokens
(
$value
);
if
(
key
(
$token
)
==
'contact'
)
{
$element
=
$token
[
'contact'
][
0
];
}
else
{
$element
=
$token
[
'event'
][
0
];
//FIX ME - we need to standardize event token names
if
(
!
strpos
(
$element
,
'event_'
))
{
$element
=
'event_'
.
$element
;
$element
=
''
;
if
(
$value
)
{
$token
=
CRM_Utils_Token
::
getTokens
(
$value
);
if
(
key
(
$token
)
==
'contact'
)
{
$element
=
$token
[
'contact'
][
0
];
}
else
{
$element
=
$token
[
'event'
][
0
];
//FIX ME - we need to standardize event token names
if
(
!
strpos
(
$element
,
'event_'
))
{
$element
=
'event_'
.
$element
;
}
}
}
// build returnproperties for query
$returnProperties
[
$element
]
=
1
;
// build returnproperties for query
$returnProperties
[
$element
]
=
1
;
}
// add actual field name to row element
$layoutInfo
[
'data'
][
'rowElements'
][
$index
]
=
$element
;
...
...
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