Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/17/2011 05:26:05 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Normalize bbp-twentyten theme files. Introduce bbp_tab_index functions for forms. Rename some page- files to action- since they are not page templates. Introduce bbp_login and bbp_register place-holders in bbp-twentyten theme.

File:
1 edited

Legend:

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

    r2784 r2810  
    11<?php
     2
    23/**
    3  * New/edit bbPress topic forum
     4 * New/Edit Topic
    45 *
    56 * @package bbPress
    6  * @subpackage Themes
     7 * @subpackage Theme
    78 */
     9
    810?>
     11
    912<?php if ( ( bbp_is_topic_edit() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) || current_user_can( 'publish_topics' ) || bbp_allow_anonymous() ) : ?>
    1013
     
    4851                        <p>
    4952                            <label for="bbp_topic_title"><?php _e( 'Title:', 'bbpress' ); ?></label><br />
    50                             <input type="text" id="bbp_topic_title" value="<?php echo ( bbp_is_topic_edit() && !empty( $post->post_title ) ) ? $post->post_title : ''; ?>" tabindex="8" size="40" name="bbp_topic_title" />
     53                            <input type="text" id="bbp_topic_title" value="<?php echo ( bbp_is_topic_edit() && !empty( $post->post_title ) ) ? $post->post_title : ''; ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" />
    5154                        </p>
    5255
    5356                        <p>
    5457                            <label for="bbp_topic_content"><?php _e( 'Topic:', 'bbpress' ); ?></label><br />
    55                             <textarea id="bbp_topic_content" tabindex="10" name="bbp_topic_content" cols="52" rows="6"><?php echo ( bbp_is_topic_edit() && !empty( $post->post_content ) ) ? $post->post_content : ''; ?></textarea>
     58                            <textarea id="bbp_topic_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_topic_content" cols="52" rows="6"><?php echo ( bbp_is_topic_edit() && !empty( $post->post_content ) ) ? $post->post_content : ''; ?></textarea>
    5659                        </p>
    5760
     
    6568                            <p>
    6669                                <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
    67                                 <input type="text" value="" tabindex="12" size="40" name="bbp_topic_tags" id="bbp_topic_tags" />
     70                                <input type="text" value="" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" />
    6871                            </p>
    6972
     
    7477                            <p>
    7578                                <label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
    76                                 <?php bbp_dropdown( array( 'tab' => 14, 'selected' => bbp_is_topic_edit() ? bbp_get_topic_forum_id() : 0 ) ); ?>
     79                                <?php bbp_dropdown( array( 'selected' => bbp_is_topic_edit() ? bbp_get_topic_forum_id() : 0 ) ); ?>
    7780                            </p>
    7881
     
    8588                                <label for="bbp_stick_topic"><?php _e( 'Topic Type:', 'bbpress' ); ?></label><br />
    8689
    87                                 <?php bbp_topic_type_select( array( 'tab' => 16 ) ); ?>
     90                                <?php bbp_topic_type_select(); ?>
    8891
    8992                            </p>
     
    9699                                <?php if ( bbp_is_topic_edit() && $post->post_author != bbp_get_current_user_id() ) : ?>
    97100
    98                                     <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( $post->post_author ) ); ?> tabindex="18" />
     101                                    <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( $post->post_author ) ); ?> tabindex="<?php bbp_tab_index(); ?>" />
    99102                                    <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
    100103
    101104                                <?php else : ?>
    102105
    103                                     <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 ) ) ); ?> tabindex="18" />
     106                                    <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 ) ) ); ?> tabindex="<?php bbp_tab_index(); ?>" />
    104107                                    <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
    105108
     
    114117                                <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
    115118                                <div>
    116                                     <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" checked="checked" tabindex="20" />
     119                                    <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
    117120                                    <label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
    118121                                </div>
     
    120123                                <div>
    121124                                    <label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
    122                                     <input type="text" value="" tabindex="22" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
     125                                    <input type="text" value="" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
    123126                                </div>
    124127                            </fieldset>
     
    127130
    128131                        <p id="bbp_topic_submit_container">
    129                             <button type="submit" tabindex="24" id="bbp_topic_submit" name="bbp_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
     132                            <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
    130133                        </p>
    131134                    </div>
Note: See TracChangeset for help on using the changeset viewer.