Changeset 2694:1873a0e11790
- Timestamp:
- 04/05/14 14:46:47 (11 years ago)
- Branch:
- default
- Children:
- 2700:4ded6c327e04, 3280:d258c9f4317b
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r2682 r2694 73 73 $TB = new dcTrackback($core); 74 74 $tb_urls = $tb_excerpt = ''; 75 76 if (count($formaters_combo)==0 || !$core->auth->getOption('editor') || $core->auth->getOption('editor')=='') { 77 dcPage::addNotice("message", 78 sprintf(__('Choose an active editor in %s.'), 79 '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 80 ) 81 ); 82 } 75 83 76 84 # Get entry informations … … 449 457 if ($can_edit_post) 450 458 { 451 if (count($formaters_combo)>0 ) {459 if (count($formaters_combo)>0 && ($core->auth->getOption('editor') && $core->auth->getOption('editor')!='')) { 452 460 $post_format_field = form::combo('post_format',$formaters_combo,$post_format,'maximal'); 453 461 } else { 454 $post_format_field = '<a href="preferences.php#user-options">'.__('Choose an activated editor').'</a>'; 462 $post_format_field = sprintf(__('Choose an active editor in %s.'), 463 '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 464 ); 455 465 } 456 466 -
admin/preferences.php
r2682 r2694 67 67 # Formaters combo 68 68 $formaters_combo = dcAdminCombos::getFormatersCombo(); 69 $formaters_combo_editor = array(); 69 70 70 71 if (!empty($user_options['editor']) && !empty($formaters_combo[$user_options['editor']])) { … … 436 437 437 438 echo 438 '<form action="preferences.php " method="post" id="opts-forms">'.439 '<form action="preferences.php#user-options" method="post" id="opts-forms">'. 439 440 '<h3>'.__('My options').'</h3>'; 440 441 … … 468 469 '</div>'; 469 470 470 // hide editor selector if less than 2 editors471 if (count($editors)<2) {472 $editor_class = ' hidden';473 } else {474 $editor_class = '';475 }476 477 471 echo 478 472 '<div class="fieldset">'. 479 473 '<h4>'.__('Edition').'</h4>'. 480 474 481 '<p class="field '.$editor_class.'"><label for="user_editor">'.__('Preferred editor:').'</label>'.482 form::combo('user_editor', $editors_combo,$user_options['editor']).'</p>'.475 '<p class="field"><label for="user_editor">'.__('Preferred editor:').'</label>'. 476 form::combo('user_editor',array_merge(array(__('Choose an editor') => ''),$editors_combo),$user_options['editor']).'</p>'. 483 477 484 478 '<p class="field"><label for="user_post_format">'.__('Preferred format:').'</label>'. 485 form::combo('user_post_format', $formaters_combo_editor,$user_options['post_format']).'</p>'.479 form::combo('user_post_format',array_merge(array('' => ''), $formaters_combo_editor),$user_options['post_format']).'</p>'. 486 480 487 481 '<p class="field"><label for="user_post_status">'.__('Default entry status:').'</label>'. -
locales/fr/main.po
r2679 r2694 3664 3664 msgstr "L'erreur suivante a été rencontrée lors de la tentative d'accès à la base de données :" 3665 3665 3666 msgid "Choose an active editor in %s." 3667 msgstr "Choisissez un éditeur dans %s." 3668 3669 msgid "your preferences" 3670 msgstr "vos préférences" 3671 3666 3672 #~ msgid "You don't have permissions to deactivate this plugin." 3667 3673 #~ msgstr "Vous n'avez pas les permissions pour désactiver ce plugin." -
plugins/pages/page.php
r2666 r2694 18 18 $post_dt = ''; 19 19 $post_format = $core->auth->getOption('post_format'); 20 $editor = $core->auth->getOption('editor'); 20 21 $post_password = ''; 21 22 $post_url = ''; … … 58 59 59 60 # Formaters combo 60 $formaters_combo = dcAdminCombos::getFormatersCombo( );61 $formaters_combo = dcAdminCombos::getFormatersCombo($editor); 61 62 62 63 # Languages combo … … 64 65 $lang_combo = dcAdminCombos::getLangsCombo($rs,true); 65 66 66 67 67 # Validation flag 68 68 $bad_dt = false; 69 70 if (count($formaters_combo)==0 || !$core->auth->getOption('editor') || $core->auth->getOption('editor')=='') { 71 dcPage::addNotice("message", 72 sprintf(__('Choose an active editor in %s.'), 73 '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 74 ) 75 ); 76 77 } 69 78 70 79 # Get page informations
Note: See TracChangeset
for help on using the changeset viewer.