Changeset 3330:cd9381e6be7b for admin/preferences.php
- Timestamp:
- 08/30/16 16:21:38 (9 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/preferences.php
r3265 r3330 98 98 # Language codes 99 99 $lang_combo = dcAdminCombos::getAdminLangsCombo(); 100 101 # Get 3rd parts xhtml editor flags 102 $rte = array( 103 'blog_descr' => array(true,__('Blog description (in blog parameters)')), 104 'cat_descr' => array(true,__('Category description')) 105 ); 106 $rte = new ArrayObject($rte); 107 $core->callBehavior('adminRteFlags',$core,$rte); 108 # Load user settings 109 $rte_flags = @$core->auth->user_prefs->interface->rte_flags; 110 if (is_array($rte_flags)) { 111 foreach ($rte_flags as $fk => $fv) { 112 if (isset($rte[$fk])) { 113 $rte[$fk][0] = $fv; 114 } 115 } 116 } 100 117 101 118 # Get default colums (admin lists) … … 233 250 } 234 251 $core->auth->user_prefs->interface->put('cols',$cu,'array'); 252 253 # Update user xhtml editor flags 254 $rf = array(); 255 foreach ($rte as $rk => $rv) { 256 $rf[$rk] = isset($_POST['rte_flags']) && in_array($rk,$_POST['rte_flags'],true) ? true : false; 257 } 258 $core->auth->user_prefs->interface->put('rte_flags',$rf,'array'); 235 259 236 260 # Update user … … 501 525 '<div class="fieldset">'. 502 526 '<h4>'.__('Optional columns displayed in lists').'</h4>'; 527 $odd = true; 503 528 foreach ($cols as $col_type => $col_list) { 529 echo '<div class="two-boxes '.($odd ? 'odd' : 'even').'">'; 504 530 echo '<h5>'.$col_list[0].'</h5>'; 505 531 foreach ($col_list[1] as $col_name => $col_data) { 506 532 echo 507 '<p><label for="cols_'.$col_type.'- "'.$col_name.'" class="classic">'.533 '<p><label for="cols_'.$col_type.'-'.$col_name.'" class="classic">'. 508 534 form::checkbox(array('cols_'.$col_type.'[]','cols_'.$col_type.'-'.$col_name),$col_name,$col_data[0]).$col_data[1].'</label>'; 509 535 } 536 echo '</div>'; 537 $odd = !$odd; 510 538 } 511 539 echo '</div>'; … … 515 543 '<h4>'.__('Edition').'</h4>'; 516 544 545 echo '<div class="two-boxes odd">'; 517 546 foreach ($format_by_editors as $format => $editors) { 518 547 echo … … 544 573 545 574 '</div>'; 575 576 echo '<div class="two-boxes even">'; 577 echo '<h5>'.__('Use xhtml editor for:').'</h5>'; 578 foreach ($rte as $rk => $rv) { 579 echo 580 '<p><label for="rte_'.$rk.'" class="classic">'. 581 form::checkbox(array('rte_flags[]','rte_'.$rk),$rk,$rv[0]).$rv[1].'</label>'; 582 } 583 echo '</div>'; 584 585 echo '</div>'; // fieldset 546 586 547 587 echo
Note: See TracChangeset
for help on using the changeset viewer.