Send out iTip notifications.
authorJan Schneider <jan@horde.org>
Tue, 1 Dec 2009 12:24:15 +0000 (13:24 +0100)
committerJan Schneider <jan@horde.org>
Tue, 1 Dec 2009 16:37:40 +0000 (17:37 +0100)
kronolith/ajax.php
kronolith/templates/index/edit.inc

index 411dae5..ae32b91 100644 (file)
@@ -164,6 +164,9 @@ try {
         }
         $event->readForm();
         $result = saveEvent($event);
+        if ($result !== true && Horde_Util::getFormData('sendupdates')) {
+            Kronolith::sendITipNotifications($event, $notification, Kronolith::ITIP_REQUEST);
+        }
         break;
 
     case 'QuickSaveEvent':
@@ -265,6 +268,9 @@ try {
             $notification->push($deleted, 'horde.error');
             break;
         }
+        if (Horde_Util::getFormData('sendupdates', false)) {
+            Kronolith::sendITipNotifications($event, $notification, Kronolith::ITIP_CANCEL);
+        }
         $result = new stdClass;
         $result->deleted = true;
         break;
index 2f6b149..9aeaa09 100644 (file)
 
 <div id="kronolithEventTabAttendees" class="kronolithTabsOption" style="display:none">
   <input type="text" name="attendees" id="kronolithEventAttendees" class="kronolithLongField" value="" /><br />
-  <label><input type="checkbox" name="sendupdates" value="" /> <?php printf(_("send invites %s to all attendees"), '</label>') ?><br />
+  <label><input type="checkbox" name="sendupdates" value="1" /> <?php printf(_("send invites %s to all attendees"), '</label>') ?><br />
   <div id="kronolithFBLoading" style="display:none"></div>
   <table width="100%" cellspacing="0" cellpadding="0" border="0">
     <thead>