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
57465e2a
Commit
57465e2a
authored
11 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
CRM-13148 minor tidy up - remove smarty from js
parent
4bb1fa8a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Batch/Form/Entry.php
+9
-3
9 additions, 3 deletions
CRM/Batch/Form/Entry.php
templates/CRM/Batch/Form/Entry.tpl
+2
-18
2 additions, 18 deletions
templates/CRM/Batch/Form/Entry.tpl
with
11 additions
and
21 deletions
CRM/Batch/Form/Entry.php
+
9
−
3
View file @
57465e2a
...
...
@@ -100,7 +100,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
$params
=
array
(
'id'
=>
$this
->
_batchId
);
CRM_Batch_BAO_Batch
::
retrieve
(
$params
,
$this
->
_batchInfo
);
$this
->
assign
(
'batchTotal'
,
$this
->
_batchInfo
[
'total'
]);
$this
->
assign
(
'batchTotal'
,
!
empty
(
$this
->
_batchInfo
[
'total'
])
?
$this
->
_batchInfo
[
'total'
]
:
NULL
)
;
$this
->
assign
(
'batchType'
,
$this
->
_batchInfo
[
'type_id'
]);
// get the profile id associted with this batch type
...
...
@@ -206,7 +206,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
foreach
(
$this
->
_fields
as
$name
=>
$field
)
{
if
(
in_array
(
$field
[
'field_type'
],
$contactTypes
))
{
$this
->
_contactFields
[
$field
[
'name'
]]
=
1
;
$fld
=
explode
(
'-'
,
$field
[
'name'
]);
$contactReturnProperties
[]
=
$fld
[
0
];
$contactFieldMap
[
$fld
[
0
]]
=
$field
[
'name'
];
}
CRM_Core_BAO_UFGroup
::
buildProfile
(
$this
,
$field
,
NULL
,
NULL
,
FALSE
,
FALSE
,
$rowNumber
);
...
...
@@ -217,7 +219,11 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
}
$this
->
assign
(
'fields'
,
$this
->
_fields
);
$this
->
assign
(
'contactFields'
,
$this
->
_contactFields
);
CRM_Core_Resources
::
singleton
()
->
addSetting
(
array
(
'contact'
=>
array
(
'return'
=>
implode
(
','
,
$contactReturnProperties
),
'fieldmap'
=>
$contactFieldMap
,
)));
// don't set the status message when form is submitted.
$buttonName
=
$this
->
controller
->
getButtonName
(
'submit'
);
...
...
This diff is collapsed.
Click to expand it.
templates/CRM/Batch/Form/Entry.tpl
+
2
−
18
View file @
57465e2a
...
...
@@ -174,28 +174,12 @@ function updateContactInfo(blockNo, prefix) {
var
contactHiddenElement
=
'
input[name="
'
+
prefix
+
'
contact_select_id[
'
+
blockNo
+
'
]"]
'
;
var
contactId
=
cj
(
contactHiddenElement
).
val
();
var
returnProperties
=
''
;
var
profileFields
=
new
Array
();
{/
literal
}
{
if
$contactFields
}
{
foreach
from
=
$contactFields
item
=
val
key
=
fldName
}
var
fldName
=
"
{
$fldName
}
"
;
{
literal
}
if
(
returnProperties
)
{
returnProperties
=
returnProperties
+
'
,
'
;
}
var
fld
=
fldName
.
split
(
'
-
'
);
returnProperties
=
returnProperties
+
fld
[
0
];
profileFields
[
fld
[
0
]]
=
fldName
;
{/
literal
}
{/
foreach
}
{/
if
}
{
literal
}
var
profileFields
=
CRM
.
contact
.
fieldmap
;
CRM
.
api
(
'
Contact
'
,
'
get
'
,
{
'
sequential
'
:
'
1
'
,
'
contact_id
'
:
contactId
,
'
return
'
:
returnProperties
},
'
return
'
:
CRM
.
contact
.
return
},
{
success
:
function
(
data
)
{
cj
.
each
(
data
.
values
[
0
],
function
(
key
,
value
)
{
// set the values
...
...
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