summaryrefslogtreecommitdiff
path: root/plugins/libcalendaring
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-27 12:00:08 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-27 12:00:08 (GMT)
commited6eaac9d09a0135bb41bdfc45822f64b5afd9ee (patch)
tree64794fe9f3830b987e3c038cbb242cdf5745e5bb /plugins/libcalendaring
parentc7b422907ed6ecf218b819fb4b617165862b4b6f (diff)
downloadroundcubemail-plugins-kolab-ed6eaac9d09a0135bb41bdfc45822f64b5afd9ee.tar.gz
Add config option to hide iTip sending checkboxes or even disable it entirely (#3483).
The default setting remains visible + checked. Set $config['calendar_itip_send_option'] = 1; to hide the checkboxes and implicitly send iTip notifications.
Diffstat (limited to 'plugins/libcalendaring')
-rw-r--r--plugins/libcalendaring/lib/libcalendaring_itip.php16
-rw-r--r--plugins/libcalendaring/libcalendaring.js2
-rw-r--r--plugins/libcalendaring/skins/larry/libcal.css5
3 files changed, 17 insertions, 6 deletions
diff --git a/plugins/libcalendaring/lib/libcalendaring_itip.php b/plugins/libcalendaring/lib/libcalendaring_itip.php
index 6ff1229..ce68655 100644
--- a/plugins/libcalendaring/lib/libcalendaring_itip.php
+++ b/plugins/libcalendaring/lib/libcalendaring_itip.php
@@ -563,11 +563,19 @@ class libcalendaring_itip
*/
public function itip_rsvp_options_ui($dom_id, $disable = false)
{
+ $itip_sending = $this->rc->config->get('calendar_itip_send_option', 3);
+
+ // itip sending is entirely disabled
+ if ($itip_sending === 0) {
+ return '';
+ }
// add checkbox to suppress itip reply message
- $rsvp_additions = html::label(array('class' => 'noreply-toggle'),
- html::tag('input', array('type' => 'checkbox', 'id' => 'noreply-'.$dom_id, 'value' => 1, 'disabled' => $disable))
- . ' ' . $this->gettext('itipsuppressreply')
- );
+ else if ($itip_sending >= 2) {
+ $rsvp_additions = html::label(array('class' => 'noreply-toggle'),
+ html::tag('input', array('type' => 'checkbox', 'id' => 'noreply-'.$dom_id, 'value' => 1, 'disabled' => $disable, 'checked' => ($itip_sending & 1) == 0))
+ . ' ' . $this->gettext('itipsuppressreply')
+ );
+ }
// add input field for reply comment
$rsvp_additions .= html::a(array('href' => '#toggle', 'class' => 'reply-comment-toggle'), $this->gettext('itipeditresponse'));
diff --git a/plugins/libcalendaring/libcalendaring.js b/plugins/libcalendaring/libcalendaring.js
index 39b34ae..cd06827 100644
--- a/plugins/libcalendaring/libcalendaring.js
+++ b/plugins/libcalendaring/libcalendaring.js
@@ -805,7 +805,7 @@ rcube_libcalendaring.add_from_itip_mail = function(mime_id, task, status, dom_id
var noreply = 0, comment = '';
if (dom_id) {
- noreply = $('#noreply-'+dom_id).prop('checked') ? 1 : 0;
+ noreply = $('#noreply-'+dom_id+':checked').length ? 1 : 0;
if (!noreply)
comment = $('#reply-comment-'+dom_id).val();
}
diff --git a/plugins/libcalendaring/skins/larry/libcal.css b/plugins/libcalendaring/skins/larry/libcal.css
index 7cfe630..89e123f 100644
--- a/plugins/libcalendaring/skins/larry/libcal.css
+++ b/plugins/libcalendaring/skins/larry/libcal.css
@@ -59,10 +59,13 @@ span.edit-alarm-set {
a.reply-comment-toggle {
display: inline-block;
- margin-left: 1em;
color: #666;
}
+label.noreply-toggle + a.reply-comment-toggle {
+ margin-left: 1em;
+}
+
.itip-reply-comment textarea {
display: block;
width: 90%;