Skip to:
Content

bbPress.org

Changeset 4306


Ignore:
Timestamp:
11/02/2012 07:54:51 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Capabilities:

  • Update bbp-default templates to support new roles UI.
  • See #1939.
Location:
trunk/templates/bbp-default/bbpress
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/bbp-default/bbpress/form-user-edit.php

    r4275 r4306  
    151151
    152152                <div>
    153                     <label for="super_admin"><?php _e( 'Super Admin', 'bbpress' ); ?></label>
     153                    <label for="super_admin"><?php _e( 'Network Role', 'bbpress' ); ?></label>
    154154                    <label>
    155155                        <input class="checkbox" type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> tabindex="<?php bbp_tab_index(); ?>" />
     
    160160            <?php endif; ?>
    161161
    162             <div>
    163                 <label for="role"><?php _e( 'Role', 'bbpress' ) ?></label>
     162            <?php if ( bbp_use_advanced_capability_editor() ) : ?>
    164163
    165                 <?php bbp_edit_user_role(); ?>
     164                <?php bbp_get_template_part( 'form', 'user-capabilities' ); ?>
    166165
    167             </div>
     166            <?php else : ?>
    168167
    169             <div>
    170                 <label for=""><?php _e( 'Forum Capabilities', 'bbpress' ); ?></label>
     168                <?php bbp_get_template_part( 'form', 'user-roles' ); ?>
    171169
    172                 <fieldset class="bbp-form capabilities">
    173                     <legend><?php _e( 'Forum Capabilities', 'bbpress' ); ?></legend>
    174 
    175                     <?php foreach ( bbp_get_capability_groups() as $group ) : ?>
    176 
    177                         <dl class="bbp-user-capabilities">
    178                             <dt><?php bbp_capability_group_title( $group ); ?></dt>
    179 
    180                             <?php foreach ( bbp_get_capabilities_for_group( $group ) as $capability ) : ?>
    181 
    182                                 <dd>
    183                                     <label for="_bbp_<?php echo $capability; ?>">
    184                                         <input class="checkbox" type="checkbox" id="_bbp_<?php echo $capability; ?>" name="_bbp_<?php echo $capability; ?>" value="1" <?php checked( user_can( bbp_get_displayed_user_id(), $capability ) ); ?> tabindex="<?php bbp_tab_index(); ?>" />
    185                                         <?php bbp_capability_title( $capability ); ?>
    186                                     </label>
    187                                 </dd>
    188 
    189                             <?php endforeach; ?>
    190 
    191                         </dl>
    192 
    193                     <?php endforeach; ?>
    194                 </fieldset>
    195             </div>
    196            
    197             <div>
    198                 <label for="bbp-default-caps"><?php _e( 'Reset', 'bbpress' ); ?></label>
    199                 <label>
    200                     <input class="checkbox" type="checkbox" id="bbp-default-caps" name="bbp-default-caps" tabindex="<?php bbp_tab_index(); ?>" />
    201                     <?php _e( 'Reset forum capabilities to match the user role.', 'bbpress' ); ?>
    202                 </label>
    203             </div>
     170            <?php endif; ?>
    204171
    205172        </fieldset>
Note: See TracChangeset for help on using the changeset viewer.