Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
935
Issues
935
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Development
Core
Commits
c89a43b3
Commit
c89a43b3
authored
Oct 09, 2018
by
eileen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert Preserve activity tab
parent
2e94f477
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
23 deletions
+21
-23
CRM/Admin/Form/Preferences/Display.php
CRM/Admin/Form/Preferences/Display.php
+1
-5
CRM/Admin/Form/SettingTrait.php
CRM/Admin/Form/SettingTrait.php
+11
-8
settings/Core.setting.php
settings/Core.setting.php
+7
-7
templates/CRM/Admin/Form/Preferences/Display.tpl
templates/CRM/Admin/Form/Preferences/Display.tpl
+2
-3
No files found.
CRM/Admin/Form/Preferences/Display.php
View file @
c89a43b3
...
...
@@ -40,6 +40,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
'contact_view_options'
=>
CRM_Core_BAO_Setting
::
SYSTEM_PREFERENCES_NAME
,
'contact_smart_group_display'
=>
CRM_Core_BAO_Setting
::
SYSTEM_PREFERENCES_NAME
,
'advanced_search_options'
=>
CRM_Core_BAO_Setting
::
SYSTEM_PREFERENCES_NAME
,
'preserve_activity_tab_filter'
=>
CRM_Core_BAO_Setting
::
SYSTEM_PREFERENCES_NAME
,
);
public
function
preProcess
()
{
...
...
@@ -63,11 +64,6 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
'title'
=>
ts
(
'Include ICal Invite to Activity Assignees'
),
'weight'
=>
6
,
),
'preserve_activity_tab_filter'
=>
array
(
'html_type'
=>
'checkbox'
,
'title'
=>
ts
(
'Preserve activity filters as a user preference'
),
'weight'
=>
7
,
),
'contact_ajax_check_similar'
=>
array
(
'title'
=>
ts
(
'Check for Similar Contacts'
),
'weight'
=>
8
,
...
...
CRM/Admin/Form/SettingTrait.php
View file @
c89a43b3
...
...
@@ -118,14 +118,16 @@ trait CRM_Admin_Form_SettingTrait {
foreach
(
$settingMetaData
as
$setting
=>
$props
)
{
$quickFormType
=
$this
->
getQuickFormType
(
$props
);
if
(
isset
(
$quickFormType
))
{
$options
=
NULL
;
if
(
isset
(
$props
[
'pseudoconstant'
]))
{
$options
=
civicrm_api3
(
'Setting'
,
'getoptions'
,
[
'field'
=>
$setting
,
]);
])
[
'values'
]
;
}
else
{
$options
=
NULL
;
if
(
$props
[
'type'
]
===
'Boolean'
)
{
$options
=
[
$props
[
'title'
]
=>
$props
[
'name'
]]
;
}
//Load input as readonly whose values are overridden in civicrm.settings.php.
if
(
Civi
::
settings
()
->
getMandatory
(
$setting
))
{
$props
[
'html_attributes'
][
'readonly'
]
=
TRUE
;
...
...
@@ -138,18 +140,18 @@ trait CRM_Admin_Form_SettingTrait {
$props
[
'html_type'
],
$setting
,
ts
(
$props
[
'title'
]),
(
$options
!==
NULL
)
?
$options
[
'values'
]
:
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
,
[]),
(
$options
!==
NULL
)
?
$options
:
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
,
[]),
(
$options
!==
NULL
)
?
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
,
[])
:
NULL
);
}
elseif
(
$add
==
'addSelect'
)
{
$this
->
addElement
(
'select'
,
$setting
,
ts
(
$props
[
'title'
]),
$options
[
'values'
]
,
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
));
$this
->
addElement
(
'select'
,
$setting
,
ts
(
$props
[
'title'
]),
$options
,
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
));
}
elseif
(
$add
==
'addCheckBox'
)
{
$this
->
addCheckBox
(
$setting
,
ts
(
$props
[
'title'
]),
$options
[
'values'
]
,
NULL
,
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
),
NULL
,
NULL
,
[
' '
]);
$this
->
addCheckBox
(
$setting
,
ts
(
$props
[
'title'
]),
$options
,
NULL
,
CRM_Utils_Array
::
value
(
'html_attributes'
,
$props
),
NULL
,
NULL
,
[
' '
]);
}
elseif
(
$add
==
'addCheckBoxes'
)
{
$options
=
array_flip
(
$options
[
'values'
]
);
$options
=
array_flip
(
$options
);
$newOptions
=
[];
foreach
(
$options
as
$key
=>
$val
)
{
$newOptions
[
$key
]
=
$val
;
...
...
@@ -170,7 +172,7 @@ trait CRM_Admin_Form_SettingTrait {
$this
->
add
(
'date'
,
$setting
,
ts
(
$props
[
'title'
]),
CRM_Core_SelectValues
::
date
(
NULL
,
'M d'
));
}
else
{
$this
->
$add
(
$setting
,
ts
(
$props
[
'title'
]),
$options
[
'values'
]
);
$this
->
$add
(
$setting
,
ts
(
$props
[
'title'
]),
$options
);
}
// Migrate to using an array as easier in smart...
$descriptions
[
$setting
]
=
ts
(
$props
[
'description'
]);
...
...
@@ -204,6 +206,7 @@ trait CRM_Admin_Form_SettingTrait {
}
$mapping
=
[
'checkboxes'
=>
'CheckBoxes'
,
'checkbox'
=>
'CheckBox'
,
'radio'
=>
'Radio'
,
];
return
$mapping
[
$spec
[
'html_type'
]];
...
...
settings/Core.setting.php
View file @
c89a43b3
...
...
@@ -966,28 +966,28 @@ return array(
'group'
=>
'core'
,
'name'
=>
'syncCMSEmail'
,
'type'
=>
'Boolean'
,
'html_type'
=>
'YesNo'
,
'quick_form_type'
=>
'YesNo'
,
'default'
=>
1
,
'add'
=>
'4.7'
,
'title'
=>
'Sync CMS Email'
,
'title'
=>
ts
(
'Sync CMS Email'
)
,
'is_domain'
=>
1
,
'is_contact'
=>
0
,
'description'
=>
'If enabled, then CMS email id will be syncronised with CiviCRM contacts\'s primary email.'
,
'description'
=>
ts
(
'If enabled, then CMS email id will be synchronised with CiviCRM contacts\'s primary email.'
)
,
'help_text'
=>
NULL
,
),
'preserve_activity_tab_filter'
=>
array
(
'group_name'
=>
'CiviCRM Preferences'
,
'group'
=>
'core'
,
'name'
=>
'preserve_activity_tab_filter'
,
'type'
=>
'
String
'
,
'html_type'
=>
'
Text
'
,
'type'
=>
'
Boolean
'
,
'html_type'
=>
'
checkbox
'
,
'default'
=>
'0'
,
'add'
=>
'4.7'
,
'title'
=>
'Preserve activity filters as a user preference'
,
'title'
=>
ts
(
'Preserve activity filters as a user preference'
)
,
'is_domain'
=>
1
,
'is_contact'
=>
0
,
'description'
=>
'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts'
,
'help_text'
=>
NULL
,
'description'
=>
ts
(
'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts.'
),
),
'do_not_notify_assignees_for'
=>
array
(
'group_name'
=>
'CiviCRM Preferences'
,
...
...
templates/CRM/Admin/Form/Preferences/Display.tpl
View file @
c89a43b3
...
...
@@ -155,12 +155,11 @@
<tr
class=
"crm-preferences-display-form-block-preserve_activity_tab_filter"
>
<td
class=
"label"
></td>
<td>
{
$form.preserve_activity_tab_filter.html
}
{
$form.preserve_activity_tab_filter.label
}
</td>
<td>
{
$form.preserve_activity_tab_filter.html
}
</td>
</tr>
<tr
class=
"crm-preferences-display-form-block-description"
>
<td>
</td>
<td
class=
"description"
>
{
ts
}
When enabled, any filter settings a user selects on the contact's Activity tab will be remembered as they visit other contacts.
{/
ts
}
</td>
<td
class=
"description"
>
{
$settings_fields.preserve_activity_tab_filter.description
}
</td>
</tr>
<tr
class=
"crm-preferences-display-form-block-user_dashboard_options"
>
...
...
Write
Preview
Markdown
is supported
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