Changeset 2164 in subversion
- Timestamp:
- Dec 16, 2008 2:05:50 PM (4 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 4 edited
-
program/include/html.php (modified) (1 diff)
-
program/steps/settings/func.inc (modified) (2 diffs)
-
skins/default/settings.css (modified) (1 diff)
-
skins/default/templates/settings.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/html.php
r1897 r2164 670 670 return parent::show(); 671 671 } 672 673 /** 674 * Count number of rows 675 * 676 * @return The number of rows 677 */ 678 public function size() 679 { 680 return count($this->rows); 681 } 672 682 } 673 683 -
trunk/roundcubemail/program/steps/settings/func.inc
r2115 r2164 26 26 { 27 27 global $RCMAIL; 28 $config = $RCMAIL->config->all(); 29 30 $ no_override = is_array($config['dont_override']) ? array_flip($config['dont_override']) : array();28 29 $no_override = array_flip($RCMAIL->config->get('dont_override', array())); 30 $blocks = $attrib['parts'] ? preg_split('/[\s,;]+/', strip_quotes($attrib['parts'])) : array('general','mailbox','compose','mailview','folders','server'); 31 31 32 32 // add some labels to client … … 37 37 38 38 $out = $form_start; 39 $table = new html_table(array('cols' => 2)); 40 41 // show language selection 42 if (!isset($no_override['language'])) { 43 $a_lang = $RCMAIL->list_languages(); 44 asort($a_lang); 45 46 $field_id = 'rcmfd_lang'; 47 $select_lang = new html_select(array('name' => '_language', 'id' => $field_id)); 48 $select_lang->add(array_values($a_lang), array_keys($a_lang)); 49 50 $table->add('title', html::label($field_id, Q(rcube_label('language')))); 51 $table->add(null, $select_lang->show($RCMAIL->user->language)); 39 40 foreach ($blocks as $part) 41 $out .= rcmail_user_prefs_block($part, $no_override, $attrib); 42 43 return $out . $form_end; 44 } 45 46 function rcmail_user_prefs_block($part, $no_override, $attrib) 47 { 48 global $RCMAIL; 49 $config = $RCMAIL->config->all(); 50 51 switch ($part) 52 { 53 // General UI settings 54 case 'general': 55 $table = new html_table(array('cols' => 2)); 56 57 // show language selection 58 if (!isset($no_override['language'])) { 59 $a_lang = $RCMAIL->list_languages(); 60 asort($a_lang); 61 62 $field_id = 'rcmfd_lang'; 63 $select_lang = new html_select(array('name' => '_language', 'id' => $field_id)); 64 $select_lang->add(array_values($a_lang), array_keys($a_lang)); 65 66 $table->add('title', html::label($field_id, Q(rcube_label('language')))); 67 $table->add(null, $select_lang->show($RCMAIL->user->language)); 68 } 69 70 // show page size selection 71 if (!isset($no_override['timezone'])) { 72 $field_id = 'rcmfd_timezone'; 73 $select_timezone = new html_select(array('name' => '_timezone', 'id' => $field_id, 'onchange' => "document.getElementById('rcmfd_dst').disabled=this.selectedIndex==0")); 74 $select_timezone->add(rcube_label('autodetect'), 'auto'); 75 $select_timezone->add('(GMT -11:00) Midway Island, Samoa', '-11'); 76 $select_timezone->add('(GMT -10:00) Hawaii', '-10'); 77 $select_timezone->add('(GMT -9:30) Marquesas Islands', '-9.5'); 78 $select_timezone->add('(GMT -9:00) Alaska', '-9'); 79 $select_timezone->add('(GMT -8:00) Pacific Time (US/Canada)', '-8'); 80 $select_timezone->add('(GMT -7:00) Mountain Time (US/Canada)', '-7'); 81 $select_timezone->add('(GMT -6:00) Central Time (US/Canada), Mexico City', '-6'); 82 $select_timezone->add('(GMT -5:00) Eastern Time (US/Canada), Bogota, Lima', '-5'); 83 $select_timezone->add('(GMT -4:30) Caracas', '-4.5'); 84 $select_timezone->add('(GMT -4:00) Atlantic Time (Canada), La Paz', '-4'); 85 $select_timezone->add('(GMT -3:30) Nfld Time (Canada), Nfld, S. Labador', '-3.5'); 86 $select_timezone->add('(GMT -3:00) Brazil, Buenos Aires, Georgetown', '-3'); 87 $select_timezone->add('(GMT -2:00) Mid-Atlantic', '-2'); 88 $select_timezone->add('(GMT -1:00) Azores, Cape Verde Islands', '-1'); 89 $select_timezone->add('(GMT) Western Europe, London, Lisbon, Casablanca', '0'); 90 $select_timezone->add('(GMT +1:00) Central European Time', '1'); 91 $select_timezone->add('(GMT +2:00) EET: Kaliningrad, South Africa', '2'); 92 $select_timezone->add('(GMT +3:00) Baghdad, Kuwait, Riyadh, Moscow, Nairobi', '3'); 93 $select_timezone->add('(GMT +3:30) Tehran', '3.5'); 94 $select_timezone->add('(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi', '4'); 95 $select_timezone->add('(GMT +4:30) Kabul', '4.5'); 96 $select_timezone->add('(GMT +5:00) Ekaterinburg, Islamabad, Karachi', '5'); 97 $select_timezone->add('(GMT +5:30) Chennai, Kolkata, Mumbai, New Delhi', '5.5'); 98 $select_timezone->add('(GMT +5:45) Kathmandu', '5.75'); 99 $select_timezone->add('(GMT +6:00) Almaty, Dhaka, Colombo', '6'); 100 $select_timezone->add('(GMT +6:30) Cocos Islands, Myanmar', '6.5'); 101 $select_timezone->add('(GMT +7:00) Bangkok, Hanoi, Jakarta', '7'); 102 $select_timezone->add('(GMT +8:00) Beijing, Perth, Singapore, Taipei', '8'); 103 $select_timezone->add('(GMT +8:45) Caiguna, Eucla, Border Village', '8.75'); 104 $select_timezone->add('(GMT +9:00) Tokyo, Seoul, Yakutsk', '9'); 105 $select_timezone->add('(GMT +9:30) Adelaide, Darwin', '9.5'); 106 $select_timezone->add('(GMT +10:00) EAST/AEST: Sydney, Guam, Vladivostok', '10'); 107 $select_timezone->add('(GMT +10:30) New South Wales', '10.5'); 108 $select_timezone->add('(GMT +11:00) Magadan, Solomon Islands', '11'); 109 $select_timezone->add('(GMT +11:30) Norfolk Island', '11.5'); 110 $select_timezone->add('(GMT +12:00) Auckland, Wellington, Kamchatka', '12'); 111 $select_timezone->add('(GMT +12:45) Chatham Islands', '12.75'); 112 $select_timezone->add('(GMT +13:00) Tonga, Pheonix Islands', '13'); 113 $select_timezone->add('(GMT +14:00) Kiribati', '14'); 114 115 $table->add('title', html::label($field_id, Q(rcube_label('timezone')))); 116 $table->add(null, $select_timezone->show((string)$config['timezone'])); 117 } 118 119 // daylight savings 120 if (!isset($no_override['dst_active'])) { 121 $field_id = 'rcmfd_dst'; 122 $input_dst = new html_checkbox(array('name' => '_dst_active', 'id' => $field_id, 'value' => 1, 'disabled' => ($config['timezone'] === 'auto'))); 123 124 $table->add('title', html::label($field_id, Q(rcube_label('dstactive')))); 125 $table->add(null, $input_dst->show($config['dst_active'])); 126 } 127 128 // MM: Show checkbox for toggling 'pretty dates' 129 if (!isset($no_override['prettydate'])) { 130 $field_id = 'rcmfd_prettydate'; 131 $input_prettydate = new html_checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1)); 132 133 $table->add('title', html::label($field_id, Q(rcube_label('prettydate')))); 134 $table->add(null, $input_prettydate->show($config['prettydate']?1:0)); 135 } 136 137 // show page size selection 138 if (!isset($no_override['pagesize'])) { 139 $field_id = 'rcmfd_pgsize'; 140 $input_pagesize = new html_inputfield(array('name' => '_pagesize', 'id' => $field_id, 'size' => 5)); 141 142 $table->add('title', html::label($field_id, Q(rcube_label('pagesize')))); 143 $table->add(null, $input_pagesize->show($config['pagesize'])); 144 } 145 146 // show drop-down for available skins 147 if (!isset($no_override['skin'])) { 148 $skins = rcmail_get_skins(); 149 150 if (count($skins) > 1) { 151 $field_id = 'rcmfd_skin'; 152 $input_skin = new html_select(array('name'=>'_skin', 'id'=>$field_id)); 153 154 foreach($skins as $skin) 155 $input_skin->add($skin, $skin); 156 157 $table->add('title', html::label($field_id, Q(rcube_label('skin')))); 158 $table->add(null, $input_skin->show($config['skin'])); 159 } 160 } 161 162 if ($table->size()) 163 $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('uisettings'))) . $table->show($attrib)); 164 break; 165 166 167 // Mailbox view (mail screen) 168 case 'mailbox': 169 $table = new html_table(array('cols' => 2)); 170 171 if (!isset($no_override['focus_on_new_message'])) { 172 $field_id = 'rcmfd_focus_on_new_message'; 173 $input_focus_on_new_message = new html_checkbox(array('name' => '_focus_on_new_message', 'id' => $field_id, 'value' => 1)); 174 $table->add('title', html::label($field_id, Q(rcube_label('focusonnewmessage')))); 175 $table->add(null, $input_focus_on_new_message->show($config['focus_on_new_message']?1:0)); 176 } 177 178 // show config parameter for preview pane 179 if (!isset($no_override['preview_pane'])) { 180 $field_id = 'rcmfd_preview'; 181 $input_preview = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1)); 182 183 $table->add('title', html::label($field_id, Q(rcube_label('previewpane')))); 184 $table->add(null, $input_preview->show($config['preview_pane']?1:0)); 185 } 186 187 if (!isset($no_override['mdn_requests'])) { 188 $field_id = 'rcmfd_mdn_requests'; 189 $select_mdn_requests = new html_select(array('name' => '_mdn_requests', 'id' => $field_id)); 190 $select_mdn_requests->add(rcube_label('askuser'), 0); 191 $select_mdn_requests->add(rcube_label('autosend'), 1); 192 $select_mdn_requests->add(rcube_label('ignore'), 2); 193 194 $table->add('title', html::label($field_id, Q(rcube_label('mdnrequests')))); 195 $table->add(null, $select_mdn_requests->show($config['mdn_requests'])); 196 } 197 198 if (!isset($no_override['keep_alive'])) { 199 $field_id = 'rcmfd_keep_alive'; 200 $select_keep_alive = new html_select(array('name' => '_keep_alive', 'id' => $field_id)); 201 202 foreach(array(1, 3, 5, 10, 15, 30, 60) as $min) 203 if((!$config['min_keep_alive'] || $config['min_keep_alive'] <= $min * 60) 204 && (!$config['session_lifetime'] || $config['session_lifetime'] > $min)) { 205 $select_keep_alive->add(rcube_label(array('name' => 'keepaliveevery', 'vars' => array('n' => $min))), $min); 206 } 207 208 $table->add('title', html::label($field_id, Q(rcube_label('keepalive')))); 209 $table->add(null, $select_keep_alive->show($config['keep_alive']/60)); 210 } 211 212 if (!isset($no_override['check_all_folders'])) { 213 $field_id = 'rcmfd_check_all_folders'; 214 $input_check_all = new html_checkbox(array('name' => '_check_all_folders', 'id' => $field_id, 'value' => 1)); 215 $table->add('title', html::label($field_id, Q(rcube_label('checkallfolders')))); 216 $table->add(null, $input_check_all->show($config['check_all_folders']?1:0)); 217 } 218 219 if ($table->size()) 220 $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('mailboxview'))) . $table->show($attrib)); 221 break; 222 223 224 // Message viewing 225 case 'mailview': 226 $table = new html_table(array('cols' => 2)); 227 228 // show checkbox for HTML/plaintext messages 229 if (!isset($no_override['prefer_html'])) { 230 $field_id = 'rcmfd_htmlmsg'; 231 $input_preferhtml = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1, 232 'onchange' => JS_OBJECT_NAME.'.toggle_prefer_html(this)')); 233 234 $table->add('title', html::label($field_id, Q(rcube_label('preferhtml')))); 235 $table->add(null, $input_preferhtml->show($config['prefer_html']?1:0)); 236 } 237 238 if (!isset($no_override['show_images'])) { 239 $field_id = 'rcmfd_show_images'; 240 $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id)); 241 $input_show_images->add(rcube_label('never'), 0); 242 $input_show_images->add(rcube_label('fromknownsenders'), 1); 243 $input_show_images->add(rcube_label('always'), 2); 244 245 $table->add('title', html::label($field_id, Q(rcube_label('showremoteimages')))); 246 $table->add(null, $input_show_images->show($config['show_images'])); 247 } 248 249 if (!isset($no_override['inline_images'])) { 250 $field_id = 'rcmfd_inline_images'; 251 $input_inline_images = new html_checkbox(array('name' => '_inline_images', 'id' => $field_id, 'value' => 1)); 252 253 $table->add('title', html::label($field_id, Q(rcube_label('showinlineimages')))); 254 $table->add(null, $input_inline_images->show($config['inline_images']?1:0)); 255 } 256 257 if ($table->size()) 258 $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagesdisplaying'))) . $table->show($attrib)); 259 break; 260 261 262 // Mail composition 263 case 'compose': 264 $table = new html_table(array('cols' => 2)); 265 266 // Show checkbox for HTML Editor 267 if (!isset($no_override['htmleditor'])) { 268 $field_id = 'rcmfd_htmleditor'; 269 $input_htmleditor = new html_checkbox(array('name' => '_htmleditor', 'id' => $field_id, 'value' => 1)); 270 271 $table->add('title', html::label($field_id, Q(rcube_label('htmleditor')))); 272 $table->add(null, $input_htmleditor->show($config['htmleditor']?1:0)); 273 } 274 275 if (!isset($no_override['draft_autosave'])) { 276 $field_id = 'rcmfd_autosave'; 277 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => $field_id, 'disabled' => empty($config['drafts_mbox']))); 278 $select_autosave->add(rcube_label('never'), 0); 279 foreach (array(3, 5, 10) as $i => $min) 280 $select_autosave->add(rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min))), $min*60); 281 282 $table->add('title', html::label($field_id, Q(rcube_label('autosavedraft')))); 283 $table->add(null, $select_autosave->show($config['draft_autosave'])); 284 } 285 286 if (!isset($no_override['mime_param_folding'])) { 287 $field_id = 'rcmfd_param_folding'; 288 $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => $field_id)); 289 $select_param_folding->add(rcube_label('2231folding'), 0); 290 $select_param_folding->add(rcube_label('miscfolding'), 1); 291 $select_param_folding->add(rcube_label('2047folding'), 2); 292 293 $table->set_row_attribs('advanced'); 294 $table->add('title', html::label($field_id, Q(rcube_label('mimeparamfolding')))); 295 $table->add(null, $select_param_folding->show($config['mime_param_folding'])); 296 } 297 298 if ($table->size()) 299 $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagescomposition'))) . $table->show($attrib)); 300 break; 301 302 303 // Special IMAP folders 304 case 'folders': 305 // Configure special folders 306 if (!isset($no_override['default_imap_folders'])) { 307 $RCMAIL->imap_init(true); 308 $select = rcmail_mailbox_select(array('noselection' => '---', 'realnames' => true, 'maxlength' => 30)); 309 310 $table = new html_table(array('cols' => 2)); 311 312 if (!isset($no_override['drafts_mbox'])) { 313 $table->add('title', Q(rcube_label('drafts'))); 314 $table->add(null, $select->show($config['drafts_mbox'], array('name' => "_drafts_mbox", 'onchange' => "document.getElementById('rcmfd_autosave').disabled=this.selectedIndex==0"))); 315 } 316 317 if (!isset($no_override['sent_mbox'])) { 318 $table->add('title', Q(rcube_label('sent'))); 319 $table->add(null, $select->show($config['sent_mbox'], array('name' => "_sent_mbox"))); 320 } 321 322 if (!isset($no_override['junk_mbox'])) { 323 $table->add('title', Q(rcube_label('junk'))); 324 $table->add(null, $select->show($config['junk_mbox'], array('name' => "_junk_mbox"))); 325 } 326 327 if (!isset($no_override['trash_mbox'])) { 328 $table->add('title', Q(rcube_label('trash'))); 329 $table->add(null, $select->show($config['trash_mbox'], array('name' => "_trash_mbox"))); 330 } 331 332 $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('specialfolders'))) . $table->show($attrib)); 333 } 334 break; 335 336 337 // Server settings 338 case 'server': 339 $table = new html_table(array('cols' => 2)); 340 341 if (!isset($no_override['read_when_deleted'])) { 342 $field_id = 'rcmfd_read_deleted'; 343 $input_readdeleted = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1)); 344 345 $table->add('title', html::label($field_id, Q(rcube_label('readwhendeleted')))); 346 $table->add(null, $input_readdeleted->show($config['read_when_deleted']?1:0)); 347 } 348 349 if (!isset($no_override['flag_for_deletion'])) { 350 $field_id = 'rcmfd_flag_for_deletion'; 351 $input_flagfordeletion = new html_checkbox(array('name' => '_flag_for_deletion', 'id' => $field_id, 'value' => 1)); 352 353 $table->add('title', html::label($field_id, Q(rcube_label('flagfordeletion')))); 354 $table->add(null, $input_flagfordeletion->show($config['flag_for_deletion']?1:0)); 355 } 356 357 // don't show deleted messages 358 if (!isset($no_override['skip_deleted'])) { 359 $field_id = 'rcmfd_skip_deleted'; 360 $input_purge = new html_checkbox(array('name' => '_skip_deleted', 'id' => $field_id, 'value' => 1)); 361 362 $table->add('title', html::label($field_id, Q(rcube_label('skipdeleted')))); 363 $table->add(null, $input_purge->show($config['skip_deleted']?1:0)); 364 } 365 366 // Trash purging on logout 367 if (!isset($no_override['logout_purge'])) { 368 $field_id = 'rcmfd_logout_purge'; 369 $input_purge = new html_checkbox(array('name' => '_logout_purge', 'id' => $field_id, 'value' => 1)); 370 371 $table->add('title', html::label($field_id, Q(rcube_label('logoutclear')))); 372 $table->add(null, $input_purge->show($config['logout_purge']?1:0)); 373 } 374 375 // INBOX compacting on logout 376 if (!isset($no_override['logout_expunge'])) { 377 $field_id = 'rcmfd_logout_expunge'; 378 $input_expunge = new html_checkbox(array('name' => '_logout_expunge', 'id' => $field_id, 'value' => 1)); 379 380 $table->add('title', html::label($field_id, Q(rcube_label('logoutcompact')))); 381 $table->add(null, $input_expunge->show($config['logout_expunge']?1:0)); 382 } 383 384 if ($table->size()) 385 $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('serversettings'))) . $table->show($attrib)); 386 break; 387 388 389 default: 390 $out = ''; 52 391 } 53 54 55 // show page size selection 56 if (!isset($no_override['timezone'])) { 57 $field_id = 'rcmfd_timezone'; 58 $select_timezone = new html_select(array('name' => '_timezone', 'id' => $field_id, 'onchange' => "document.getElementById('rcmfd_dst').disabled=this.selectedIndex==0")); 59 $select_timezone->add(rcube_label('autodetect'), 'auto'); 60 $select_timezone->add('(GMT -11:00) Midway Island, Samoa', '-11'); 61 $select_timezone->add('(GMT -10:00) Hawaii', '-10'); 62 $select_timezone->add('(GMT -9:30) Marquesas Islands', '-9.5'); 63 $select_timezone->add('(GMT -9:00) Alaska', '-9'); 64 $select_timezone->add('(GMT -8:00) Pacific Time (US/Canada)', '-8'); 65 $select_timezone->add('(GMT -7:00) Mountain Time (US/Canada)', '-7'); 66 $select_timezone->add('(GMT -6:00) Central Time (US/Canada), Mexico City', '-6'); 67 $select_timezone->add('(GMT -5:00) Eastern Time (US/Canada), Bogota, Lima', '-5'); 68 $select_timezone->add('(GMT -4:30) Caracas', '-4.5'); 69 $select_timezone->add('(GMT -4:00) Atlantic Time (Canada), La Paz', '-4'); 70 $select_timezone->add('(GMT -3:30) Nfld Time (Canada), Nfld, S. Labador', '-3.5'); 71 $select_timezone->add('(GMT -3:00) Brazil, Buenos Aires, Georgetown', '-3'); 72 $select_timezone->add('(GMT -2:00) Mid-Atlantic', '-2'); 73 $select_timezone->add('(GMT -1:00) Azores, Cape Verde Islands', '-1'); 74 $select_timezone->add('(GMT) Western Europe, London, Lisbon, Casablanca', '0'); 75 $select_timezone->add('(GMT +1:00) Central European Time', '1'); 76 $select_timezone->add('(GMT +2:00) EET: Kaliningrad, South Africa', '2'); 77 $select_timezone->add('(GMT +3:00) Baghdad, Kuwait, Riyadh, Moscow, Nairobi', '3'); 78 $select_timezone->add('(GMT +3:30) Tehran', '3.5'); 79 $select_timezone->add('(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi', '4'); 80 $select_timezone->add('(GMT +4:30) Kabul', '4.5'); 81 $select_timezone->add('(GMT +5:00) Ekaterinburg, Islamabad, Karachi', '5'); 82 $select_timezone->add('(GMT +5:30) Chennai, Kolkata, Mumbai, New Delhi', '5.5'); 83 $select_timezone->add('(GMT +5:45) Kathmandu', '5.75'); 84 $select_timezone->add('(GMT +6:00) Almaty, Dhaka, Colombo', '6'); 85 $select_timezone->add('(GMT +6:30) Cocos Islands, Myanmar', '6.5'); 86 $select_timezone->add('(GMT +7:00) Bangkok, Hanoi, Jakarta', '7'); 87 $select_timezone->add('(GMT +8:00) Beijing, Perth, Singapore, Taipei', '8'); 88 $select_timezone->add('(GMT +8:45) Caiguna, Eucla, Border Village', '8.75'); 89 $select_timezone->add('(GMT +9:00) Tokyo, Seoul, Yakutsk', '9'); 90 $select_timezone->add('(GMT +9:30) Adelaide, Darwin', '9.5'); 91 $select_timezone->add('(GMT +10:00) EAST/AEST: Sydney, Guam, Vladivostok', '10'); 92 $select_timezone->add('(GMT +10:30) New South Wales', '10.5'); 93 $select_timezone->add('(GMT +11:00) Magadan, Solomon Islands', '11'); 94 $select_timezone->add('(GMT +11:30) Norfolk Island', '11.5'); 95 $select_timezone->add('(GMT +12:00) Auckland, Wellington, Kamchatka', '12'); 96 $select_timezone->add('(GMT +12:45) Chatham Islands', '12.75'); 97 $select_timezone->add('(GMT +13:00) Tonga, Pheonix Islands', '13'); 98 $select_timezone->add('(GMT +14:00) Kiribati', '14'); 99 100 $table->add('title', html::label($field_id, Q(rcube_label('timezone')))); 101 $table->add(null, $select_timezone->show((string)$config['timezone'])); 102 } 103 104 // daylight savings 105 if (!isset($no_override['dst_active'])) { 106 $field_id = 'rcmfd_dst'; 107 $input_dst = new html_checkbox(array('name' => '_dst_active', 'id' => $field_id, 'value' => 1, 'disabled' => ($config['timezone'] === 'auto'))); 108 109 $table->add('title', html::label($field_id, Q(rcube_label('dstactive')))); 110 $table->add(null, $input_dst->show($config['dst_active'])); 111 } 112 113 // MM: Show checkbox for toggling 'pretty dates' 114 if (!isset($no_override['prettydate'])) { 115 $field_id = 'rcmfd_prettydate'; 116 $input_prettydate = new html_checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1)); 117 118 $table->add('title', html::label($field_id, Q(rcube_label('prettydate')))); 119 $table->add(null, $input_prettydate->show($config['prettydate']?1:0)); 120 } 121 122 // show page size selection 123 if (!isset($no_override['pagesize'])) { 124 $field_id = 'rcmfd_pgsize'; 125 $input_pagesize = new html_inputfield(array('name' => '_pagesize', 'id' => $field_id, 'size' => 5)); 126 127 $table->add('title', html::label($field_id, Q(rcube_label('pagesize')))); 128 $table->add(null, $input_pagesize->show($config['pagesize'])); 129 } 130 131 // show drop-down for available skins 132 if (!isset($no_override['skin'])) { 133 $skins = rcmail_get_skins(); 134 135 if (count($skins) > 1) { 136 $field_id = 'rcmfd_skin'; 137 $input_skin = new html_select(array('name'=>'_skin', 'id'=>$field_id)); 138 139 foreach($skins as $skin) 140 $input_skin->add($skin, $skin); 141 142 $table->add('title', html::label($field_id, Q(rcube_label('skin')))); 143 $table->add(null, $input_skin->show($config['skin'])); 144 } 145 } 146 147 $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('uisettings'))) . $table->show($attrib)); 148 149 $table = new html_table(array('cols' => 2)); 150 151 if (!isset($no_override['focus_on_new_message'])) { 152 $field_id = 'rcmfd_focus_on_new_message'; 153 $input_focus_on_new_message = new html_checkbox(array('name' => '_focus_on_new_message', 'id' => $field_id, 'value' => 1)); 154 $table->add('title', html::label($field_id, Q(rcube_label('focusonnewmessage')))); 155 $table->add(null, $input_focus_on_new_message->show($config['focus_on_new_message']?1:0)); 156 } 157 158 // show config parameter for preview pane 159 if (!isset($no_override['preview_pane'])) { 160 $field_id = 'rcmfd_preview'; 161 $input_preview = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1)); 162 163 $table->add('title', html::label($field_id, Q(rcube_label('previewpane')))); 164 $table->add(null, $input_preview->show($config['preview_pane']?1:0)); 165 } 166 167 if (!isset($no_override['mdn_requests'])) { 168 $field_id = 'rcmfd_mdn_requests'; 169 $select_mdn_requests = new html_select(array('name' => '_mdn_requests', 'id' => $field_id)); 170 $select_mdn_requests->add(rcube_label('askuser'), 0); 171 $select_mdn_requests->add(rcube_label('autosend'), 1); 172 $select_mdn_requests->add(rcube_label('ignore'), 2); 173 174 $table->add('title', html::label($field_id, Q(rcube_label('mdnrequests')))); 175 $table->add(null, $select_mdn_requests->show($config['mdn_requests'])); 176 } 177 178 if (!isset($no_override['keep_alive'])) { 179 $field_id = 'rcmfd_keep_alive'; 180 $select_keep_alive = new html_select(array('name' => '_keep_alive', 'id' => $field_id)); 181 182 foreach(array(1, 3, 5, 10, 15, 30, 60) as $min) 183 if((!$config['min_keep_alive'] || $config['min_keep_alive'] <= $min * 60) 184 && (!$config['session_lifetime'] || $config['session_lifetime'] > $min)) { 185 $select_keep_alive->add(rcube_label(array('name' => 'keepaliveevery', 'vars' => array('n' => $min))), $min); 186 } 187 188 $table->add('title', html::label($field_id, Q(rcube_label('keepalive')))); 189 $table->add(null, $select_keep_alive->show($config['keep_alive']/60)); 190 } 191 192 if (!isset($no_override['check_all_folders'])) { 193 $field_id = 'rcmfd_check_all_folders'; 194 $input_check_all = new html_checkbox(array('name' => '_check_all_folders', 'id' => $field_id, 'value' => 1)); 195 $table->add('title', html::label($field_id, Q(rcube_label('checkallfolders')))); 196 $table->add(null, $input_check_all->show($config['check_all_folders']?1:0)); 197 } 198 199 $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('mailboxview'))) . $table->show($attrib)); 200 201 $table = new html_table(array('cols' => 2)); 202 203 // show checkbox for HTML/plaintext messages 204 if (!isset($no_override['prefer_html'])) { 205 $field_id = 'rcmfd_htmlmsg'; 206 $input_preferhtml = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1, 207 'onchange' => JS_OBJECT_NAME.'.toggle_prefer_html(this)')); 208 209 $table->add('title', html::label($field_id, Q(rcube_label('preferhtml')))); 210 $table->add(null, $input_preferhtml->show($config['prefer_html']?1:0)); 211 } 212 213 if (!isset($no_override['show_images'])) { 214 $field_id = 'rcmfd_show_images'; 215 $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id)); 216 $input_show_images->add(rcube_label('never'), 0); 217 $input_show_images->add(rcube_label('fromknownsenders'), 1); 218 $input_show_images->add(rcube_label('always'), 2); 219 220 $table->add('title', html::label($field_id, Q(rcube_label('showremoteimages')))); 221 $table->add(null, $input_show_images->show($config['show_images'])); 222 } 223 224 if (!isset($no_override['inline_images'])) { 225 $field_id = 'rcmfd_inline_images'; 226 $input_inline_images = new html_checkbox(array('name' => '_inline_images', 'id' => $field_id, 'value' => 1)); 227 228 $table->add('title', html::label($field_id, Q(rcube_label('showinlineimages')))); 229 $table->add(null, $input_inline_images->show($config['inline_images']?1:0)); 230 } 231 232 $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagesdisplaying'))) . $table->show($attrib)); 233 234 $table = new html_table(array('cols' => 2)); 235 236 // Show checkbox for HTML Editor 237 if (!isset($no_override['htmleditor'])) { 238 $field_id = 'rcmfd_htmleditor'; 239 $input_htmleditor = new html_checkbox(array('name' => '_htmleditor', 'id' => $field_id, 'value' => 1)); 240 241 $table->add('title', html::label($field_id, Q(rcube_label('htmleditor')))); 242 $table->add(null, $input_htmleditor->show($config['htmleditor']?1:0)); 243 } 244 245 if (!isset($no_override['draft_autosave'])) { 246 $field_id = 'rcmfd_autosave'; 247 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => $field_id, 'disabled' => empty($config['drafts_mbox']))); 248 $select_autosave->add(rcube_label('never'), 0); 249 foreach (array(3, 5, 10) as $i => $min) 250 $select_autosave->add(rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min))), $min*60); 251 252 $table->add('title', html::label($field_id, Q(rcube_label('autosavedraft')))); 253 $table->add(null, $select_autosave->show($config['draft_autosave'])); 254 } 255 256 if (!isset($no_override['mime_param_folding'])) { 257 $field_id = 'rcmfd_param_folding'; 258 $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => $field_id)); 259 $select_param_folding->add(rcube_label('2231folding'), 0); 260 $select_param_folding->add(rcube_label('miscfolding'), 1); 261 $select_param_folding->add(rcube_label('2047folding'), 2); 262 263 $table->set_row_attribs('advanced'); 264 $table->add('title', html::label($field_id, Q(rcube_label('mimeparamfolding')))); 265 $table->add(null, $select_param_folding->show($config['mime_param_folding'])); 266 } 267 268 $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagescomposition'))) . $table->show($attrib)); 269 270 // Configure special folders 271 if (!isset($no_override['default_imap_folders'])) { 272 $RCMAIL->imap_init(true); 273 $select = rcmail_mailbox_select(array('noselection' => '---', 'realnames' => true, 'maxlength' => 30)); 274 275 $table = new html_table(array('cols' => 2)); 276 277 if (!isset($no_override['drafts_mbox'])) { 278 $table->add('title', Q(rcube_label('drafts'))); 279 $table->add(null, $select->show($config['drafts_mbox'], array('name' => "_drafts_mbox", 'onchange' => "document.getElementById('rcmfd_autosave').disabled=this.selectedIndex==0"))); 280 } 281 282 if (!isset($no_override['sent_mbox'])) { 283 $table->add('title', Q(rcube_label('sent'))); 284 $table->add(null, $select->show($config['sent_mbox'], array('name' => "_sent_mbox"))); 285 } 286 287 if (!isset($no_override['junk_mbox'])) { 288 $table->add('title', Q(rcube_label('junk'))); 289 $table->add(null, $select->show($config['junk_mbox'], array('name' => "_junk_mbox"))); 290 } 291 292 if (!isset($no_override['trash_mbox'])) { 293 $table->add('title', Q(rcube_label('trash'))); 294 $table->add(null, $select->show($config['trash_mbox'], array('name' => "_trash_mbox"))); 295 } 296 297 $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('specialfolders'))) . $table->show($attrib)); 298 } 299 300 $table = new html_table(array('cols' => 2)); 301 302 if (!isset($no_override['read_when_deleted'])) { 303 $field_id = 'rcmfd_read_deleted'; 304 $input_readdeleted = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1)); 305 306 $table->add('title', html::label($field_id, Q(rcube_label('readwhendeleted')))); 307 $table->add(null, $input_readdeleted->show($config['read_when_deleted']?1:0)); 308 } 309 310 if (!isset($no_override['flag_for_deletion'])) { 311 $field_id = 'rcmfd_flag_for_deletion'; 312 $input_flagfordeletion = new html_checkbox(array('name' => '_flag_for_deletion', 'id' => $field_id, 'value' => 1)); 313 314 $table->add('title', html::label($field_id, Q(rcube_label('flagfordeletion')))); 315 $table->add(null, $input_flagfordeletion->show($config['flag_for_deletion']?1:0)); 316 } 317 318 // don't show deleted messages 319 if (!isset($no_override['skip_deleted'])) { 320 $field_id = 'rcmfd_skip_deleted'; 321 $input_purge = new html_checkbox(array('name' => '_skip_deleted', 'id' => $field_id, 'value' => 1)); 322 323 $table->add('title', html::label($field_id, Q(rcube_label('skipdeleted')))); 324 $table->add(null, $input_purge->show($config['skip_deleted']?1:0)); 325 } 326 327 // Trash purging on logout 328 if (!isset($no_override['logout_purge'])) { 329 $field_id = 'rcmfd_logout_purge'; 330 $input_purge = new html_checkbox(array('name' => '_logout_purge', 'id' => $field_id, 'value' => 1)); 331 332 $table->add('title', html::label($field_id, Q(rcube_label('logoutclear')))); 333 $table->add(null, $input_purge->show($config['logout_purge']?1:0)); 334 } 335 336 // INBOX compacting on logout 337 if (!isset($no_override['logout_expunge'])) { 338 $field_id = 'rcmfd_logout_expunge'; 339 $input_expunge = new html_checkbox(array('name' => '_logout_expunge', 'id' => $field_id, 'value' => 1)); 340 341 $table->add('title', html::label($field_id, Q(rcube_label('logoutcompact')))); 342 $table->add(null, $input_expunge->show($config['logout_expunge']?1:0)); 343 } 344 345 $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('serversettings'))) . $table->show($attrib)); 346 347 return $out . $form_end; 348 } 349 392 393 return $out; 394 } 350 395 351 396 -
trunk/roundcubemail/skins/default/settings.css
r2138 r2164 59 59 } 60 60 61 #userprefs-box fieldset 61 #userprefs-box table td.title 62 { 63 color: #666666; 64 padding-right: 10px; 65 white-space: nowrap; 66 } 67 68 #userprefs-box table tr.advanced 69 { 70 display: none; 71 } 72 73 .userprefs-block 62 74 { 63 75 float: left; 64 76 margin-right: 14px; 65 77 width: 520px; 66 }67 68 #userprefs-box table td.title69 {70 color: #666666;71 padding-right: 10px;72 white-space: nowrap;73 }74 75 #userprefs-box table tr.advanced76 {77 display: none;78 78 } 79 79 -
trunk/roundcubemail/skins/default/templates/settings.html
r2097 r2164 13 13 <roundcube:include file="/includes/settingstabs.html" /> 14 14 15 <form name="form" action="./" method="post"> 16 15 17 <div id="userprefs-box"> 16 18 <div id="userprefs-title"><roundcube:label name="userpreferences" /></div> 17 19 18 20 <div style="padding:15px 0 15px 15px"> 19 <roundcube:object name="userprefs"> 21 <div class="userprefs-block"> 22 <roundcube:object name="userprefs" form="form" parts="general,mailbox,mailview" /> 23 </div> 24 <div class="userprefs-block"> 25 <roundcube:object name="userprefs" form="form" parts="compose,folders,server" /> 26 </div> 20 27 <div style="clear:left"></div> 21 28 </div> … … 26 33 </p> 27 34 35 </form> 36 28 37 <div class="advswitch"> 29 38 <label for="advswitch"><roundcube:label name="advancedoptions"></label>
Note: See TracChangeset
for help on using the changeset viewer.
