+- (void)saveValuesIntoAppointment:(SOGoAppointment *)_appointment {
+ /* merge in form values */
+ NSArray *attendees, *lResources;
+
+#warning TODO: broken for the new date/time selector!
+#if 0
+ NSCalendarDate *sd, *ed;
+
+ sd = [self _dateFromString:[req formValueForKey:@"startDate"]];
+ ed = [self _dateFromString:[req formValueForKey:@"endDate"]];
+ if (sd == nil || ed == nil) {
+ [self setErrorText:@"missing startdate or enddate ..."]; // localize
+ return self;
+ }
+ [_appointment setStartDate:sd];
+ [_appointment setEndDate:ed];
+#endif
+
+ [_appointment setSummary:[self title]];
+ [_appointment setLocation:[self location]];
+
+ attendees = [self participants];
+ lResources = [self resources];
+ if ([lResources count] > 0) {
+ attendees = ([attendees count] > 0)
+ ? [attendees arrayByAddingObjectsFromArray:lResources]
+ : lResources;
+ }
+ [_appointment setAttendees:attendees];
+
+ [_appointment setOrganizer:[self getOrganizer]];
+}
+
+- (void)loadValuesFromICalString:(NSString *)_ical {
+ SOGoAppointment *apt;
+
+ apt = [[SOGoAppointment alloc] initWithICalString:_ical];
+ [self loadValuesFromAppointment:apt];
+ [apt release];
+}
+