[2] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare - Calendar Preferences * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> * |
---|
| 6 | * http://www.radix.net/~cknudsen * |
---|
| 7 | * Modified by Mark Peters <skeeter@phpgroupware.org> * |
---|
| 8 | * Modified by Ralf Becker <ralfbecker@outdoor-training.de> * |
---|
| 9 | * -------------------------------------------- * |
---|
| 10 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 11 | * under the terms of the GNU General Public License as published by the * |
---|
| 12 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 13 | * option) any later version. * |
---|
| 14 | \**************************************************************************/ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | ExecMethod('calendar.bocalendar.check_set_default_prefs'); |
---|
| 18 | |
---|
| 19 | $default = array( |
---|
| 20 | 'day' => lang('Daily'), |
---|
| 21 | 'week' => lang('Weekly'), |
---|
| 22 | 'month' => lang('Monthly'), |
---|
| 23 | 'year' => lang('Yearly'), |
---|
| 24 | 'planner_cat' => lang('Planner by category'), |
---|
| 25 | 'planner_user' => lang('Planner by user'), |
---|
| 26 | ); |
---|
| 27 | create_select_box('default calendar view','defaultcalendar',$default, |
---|
| 28 | 'Which of calendar view do you want to see, when you start calendar ?'); |
---|
| 29 | |
---|
| 30 | /* Selection of list for home page is different from default calendar, |
---|
| 31 | since the decision for the front page is different for the decision |
---|
| 32 | for the main calendar page. But the list could be added to the |
---|
| 33 | default list above, if requested. - shrykedude. */ |
---|
| 34 | $mainpage = array( |
---|
| 35 | '1' => lang('Yes'), |
---|
| 36 | '0' => lang('No'), |
---|
| 37 | '2' => lang('No').' - '.lang('show list of upcoming events'), |
---|
| 38 | ); |
---|
| 39 | create_select_box('show default view on main screen','mainscreen_showevents',$mainpage, |
---|
| 40 | 'Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?'); |
---|
| 41 | unset($mainpage); |
---|
| 42 | /* |
---|
| 43 | $summary = array( |
---|
| 44 | 'no' => lang('Never'), |
---|
| 45 | 'daily' => lang('Daily'), |
---|
| 46 | 'weekly' => lang('Weekly') |
---|
| 47 | ); |
---|
| 48 | create_select_box('Receive summary of appointments','summary',$summary, |
---|
| 49 | 'Do you want to receive a regulary summary of your appointsments via email?<br>The summary is sent to your standard email-address on the morning of that day or on Monday for weekly summarys.<br>It is only sent when you have any appointments on that day or week.'); |
---|
| 50 | */ |
---|
| 51 | $updates = array( |
---|
| 52 | 'no' => lang('Never'), |
---|
| 53 | 'add_cancel' => lang('on invitation / cancelation only'), |
---|
| 54 | 'time_change_4h' => lang('on time change of more than 4 hours too'), |
---|
| 55 | 'time_change' => lang('on any time change too'), |
---|
| 56 | 'modifications' => lang('on all modification, but responses'), |
---|
| 57 | 'responses' => lang('on participant responses too') |
---|
| 58 | ); |
---|
| 59 | create_select_box('Receive email updates','receive_updates',$updates, |
---|
| 60 | "Do you want to be notified about new or changed appointments? You be notified about changes you make yourself.<br>You can limit the notifications to certain changes only. Each item includes all the notification listed above it. All modifications include changes of title, description, participants, but no participant responses. If the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too."); |
---|
| 61 | |
---|
| 62 | $update_formats = array( |
---|
| 63 | 'none' => lang('None'), |
---|
| 64 | 'extended' => lang('Extended'), |
---|
| 65 | 'ical' => lang('iCal / rfc2445') |
---|
| 66 | ); |
---|
| 67 | create_select_box('Format of event updates','update_format',$update_formats, |
---|
| 68 | 'Extended updates always include the complete event-details. iCal\'s can be imported by certain other calendar-applications.'); |
---|
| 69 | |
---|
| 70 | $event_details = array( |
---|
| 71 | 'to-fullname' => lang('Fullname of person to notify'), |
---|
| 72 | 'to-firstname'=> lang('Firstname of person to notify'), |
---|
| 73 | 'to-lastname' => lang('Lastname of person to notify'), |
---|
| 74 | 'title' => lang('Title of the event'), |
---|
| 75 | 'description' => lang('Description'), |
---|
| 76 | 'startdate' => lang('Start Date/Time'), |
---|
| 77 | 'enddate' => lang('End Date/Time'), |
---|
| 78 | 'olddate' => lang('Old Startdate'), |
---|
| 79 | 'category' => lang('Category'), |
---|
| 80 | 'location' => lang('Location'), |
---|
| 81 | 'priority' => lang('Priority'), |
---|
| 82 | 'participant'=> lang('Participants'), |
---|
| 83 | 'owner' => lang('Owner'), |
---|
| 84 | 'repetition' => lang('Repetitiondetails (or empty)'), |
---|
| 85 | 'action' => lang('Action that caused the notify: Added, Canceled, Accepted, Rejected, ...'), |
---|
| 86 | 'link' => lang('Link to view the event'), |
---|
| 87 | ); |
---|
| 88 | create_notify('Notification messages for added events ','notifyAdded',5,50, |
---|
| 89 | 'This message is sent to every participant of events you own, who has requested notifcations about new events.<br>You can use certain variables which get substituted with the data of the event. The first line is the subject of the email.', |
---|
| 90 | '',$event_details); |
---|
| 91 | create_notify('Notification messages for canceled events ','notifyCanceled',5,50, |
---|
| 92 | 'This message is sent for canceled or deleted events.','',$event_details,False); |
---|
| 93 | create_notify('Notification messages for modified events ','notifyModified',5,50, |
---|
| 94 | 'This message is sent for modified or moved events.','',$event_details,False); |
---|
| 95 | create_notify('Notification messages for your responses ','notifyResponse',5,50, |
---|
| 96 | 'This message is sent when you accept, tentative accept or reject an event.', |
---|
| 97 | '',$event_details,False); |
---|
| 98 | create_notify('Notification messages for your alarms','notifyAlarm',5,50, |
---|
| 99 | 'This message is sent when you set an Alarm for a certain event. Include all information you might need.', |
---|
| 100 | '',$event_details,False); |
---|
| 101 | |
---|
| 102 | create_check_box('Show invitations you rejected','show_rejected', |
---|
| 103 | 'Should invitations you rejected still be shown in your calendar ?<br>You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!'); |
---|
| 104 | |
---|
| 105 | create_check_box('Display status of events','display_status', |
---|
| 106 | 'Should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ?'); |
---|
[625] | 107 | create_check_box('Hide title and description of event when conflicts','hide_event_conflict', |
---|
| 108 | 'When user invite other that time conflicts this option hide title and description even if the event is public'); |
---|
[2] | 109 | |
---|
| 110 | $weekdaystarts = array( |
---|
| 111 | 'Monday' => lang('Monday'), |
---|
| 112 | 'Sunday' => lang('Sunday'), |
---|
| 113 | 'Saturday' => lang('Saturday') |
---|
| 114 | ); |
---|
| 115 | create_select_box('weekday starts on','weekdaystarts',$weekdaystarts, |
---|
| 116 | 'This day is shown as first day in the week or month view.'); |
---|
| 117 | |
---|
| 118 | for ($i=0; $i < 24; ++$i) |
---|
| 119 | { |
---|
| 120 | $options[$i] = $GLOBALS['phpgw']->common->formattime($i,'00'); |
---|
| 121 | } |
---|
| 122 | create_select_box('work day starts on','workdaystarts',$options, |
---|
| 123 | 'This defines the start of your dayview. Events before this time, are shown above the dayview.<br>This time is also used as a default starttime for new events.'); |
---|
| 124 | create_select_box('work day ends on','workdayends',$options, |
---|
| 125 | 'This defines the end of your dayview. Events after this time, are shown below the dayview.'); |
---|
| 126 | $intervals = array( |
---|
[4010] | 127 | 84 => '15 ' . lang('minutes'), |
---|
| 128 | 42 => '30 ' . lang('minutes') |
---|
[2] | 129 | ); |
---|
| 130 | create_select_box('Intervals in day view','interval',$intervals, |
---|
| 131 | 'Defines the size in minutes of the lines in the day view.'); |
---|
| 132 | create_input_box('default appointment length (in minutes)','defaultlength', |
---|
| 133 | 'Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.','',3); |
---|
| 134 | |
---|
| 135 | $groups = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); |
---|
| 136 | $options = array(-1 => lang('none')); |
---|
| 137 | if (is_array($groups)) |
---|
| 138 | { |
---|
| 139 | foreach($groups as $group) |
---|
| 140 | { |
---|
| 141 | $options[$group['account_id']] = $GLOBALS['phpgw']->common->grab_owner_name($group['account_id']); |
---|
| 142 | } |
---|
| 143 | } |
---|
| 144 | create_select_box('Preselected group for entering the planner','planner_start_with_group',$options, |
---|
| 145 | 'This group that is preselected when you enter the planner. You can change it in the planner anytime you want.'); |
---|
| 146 | |
---|
| 147 | $planner_intervals = array( |
---|
| 148 | 1 => '1', |
---|
| 149 | 2 => '2', |
---|
| 150 | 3 => '3', |
---|
| 151 | 4 => '4', |
---|
| 152 | ); |
---|
| 153 | create_select_box('Intervals per day in planner view','planner_intervals_per_day', |
---|
| 154 | $planner_intervals,'Specifies the the number of intervals shown in the planner view.'); |
---|
| 155 | |
---|
| 156 | $defaultfilter = array( |
---|
| 157 | 'all' => lang('all'), |
---|
| 158 | 'private' => lang('private only'), |
---|
| 159 | // 'public' => lang('global public only'), |
---|
| 160 | // 'group' => lang('group public only'), |
---|
| 161 | // 'private+public' => lang('private and global public'), |
---|
| 162 | // 'private+group' => lang('private and group public'), |
---|
| 163 | // 'public+group' => lang('global public and group public') |
---|
| 164 | ); |
---|
| 165 | create_select_box('Default calendar filter','defaultfilter',$defaultfilter, |
---|
| 166 | 'Which events do you want to see when you enter the calendar.'); |
---|
| 167 | |
---|
| 168 | create_check_box('Set new events to private','default_private', |
---|
| 169 | 'Should new events created as private by default ?'); |
---|
| 170 | |
---|
| 171 | create_check_box('Print the mini calendars','display_minicals', |
---|
| 172 | 'Should the mini calendars by printed / displayed in the printer friendly views ?'); |
---|
| 173 | |
---|
| 174 | create_check_box('Print calendars in black & white','print_black_white', |
---|
| 175 | 'Should the printer friendly view be in black & white or in color (as in normal view)?'); |
---|
| 176 | |
---|
| 177 | $freebusy_url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/freebusy.php?user='.$GLOBALS['phpgw_info']['user']['account_lid'].'&password='.$GLOBALS['phpgw_info']['user']['preferences']['calendar']['freebusy_pw']; |
---|
| 178 | if ($freebusy_url[0] == '/') |
---|
| 179 | { |
---|
| 180 | $freebusy_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$freebusy_url; |
---|
| 181 | } |
---|
| 182 | $freebusy_help = lang('Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1.','<a href="'.$freebusy_url.'" target="_blank">'.$freebusy_url.'</a>'); |
---|
| 183 | create_check_box('Make freebusy information availible to not loged in persons?','freebusy', |
---|
| 184 | $freebusy_help,'',False); |
---|
| 185 | create_input_box('Password for not loged in users to your freebusy information?','freebusy_pw', |
---|
| 186 | 'If you dont set a password here, the information is availible to everyone, who knows the URL!!!'); |
---|
| 187 | create_check_box('Display status of events','display_status', |
---|
| 188 | 'Should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ?'); |
---|
| 189 | create_check_box('Leave my calendar public','public_view', |
---|
[625] | 190 | 'This option allow everybody to view your calendar in readmode.'); |
---|
[1703] | 191 | create_select_box('Default view of your calendar','title_view',array( |
---|
| 192 | '0' => lang('Title and Description'), |
---|
| 193 | '1' => lang('Only Title') |
---|
[3989] | 194 | ),'This option enable or disable the meeting description view your calendar in readmode.'); |
---|
| 195 | create_select_box('Choose fields to print','fields_to_print',array( |
---|
| 196 | '0' => lang('Only Title'), |
---|
| 197 | '1' => lang('Title and Description'), |
---|
| 198 | '2' => lang('Title, description and observations') |
---|
| 199 | ),'This option enables the choice of fields to print.'); |
---|
[4006] | 200 | create_select_box('Choose type of month print','type_month_print',array( |
---|
| 201 | '0' => lang('Events list'), |
---|
| 202 | '1' => lang('Events grid') |
---|
| 203 | ),'This option enables the choice of type of month print.'); |
---|