Fix unauthenticated iTip RSVP page for external attendees (#4447)

This commit is contained in:
Thomas Bruederli 2015-02-02 12:03:36 +01:00
parent d13612cfe7
commit 86d464b6de
3 changed files with 6 additions and 3 deletions

View file

@ -2442,6 +2442,7 @@ class calendar extends rcube_plugin
}
// send itip reply to organizer
$invitation['event']['comment'] = rcube_utils::get_input_value('_comment', rcube_utils::INPUT_POST);
if ($status && $itip->update_invitation($invitation, $invitation['attendee'], strtoupper($status))) {
$this->invitestatus = html::div('rsvp-status ' . strtolower($status), $itip->gettext('youhave'.strtolower($status)));
}
@ -2465,8 +2466,10 @@ class calendar extends rcube_plugin
$this->register_handler('plugin.event_inviteform', array($this, 'itip_event_inviteform'));
$this->register_handler('plugin.event_invitebox', array($this->ui, 'event_invitebox'));
if (!$this->invitestatus)
if (!$this->invitestatus) {
$this->itip->set_rsvp_actions(array('accepted','tentative','declined'));
$this->register_handler('plugin.event_rsvp_buttons', array($this->ui, 'event_rsvp_buttons'));
}
$this->rc->output->set_pagetitle($itip->gettext('itipinvitation') . ' ' . $this->event['title']);
}

View file

@ -886,7 +886,7 @@ class calendar_ui
function event_rsvp_buttons($attrib = array())
{
return $this->cal->itip->itip_rsvp_buttons($attrib, array('accepted','tentative','declined','delegated'));
return $this->cal->itip->itip_rsvp_buttons($attrib);
}
}

View file

@ -682,7 +682,7 @@ class libcalendaring_itip
// add input field for reply comment
$rsvp_additions .= html::a(array('href' => '#toggle', 'class' => 'reply-comment-toggle'), $this->gettext('itipeditresponse'));
$rsvp_additions .= html::div('itip-reply-comment',
html::tag('textarea', array('id' => 'reply-comment-'.$dom_id, 'cols' => 40, 'rows' => 6, 'style' => 'display:none', 'placeholder' => $this->gettext('itipcomment')), '')
html::tag('textarea', array('id' => 'reply-comment-'.$dom_id, 'name' => '_comment', 'cols' => 40, 'rows' => 6, 'style' => 'display:none', 'placeholder' => $this->gettext('itipcomment')), '')
);
return $rsvp_additions;