summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authorcorbosman <cor@xs4all.net>2014-05-03 20:38:21 +0200
committercorbosman <cor@xs4all.net>2014-05-03 20:38:21 +0200
commitdba1c6f083de4e95b35d6dfa93b22341b6527263 (patch)
tree7c837e4c430996f7e4126e3eafda1ebbeaf05e19 /program/steps/settings
parent37ac40719f791d80a1cd0004629a1089019a0669 (diff)
add preferences_section_header hook
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/edit_prefs.inc4
-rw-r--r--program/steps/settings/func.inc7
2 files changed, 11 insertions, 0 deletions
diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc
index 05f4db6a6..b72c3e73f 100644
--- a/program/steps/settings/edit_prefs.inc
+++ b/program/steps/settings/edit_prefs.inc
@@ -51,6 +51,10 @@ function rcmail_user_prefs_form($attrib)
$out = $form_start;
+ if(!empty($SECTIONS[$CURR_SECTION]['header'])) {
+ $out .= html::div(array('id' => 'preferences-header', 'class' =>'boxcontent'), $SECTIONS[$CURR_SECTION]['header']);
+ }
+
foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $class => $block) {
if (!empty($block['options'])) {
$table = new html_table(array('cols' => 2));
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index bccd9caa8..4b4575f10 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -1241,6 +1241,13 @@ function rcmail_user_prefs($current = null)
$sections[$idx]['blocks'] = $data['blocks'];
}
+ $data = $RCMAIL->plugins->exec_hook('preferences_section_header',
+ array('section' => $sect['id'], 'header' => '', 'current' => $current));
+
+ if(!empty($data['header'])) {
+ $sections[$idx]['header'] = $data['header'];
+ }
+
return array($sections, $plugin['cols']);
}