Added pospone select (fixme)
Former-commit-id: 428b4424a15ef54c4d95a2eb4af07a334366577a
This commit is contained in:
parent
75eaa875c9
commit
1c0a5ca247
|
@ -34,12 +34,15 @@ if (get_parameter('update_config', 0)) {
|
||||||
$enable_value = switch_to_int(get_parameter("enable-$id"));
|
$enable_value = switch_to_int(get_parameter("enable-$id"));
|
||||||
$mail_value = (int)get_parameter("mail-{$id}", 0);
|
$mail_value = (int)get_parameter("mail-{$id}", 0);
|
||||||
$user_value = (int)get_parameter("user-{$id}", 0);
|
$user_value = (int)get_parameter("user-{$id}", 0);
|
||||||
|
$postpone_value = (int)get_parameter("postpone-{$id}", 0);
|
||||||
$res = mysql_db_process_sql_update(
|
$res = mysql_db_process_sql_update(
|
||||||
'tnotification_source',
|
'tnotification_source',
|
||||||
array(
|
array(
|
||||||
'enabled' => $enable_value,
|
'enabled' => $enable_value,
|
||||||
'user_editable' => $user_value,
|
'user_editable' => $user_value,
|
||||||
'also_mail' => $mail_value),
|
'also_mail' => $mail_value,
|
||||||
|
'max_postpone_time' => $postpone_value
|
||||||
|
),
|
||||||
array('id' => $source['id'])
|
array('id' => $source['id'])
|
||||||
);
|
);
|
||||||
return $res && $carry;
|
return $res && $carry;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
define('NOTIFICATIONS_POSTPONE_FOREVER', -1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves source ID for given source.
|
* Retrieves source ID for given source.
|
||||||
|
@ -214,6 +215,26 @@ function notifications_print_global_source_configuration($source) {
|
||||||
$html_checkboxes .= " </span>";
|
$html_checkboxes .= " </span>";
|
||||||
$html_checkboxes .= "</div>";
|
$html_checkboxes .= "</div>";
|
||||||
|
|
||||||
|
// Generate the select with the time
|
||||||
|
$html_select_pospone = __('Users can postpone notifications up to');
|
||||||
|
$html_select_pospone .= html_print_select (
|
||||||
|
array(
|
||||||
|
SECONDS_5MINUTES => __('5 minutes'),
|
||||||
|
SECONDS_15MINUTES => __('15 minutes'),
|
||||||
|
SECONDS_12HOURS => __('12 hours'),
|
||||||
|
SECONDS_1DAY => __('1 day'),
|
||||||
|
SECONDS_1WEEK => __('1 week'),
|
||||||
|
SECONDS_15DAYS => __('15 days'),
|
||||||
|
SECONDS_1MONTH => __('1 month'),
|
||||||
|
NOTIFICATIONS_POSTPONE_FOREVER => __('forever')),
|
||||||
|
"postpone-{$id}",
|
||||||
|
$source['max_postpone_time'],
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Return all html
|
// Return all html
|
||||||
return $html_title . $html_checkboxes;
|
return $html_title . $html_checkboxes . $html_select_pospone;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue