Dotclear

Changeset 2776:75004db1c37c


Ignore:
Timestamp:
11/10/14 16:31:35 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Comment mandatory preview before submit may be disabled, using new <tpl:IfCommentPreviewOptional> instead of <tpl:IfCommentPreview> for displaying submit button. Applied only in currywurst templateset in order to insure backward compatibility. Fixes #1963

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_pref.php

    r2720 r2776  
    231231          $blog_settings->system->put('comments_nofollow',!empty($_POST['comments_nofollow'])); 
    232232          $blog_settings->system->put('wiki_comments',!empty($_POST['wiki_comments'])); 
     233          $blog_settings->system->put('comment_preview_optional',!empty($_POST['comment_preview_optional'])); 
    233234          $blog_settings->system->put('enable_xmlrpc',!empty($_POST['enable_xmlrpc'])); 
    234235          $blog_settings->system->put('note_title_tag',$_POST['note_title_tag']); 
     
    473474     form::checkbox('wiki_comments','1',$blog_settings->system->wiki_comments). 
    474475     __('Wiki syntax for comments').'</label></p>'. 
     476     '<p><label for="comment_preview_optional" class="classic">'. 
     477     form::checkbox('comment_preview_optional','1',$blog_settings->system->comment_preview_optional). 
     478     __('Preview of comment before submit is not mandatory').'</label></p>'. 
    475479     '</div>'. 
    476480 
  • inc/public/class.dc.template.php

    r2774 r2776  
    118118          # Comment preview 
    119119          $this->addBlock('IfCommentPreview',array($this,'IfCommentPreview')); 
     120          $this->addBlock('IfCommentPreviewOptional',array($this,'IfCommentPreviewOptional')); 
    120121          $this->addValue('CommentPreviewName',array($this,'CommentPreviewName')); 
    121122          $this->addValue('CommentPreviewEmail',array($this,'CommentPreviewEmail')); 
     
    24092410     /* Comment preview -------------------------------- */ 
    24102411     /*dtd 
     2412     <!ELEMENT tpl:IfCommentPreviewOptional - - -- Container displayed if comment preview is optional or currently previewed --> 
     2413     */ 
     2414     public function IfCommentPreviewOptional($attr,$content) 
     2415     { 
     2416          return 
     2417          '<?php if ($core->blog->settings->system->comment_preview_optional || ($_ctx->comment_preview !== null && $_ctx->comment_preview["preview"])) : ?>'. 
     2418          $content. 
     2419          '<?php endif; ?>'; 
     2420     } 
     2421 
     2422     /*dtd 
    24112423     <!ELEMENT tpl:IfCommentPreview - - -- Container displayed if comment is being previewed --> 
    24122424     */ 
  • inc/public/default-templates/currywurst/_simple-entry.html

    r2641 r2776  
    164164               <p class="buttons"> 
    165165                    <button type="submit" class="preview" name="preview" value="{{tpl:lang Preview}}">{{tpl:lang Preview}}</button> 
    166                   <tpl:IfCommentPreview> 
     166                  <tpl:IfCommentPreviewOptional> 
    167167                    <button type="submit" class="submit" value="{{tpl:lang Send}}">{{tpl:lang Send}}</button> 
    168                   </tpl:IfCommentPreview> 
     168                  </tpl:IfCommentPreviewOptional> 
    169169               </p> 
    170170     </form> 
  • locales/fr/main.po

    r2736 r2776  
    364364msgstr "Syntaxe wiki pour les commentaires" 
    365365 
     366msgid "Preview of comment before submit is not mandatory" 
     367msgstr "La prévisualisation des commentaires est optionnelle avant leur envoi" 
     368 
    366369msgid "Accept trackbacks" 
    367370msgstr "Accepter les rétroliens" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map