Changeset 15570


Ignore:
Timestamp:
Jun 5, 2012, 9:51:54 PM (12 years ago)
Author:
mistic100
Message:

bug:2645 author field is kept when comment not validated

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/picture_comment.inc.php

    r13865 r15570  
    241241  {
    242242    $key = get_ephemeral_key(3, $page['image_id']);
    243     $content = '';
     243    $content = $author = '';
    244244    if ('reject'===@$comment_action)
    245245    {
    246246      $content = htmlspecialchars( stripslashes($comm['content']) );
     247      $author = htmlspecialchars( stripslashes($comm['author']) );
    247248    }
    248249    $template->assign('comment_add',
     
    251252          'KEY' => $key,
    252253          'CONTENT' => $content,
    253           'SHOW_AUTHOR' => !is_classic_user()
     254          'SHOW_AUTHOR' => !is_classic_user(),
     255          'AUTHOR' => $author ,
    254256        ));
    255257  }
  • trunk/themes/default/template/picture.tpl

    r15551 r15570  
    348348                        <form method="post" action="{$comment_add.F_ACTION}" id="addComment">
    349349                                {if $comment_add.SHOW_AUTHOR}
    350                                         <p><label>{'Author'|@translate} :</label></p>
    351                                         <p><input type="text" name="author"></p>
    352                                         <p><label>{'Comment'|@translate} :</label></p>
     350                                        <p><label for="author">{'Author'|@translate} :</label></p>
     351                                        <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p>
     352                                        <p><label for="contentid">{'Comment'|@translate} :</label></p>
    353353                                {/if}
    354354                                <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p>
Note: See TracChangeset for help on using the changeset viewer.