mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
* Notifications: popup and email are enabled per default, default preference is "popup_or_email"
This commit is contained in:
parent
47439899a5
commit
7b2a5dd23f
@ -36,6 +36,11 @@ final class notifications {
|
|||||||
*/
|
*/
|
||||||
const _fallback = 'email_only';
|
const _fallback = 'email_only';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* backend to use if EGroupware user has no preferenc set and no default preference set
|
||||||
|
*/
|
||||||
|
const user_fallback = 'popup_or_email';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* registered backends
|
* registered backends
|
||||||
* @var array
|
* @var array
|
||||||
@ -376,7 +381,7 @@ final class notifications {
|
|||||||
$notification_chain = $available_chains[self::_fallback];
|
$notification_chain = $available_chains[self::_fallback];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$notification_chain = $available_chains[self::_fallback]; // fallback: no prefs
|
$notification_chain = $available_chains[self::user_fallback]; // fallback: no prefs
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$notification_chain = $available_chains[self::_fallback]; // fallback: no rights to app
|
$notification_chain = $available_chains[self::_fallback]; // fallback: no rights to app
|
||||||
@ -535,6 +540,7 @@ final class notifications {
|
|||||||
foreach($this->backends as $id => $backend) {
|
foreach($this->backends as $id => $backend) {
|
||||||
switch($backend) {
|
switch($backend) {
|
||||||
case 'email':
|
case 'email':
|
||||||
|
case 'popup':
|
||||||
$enabled_backends[$backend] = true; // fallback must always be enabled
|
$enabled_backends[$backend] = true; // fallback must always be enabled
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -617,7 +623,7 @@ final class notifications {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions to take when an account is deleted
|
* Actions to take when an account is deleted
|
||||||
*
|
*
|
||||||
* @param settings array with keys account_id and new_owner (new_owner is optional)
|
* @param settings array with keys account_id and new_owner (new_owner is optional)
|
||||||
*/
|
*/
|
||||||
public function deleteaccount($settings) {
|
public function deleteaccount($settings) {
|
||||||
|
@ -16,7 +16,7 @@ $verbosity_values = array(
|
|||||||
'medium' => lang('medium'),
|
'medium' => lang('medium'),
|
||||||
'high' => lang('high'),
|
'high' => lang('high'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$GLOBALS['settings'] = array(
|
$GLOBALS['settings'] = array(
|
||||||
'notification_chain' => array(
|
'notification_chain' => array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
@ -26,6 +26,7 @@ $GLOBALS['settings'] = array(
|
|||||||
'help' => 'Choose a notification-chain. You will be notified over the backends included in the chain.<br />'
|
'help' => 'Choose a notification-chain. You will be notified over the backends included in the chain.<br />'
|
||||||
.'Note: If a notification-chain is marked as "disabled", your Administrator does not allow one or'
|
.'Note: If a notification-chain is marked as "disabled", your Administrator does not allow one or'
|
||||||
.' more of the backends included in the chain and notifications falls back to "E-Mail" while notifying you.',
|
.' more of the backends included in the chain and notifications falls back to "E-Mail" while notifying you.',
|
||||||
|
'default'=> 'popup_or_email',
|
||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False
|
'admin' => False
|
||||||
),
|
),
|
||||||
@ -38,6 +39,7 @@ $GLOBALS['settings'] = array(
|
|||||||
.'low: just display the notification bell in the topmenu - topmenu must be enabled!<br />'
|
.'low: just display the notification bell in the topmenu - topmenu must be enabled!<br />'
|
||||||
.'medium: bring notification window to front<br />'
|
.'medium: bring notification window to front<br />'
|
||||||
.'high: bring notification window to front and let the browser do something to announce itself',
|
.'high: bring notification window to front and let the browser do something to announce itself',
|
||||||
|
'default'=> 'medium',
|
||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False
|
'admin' => False
|
||||||
),
|
),
|
||||||
@ -50,4 +52,3 @@ $GLOBALS['settings'] = array(
|
|||||||
'admin' => False
|
'admin' => False
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
?>
|
|
@ -11,18 +11,21 @@
|
|||||||
<!-- END header -->
|
<!-- END header -->
|
||||||
<!-- BEGIN body -->
|
<!-- BEGIN body -->
|
||||||
<tr class="th">
|
<tr class="th">
|
||||||
<td colspan="2"> <b>{lang_eGroupWare-Popup_backend}</b></td>
|
<td colspan="2"> <b>{lang_Mail_backend}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="row_on">
|
<tr class="row_on">
|
||||||
<td>{lang_Enable_eGroupWare-Popup_backend}</td>
|
<td>{lang_choose_from_mailsettings_used_for_notification}</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="newsettings[popup_enable]">
|
<select name="newsettings[dontUseUserDefinedProfiles]">
|
||||||
<option value=""{selected_popup_enable_False}>{lang_No}</option>
|
<option value=""{selected_dontUseUserDefinedProfiles_False}>{lang_Check_both_(first_try_(active)_User_defined_account,_if_none_use_emailadmin_profile)}</option>
|
||||||
<option value="True"{selected_popup_enable_True}>{lang_Yes}</option>
|
<option value="True"{selected_dontUseUserDefinedProfiles_True}>{lang_Emailadmin_Profile_only_(Do_not_use_User_defined_(active)_Mail_Profiles_for_Notification)}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="row_off">
|
<tr class="th">
|
||||||
|
<td colspan="2"> <b>{lang_eGroupWare-Popup_backend}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row_on">
|
||||||
<td>{lang_Poll_interval}</td>
|
<td>{lang_Poll_interval}</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="newsettings[popup_poll_interval]">
|
<select name="newsettings[popup_poll_interval]">
|
||||||
@ -55,7 +58,7 @@
|
|||||||
<option value="True"{selected_sms_enable_True}>{lang_Yes}</option>
|
<option value="True"{selected_sms_enable_True}>{lang_Yes}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="row_off">
|
<tr class="row_off">
|
||||||
<td>{lang_Maximum_SMS_messages_per_notification}</td>
|
<td>{lang_Maximum_SMS_messages_per_notification}</td>
|
||||||
<td>
|
<td>
|
||||||
@ -66,18 +69,6 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="th">
|
|
||||||
<td colspan="2"> <b>{lang_Mail_backend}</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr class="row_on">
|
|
||||||
<td>{lang_choose_from_mailsettings_used_for_notification}</td>
|
|
||||||
<td>
|
|
||||||
<select name="newsettings[dontUseUserDefinedProfiles]">
|
|
||||||
<option value=""{selected_dontUseUserDefinedProfiles_False}>{lang_Check_both_(first_try_(active)_User_defined_account,_if_none_use_emailadmin_profile)}</option>
|
|
||||||
<option value="True"{selected_dontUseUserDefinedProfiles_True}>{lang_Emailadmin_Profile_only_(Do_not_use_User_defined_(active)_Mail_Profiles_for_Notification)}</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- END body -->
|
<!-- END body -->
|
||||||
<!-- BEGIN footer -->
|
<!-- BEGIN footer -->
|
||||||
<tr valign="bottom" style="height: 30px;">
|
<tr valign="bottom" style="height: 30px;">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user