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
45008844
Commit
45008844
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
CRM-12872 - Get campaign search to conform
parent
23546577
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/Campaign/Form/Search.php
+2
-18
2 additions, 18 deletions
CRM/Campaign/Form/Search.php
CRM/Campaign/StateMachine/Search.php
+1
-7
1 addition, 7 deletions
CRM/Campaign/StateMachine/Search.php
with
3 additions
and
25 deletions
CRM/Campaign/Form/Search.php
+
2
−
18
View file @
45008844
...
...
@@ -54,14 +54,6 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form {
*/
protected
$_searchButtonName
;
/**
* name of print button
*
* @var string
* @access protected
*/
protected
$_printButtonName
;
/**
* name of action button
*
...
...
@@ -306,8 +298,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form {
));
}
$this
->
add
(
'select'
,
'task'
,
ts
(
'Actions:'
)
.
' '
,
$taskValue
);
$this
->
setDefaults
(
array
(
'task'
=>
$currentTaskValue
));
$this
->
add
(
'select'
,
'task'
,
ts
(
'Actions:'
)
.
' '
,
array
(
''
=>
ts
(
'- actions -'
))
+
$taskValue
);
$this
->
add
(
'submit'
,
$this
->
_actionButtonName
,
ts
(
'Go'
),
array
(
...
...
@@ -316,13 +307,6 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form {
)
);
$this
->
add
(
'submit'
,
$this
->
_printButtonName
,
ts
(
'Print'
),
array
(
'class'
=>
'form-submit'
,
'onclick'
=>
"return checkPerformAction('mark_x', '"
.
$this
->
getName
()
.
"', 1);"
,
)
);
// need to perform tasks on all or selected items ? using radio_ts(task selection) for it
$this
->
addElement
(
'radio'
,
'radio_ts'
,
NULL
,
''
,
'ts_sel'
,
array
(
'checked'
=>
'checked'
));
$this
->
addElement
(
'radio'
,
'radio_ts'
,
NULL
,
''
,
'ts_all'
,
array
(
'onclick'
=>
$this
->
getName
()
.
".toggleSelect.checked = false; toggleCheckboxVals('mark_x_',this); toggleTaskAction( true );"
));
...
...
@@ -378,7 +362,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form {
$this
->
set
(
'queryParams'
,
$this
->
_queryParams
);
$buttonName
=
$this
->
controller
->
getButtonName
();
if
(
$buttonName
==
$this
->
_actionButtonName
||
$buttonName
==
$this
->
_printButtonName
)
{
if
(
$buttonName
==
$this
->
_actionButtonName
)
{
// check actionName and if next, then do not repeat a search, since we are going to the next page
// hack, make sure we reset the task values
...
...
This diff is collapsed.
Click to expand it.
CRM/Campaign/StateMachine/Search.php
+
1
−
7
View file @
45008844
...
...
@@ -79,13 +79,7 @@ class CRM_Campaign_StateMachine_Search extends CRM_Core_StateMachine {
*/
function
taskName
(
$controller
,
$formName
=
'Search'
)
{
// total hack, check POST vars and then session to determine stuff
// fix value if print button is pressed
if
(
!
empty
(
$_POST
[
'_qf_'
.
$formName
.
'_next_print'
]))
{
$value
=
CRM_Campaign_Task
::
PRINT_VOTERS
;
}
else
{
$value
=
CRM_Utils_Array
::
value
(
'task'
,
$_POST
);
}
$value
=
CRM_Utils_Array
::
value
(
'task'
,
$_POST
);
if
(
!
isset
(
$value
))
{
$value
=
$this
->
_controller
->
get
(
'task'
);
}
...
...
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