/templates/default/bbpress/form-user-edit.php

  1. <?php 
  2.  
  3. /** 
  4. * bbPress User Profile Edit Part 
  5. * 
  6. * @package bbPress 
  7. * @subpackage Theme 
  8. */ 
  9.  
  10. ?> 
  11.  
  12. <form id="bbp-your-profile" action="<?php bbp_user_profile_edit_url( bbp_get_displayed_user_id() ); ?>" method="post" enctype="multipart/form-data"> 
  13.  
  14. <h2 class="entry-title"><?php _e( 'Name', 'bbpress' ) ?></h2> 
  15.  
  16. <?php do_action( 'bbp_user_edit_before' ); ?> 
  17.  
  18. <fieldset class="bbp-form"> 
  19. <legend><?php _e( 'Name', 'bbpress' ) ?></legend> 
  20.  
  21. <?php do_action( 'bbp_user_edit_before_name' ); ?> 
  22.  
  23. <div> 
  24. <label for="first_name"><?php _e( 'First Name', 'bbpress' ) ?></label> 
  25. <input type="text" name="first_name" id="first_name" value="<?php bbp_displayed_user_field( 'first_name', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" /> 
  26. </div> 
  27.  
  28. <div> 
  29. <label for="last_name"><?php _e( 'Last Name', 'bbpress' ) ?></label> 
  30. <input type="text" name="last_name" id="last_name" value="<?php bbp_displayed_user_field( 'last_name', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" /> 
  31. </div> 
  32.  
  33. <div> 
  34. <label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label> 
  35. <input type="text" name="nickname" id="nickname" value="<?php bbp_displayed_user_field( 'nickname', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" /> 
  36. </div> 
  37.  
  38. <div> 
  39. <label for="display_name"><?php _e( 'Display Name', 'bbpress' ) ?></label> 
  40.  
  41. <?php bbp_edit_user_display_name(); ?> 
  42.  
  43. </div> 
  44.  
  45. <?php do_action( 'bbp_user_edit_after_name' ); ?> 
  46.  
  47. </fieldset> 
  48.  
  49. <h2 class="entry-title"><?php _e( 'Contact Info', 'bbpress' ) ?></h2> 
  50.  
  51. <fieldset class="bbp-form"> 
  52. <legend><?php _e( 'Contact Info', 'bbpress' ) ?></legend> 
  53.  
  54. <?php do_action( 'bbp_user_edit_before_contact' ); ?> 
  55.  
  56. <div> 
  57. <label for="url"><?php _e( 'Website', 'bbpress' ) ?></label> 
  58. <input type="text" name="url" id="url" value="<?php bbp_displayed_user_field( 'user_url', 'edit' ); ?>" class="regular-text code" tabindex="<?php bbp_tab_index(); ?>" /> 
  59. </div> 
  60.  
  61. <?php foreach ( bbp_edit_user_contact_methods() as $name => $desc ) : ?> 
  62.  
  63. <div> 
  64. <label for="<?php echo esc_attr( $name ); ?>"><?php echo apply_filters( 'user_' . $name . '_label', $desc ); ?></label> 
  65. <input type="text" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" value="<?php bbp_displayed_user_field( $name, 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" /> 
  66. </div> 
  67.  
  68. <?php endforeach; ?> 
  69.  
  70. <?php do_action( 'bbp_user_edit_after_contact' ); ?> 
  71.  
  72. </fieldset> 
  73.  
  74. <h2 class="entry-title"><?php bbp_is_user_home_edit() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></h2> 
  75.  
  76. <fieldset class="bbp-form"> 
  77. <legend><?php bbp_is_user_home_edit() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></legend> 
  78.  
  79. <?php do_action( 'bbp_user_edit_before_about' ); ?> 
  80.  
  81. <div> 
  82. <label for="description"><?php _e( 'Biographical Info', 'bbpress' ); ?></label> 
  83. <textarea name="description" id="description" rows="5" cols="30" tabindex="<?php bbp_tab_index(); ?>"><?php bbp_displayed_user_field( 'description', 'edit' ); ?></textarea> 
  84. </div> 
  85.  
  86. <?php do_action( 'bbp_user_edit_after_about' ); ?> 
  87.  
  88. </fieldset> 
  89.  
  90. <h2 class="entry-title"><?php _e( 'Account', 'bbpress' ) ?></h2> 
  91.  
  92. <fieldset class="bbp-form"> 
  93. <legend><?php _e( 'Account', 'bbpress' ) ?></legend> 
  94.  
  95. <?php do_action( 'bbp_user_edit_before_account' ); ?> 
  96.  
  97. <div> 
  98. <label for="user_login"><?php _e( 'Username', 'bbpress' ); ?></label> 
  99. <input type="text" name="user_login" id="user_login" value="<?php bbp_displayed_user_field( 'user_login', 'edit' ); ?>" disabled="disabled" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" /> 
  100. </div> 
  101.  
  102. <div> 
  103. <label for="email"><?php _e( 'Email', 'bbpress' ); ?></label> 
  104.  
  105. <input type="text" name="email" id="email" value="<?php bbp_displayed_user_field( 'user_email', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" /> 
  106.  
  107. <?php 
  108.  
  109. // Handle address change requests 
  110. $new_email = get_option( bbp_get_displayed_user_id() . '_new_email' ); 
  111. if ( !empty( $new_email ) && $new_email !== bbp_get_displayed_user_field( 'user_email', 'edit' ) ) : ?> 
  112.  
  113. <span class="updated inline"> 
  114.  
  115. <?php printf( __( 'There is a pending email address change to <code>%1$s</code>. <a href="%2$s">Cancel</a>', 'bbpress' ), $new_email['newemail'], esc_url( self_admin_url( 'user.php?dismiss=' . bbp_get_current_user_id() . '_new_email' ) ) ); ?> 
  116.  
  117. </span> 
  118.  
  119. <?php endif; ?> 
  120.  
  121. </div> 
  122.  
  123. <div id="password"> 
  124. <label for="pass1"><?php _e( 'New Password', 'bbpress' ); ?></label> 
  125. <fieldset class="bbp-form password"> 
  126. <input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" tabindex="<?php bbp_tab_index(); ?>" /> 
  127. <span class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span> 
  128.  
  129. <input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" tabindex="<?php bbp_tab_index(); ?>" /> 
  130. <span class="description"><?php _e( 'Type your new password again.', 'bbpress' ); ?></span><br /> 
  131.  
  132. <div id="pass-strength-result"></div> 
  133. <span class="description indicator-hint"><?php _e( 'Your password should be at least ten characters long. Use upper and lower case letters, numbers, and symbols to make it even stronger.', 'bbpress' ); ?></span> 
  134. </fieldset> 
  135. </div> 
  136.  
  137. <?php do_action( 'bbp_user_edit_after_account' ); ?> 
  138.  
  139. </fieldset> 
  140.  
  141. <?php if ( current_user_can( 'edit_users' ) && ! bbp_is_user_home_edit() ) : ?> 
  142.  
  143. <h2 class="entry-title"><?php _e( 'User Role', 'bbpress' ) ?></h2> 
  144.  
  145. <fieldset class="bbp-form"> 
  146. <legend><?php _e( 'User Role', 'bbpress' ); ?></legend> 
  147.  
  148. <?php do_action( 'bbp_user_edit_before_role' ); ?> 
  149.  
  150. <?php if ( is_multisite() && is_super_admin() && current_user_can( 'manage_network_options' ) ) : ?> 
  151.  
  152. <div> 
  153. <label for="super_admin"><?php _e( 'Network Role', 'bbpress' ); ?></label> 
  154. <label> 
  155. <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(); ?>" /> 
  156. <?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?> 
  157. </label> 
  158. </div> 
  159.  
  160. <?php endif; ?> 
  161.  
  162. <?php bbp_get_template_part( 'form', 'user-roles' ); ?> 
  163.  
  164. <?php do_action( 'bbp_user_edit_after_role' ); ?> 
  165.  
  166. </fieldset> 
  167.  
  168. <?php endif; ?> 
  169.  
  170. <?php do_action( 'bbp_user_edit_after' ); ?> 
  171.  
  172. <fieldset class="submit"> 
  173. <legend><?php _e( 'Save Changes', 'bbpress' ); ?></legend> 
  174. <div> 
  175.  
  176. <?php bbp_edit_user_form_fields(); ?> 
  177.  
  178. <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home_edit() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?></button> 
  179. </div> 
  180. </fieldset> 
  181.  
  182. </form> 
.