Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/09/2011 09:04:11 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Introduce topic and reply revisions, complete with optional logging and reason for editing. Props GautamGupta via Google Code-in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/form-bbp_reply.php

    r2780 r2782  
    4242
    4343                        <p class="form-allowed-tags">
    44                             <?php printf( __( '<label>You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:</label> %s','bbpress' ), '<code>' . bbp_allowed_tags() . '</code>' ); ?>
     44                            <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
     45                            <code><?php bbp_allowed_tags(); ?></code>
    4546                        </p>
    4647
     48                       
    4749                        <?php if ( !bbp_is_reply_edit() ) : ?>
    4850
     
    5355
    5456                        <?php endif; ?>
     57                       
    5558
    5659                        <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) ) ) : ?>
     
    5861                            <p>
    5962                                <?php if ( bbp_is_reply_edit() && $post->post_author != bbp_get_current_user_id() ) : ?>
    60 
    6163                                    <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( $post->post_author, bbp_get_reply_topic_id() ) ); ?> tabindex="12" />
    6264                                    <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
    6365
    6466                                <?php else : ?>
    65 
    6667                                    <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( bbp_get_user_id( 0, false, true ), bbp_get_reply_topic_id() ) ); ?> tabindex="12" />
    6768                                    <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
     
    7273                        <?php endif; ?>
    7374
     75                        <?php if ( bbp_is_reply_edit() ) : ?>
     76
     77                            <fieldset>
     78                                <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
     79                                <div>
     80                                    <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" checked="checked" tabindex="14" />
     81                                    <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />                                                                         
     82                                </div>
     83
     84                                <div>                                   
     85                                    <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
     86                                    <input type="text" value="" tabindex="16" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />
     87                                </div>
     88                            </fieldset>
     89                           
     90                        <?php endif; ?>
     91
    7492                        <p id="bbp_reply_submit_container">
    75                             <button type="submit" tabindex="14" id="bbp_reply_submit" name="bbp_reply_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
     93                            <button type="submit" tabindex="18" id="bbp_reply_submit" name="bbp_reply_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
    7694                        </p>
    7795                    </div>
Note: See TracChangeset for help on using the changeset viewer.