Add calendar_itip_after_action option - to be implemented (#419)
This commit is contained in:
parent
31bd34c5f4
commit
cfe6d63d6f
3 changed files with 62 additions and 1 deletions
|
@ -54,6 +54,7 @@ class calendar extends rcube_plugin
|
|||
'calendar_event_coloring' => 0,
|
||||
'calendar_time_indicator' => true,
|
||||
'calendar_allow_invite_shared' => false,
|
||||
'calendar_itip_after_action' => 0,
|
||||
);
|
||||
|
||||
private $ical;
|
||||
|
@ -512,6 +513,46 @@ class calendar extends rcube_plugin
|
|||
);
|
||||
}
|
||||
|
||||
$p['blocks']['itip']['name'] = $this->gettext('itipoptions');
|
||||
|
||||
// Invitations handling
|
||||
if (!isset($no_override['calendar_itip_after_action'])) {
|
||||
if (!$p['current']) {
|
||||
$p['blocks']['itip']['content'] = true;
|
||||
return $p;
|
||||
}
|
||||
|
||||
$field_id = 'rcmfd_after_action';
|
||||
$select = new html_select(array('name' => '_after_action', 'id' => $field_id,
|
||||
'onchange' => "\$('#{$field_id}_select')[this.value == 4 ? 'show' : 'hide']()"));
|
||||
|
||||
$select->add($this->gettext('afternothing'), '');
|
||||
$select->add($this->gettext('aftertrash'), 1);
|
||||
$select->add($this->gettext('afterdelete'), 2);
|
||||
$select->add($this->gettext('afterflagdeleted'), 3);
|
||||
$select->add($this->gettext('aftermoveto'), 4);
|
||||
|
||||
$val = $this->rc->config->get('calendar_itip_after_action', $this->defaults['calendar_itip_after_action']);
|
||||
if ($val !== null && $val !== '' && !is_int($val)) {
|
||||
$folder = $val;
|
||||
$val = 4;
|
||||
}
|
||||
|
||||
$folders = $this->rc->folder_selector(array(
|
||||
'id' => $field_id . '_select',
|
||||
'name' => '_after_action_folder',
|
||||
'maxlength' => 30,
|
||||
'folder_filter' => 'mail',
|
||||
'folder_rights' => 'w',
|
||||
'style' => $val !== 4 ? 'display:none' : '',
|
||||
));
|
||||
|
||||
$p['blocks']['itip']['options']['after_action'] = array(
|
||||
'title' => html::label($field_id, Q($this->gettext('afteraction'))),
|
||||
'content' => $select->show($val) . $folders->show($folder),
|
||||
);
|
||||
}
|
||||
|
||||
// category definitions
|
||||
if (!$this->driver->nocategories && !isset($no_override['calendar_categories'])) {
|
||||
$p['blocks']['categories']['name'] = $this->gettext('categories');
|
||||
|
@ -660,8 +701,13 @@ class calendar extends rcube_plugin
|
|||
'calendar_birthday_adressbooks' => (array)get_input_value('_birthday_adressbooks', RCUBE_INPUT_POST),
|
||||
'calendar_birthdays_alarm_type' => get_input_value('_birthdays_alarm_type', RCUBE_INPUT_POST),
|
||||
'calendar_birthdays_alarm_offset' => $birthdays_alarm_value ?: null,
|
||||
'calendar_itip_after_action' => intval(get_input_value('_after_action', RCUBE_INPUT_POST)),
|
||||
);
|
||||
|
||||
if ($p['prefs']['calendar_itip_after_action'] == 4) {
|
||||
$p['prefs']['calendar_itip_after_action'] = get_input_value('_after_action_folder', RCUBE_INPUT_POST, true);
|
||||
}
|
||||
|
||||
// categories
|
||||
if (!$this->driver->nocategories) {
|
||||
$old_categories = $new_categories = array();
|
||||
|
|
|
@ -143,6 +143,14 @@ $rcmail_config['kolab_invitation_calendars'] = true;
|
|||
// $rcmail_config['calendar_resources_driver'] = 'ldap';
|
||||
|
||||
// LDAP directory configuration to find avilable resources for events
|
||||
// $rcmail_config['calendar_resources_directory'] = array(/* ldap_public-like address book configuration */)
|
||||
// $rcmail_config['calendar_resources_directory'] = array(/* ldap_public-like address book configuration */);
|
||||
|
||||
// Action taken after iTip request is handled. Possible values:
|
||||
// 0 - no action
|
||||
// 1 - move to Trash
|
||||
// 2 - delete the message
|
||||
// 3 - flag as deleted
|
||||
// folder_name - move the message to the specified folder
|
||||
$rcmail_config['calendar_itip_after_action'] = 0;
|
||||
|
||||
?>
|
||||
|
|
|
@ -17,6 +17,13 @@ $labels['coloringmode0'] = 'According to calendar';
|
|||
$labels['coloringmode1'] = 'According to category';
|
||||
$labels['coloringmode2'] = 'Calendar for outline, category for content';
|
||||
$labels['coloringmode3'] = 'Category for outline, calendar for content';
|
||||
$labels['afternothing'] = 'Do nothing';
|
||||
$labels['aftertrash'] = 'Move to Trash';
|
||||
$labels['afterdelete'] = 'Delete the message';
|
||||
$labels['afterflagdeleted'] = 'Flag as deleted';
|
||||
$labels['aftermoveto'] = 'Move to...';
|
||||
$labels['itipoptions'] = 'Invitations';
|
||||
$labels['afteraction'] = 'After the request is handled';
|
||||
|
||||
// calendar
|
||||
$labels['calendar'] = 'Calendar';
|
||||
|
|
Loading…
Add table
Reference in a new issue