/bp-forums/bbpress/bb-templates/kakumei/register.php

  1. <?php bb_get_header(); ?> 
  2.  
  3. <div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Register'); ?></div> 
  4.  
  5. <h2 id="register" role="main"><?php _e('Registration'); ?></h2> 
  6.  
  7. <?php if ( !bb_is_user_logged_in() ) : ?> 
  8.  
  9. <form method="post" action="<?php bb_uri('register.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_USER_FORMS); ?>"> 
  10.  
  11. <fieldset> 
  12. <legend><?php _e('Profile Information'); ?></legend> 
  13.  
  14. <p><?php _e("Your password will be emailed to the address you provide."); ?></p> 
  15.  
  16. <?php 
  17.  
  18. $user_login_error = $bb_register_error->get_error_message( 'user_login' ); 
  19.  
  20. ?> 
  21.  
  22. <table width="100%"> 
  23. <tr class="form-field form-required required<?php if ( $user_login_error ) echo ' form-invalid error'; ?>"> 
  24. <th scope="row"> 
  25. <label for="user_login"><?php _e('Username'); ?></label> 
  26. <?php if ( $user_login_error ) echo "<em>$user_login_error</em>"; ?> 
  27. </th> 
  28. <td> 
  29. <input name="user_login" type="text" id="user_login" size="30" maxlength="30" value="<?php echo $user_login; ?>" /> 
  30. </td> 
  31. </tr> 
  32.  
  33. <?php 
  34.  
  35. if ( is_array($profile_info_keys) ) : 
  36. foreach ( $profile_info_keys as $key => $label ) : 
  37. $class = 'form-field'; 
  38. if ( $label[0] ) { 
  39. $class .= ' form-required required'; 
  40. if ( $profile_info_key_error = $bb_register_error->get_error_message( $key ) ) 
  41. $class .= ' form-invalid error'; 
  42.  
  43. ?> 
  44.  
  45. <tr class="<?php echo $class; ?>"> 
  46. <th scope="row"> 
  47. <label for="<?php echo $key; ?>"><?php echo $label[1]; ?></label> 
  48. <?php if ( $profile_info_key_error ) echo "<em>$profile_info_key_error</em>"; ?> 
  49. </th> 
  50. <td> 
  51. <input name="<?php echo $key; ?>" type="text" id="<?php echo $key; ?>" size="30" maxlength="140" value="<?php echo $$key; ?>" /> 
  52. </td> 
  53. </tr> 
  54.  
  55. <?php 
  56.  
  57. endforeach; // profile_info_keys 
  58. endif; // profile_info_keys 
  59.  
  60. ?> 
  61.  
  62. </table> 
  63.  
  64. <p class="required-message"><?php _e('These items are <span class="required">required</span>.') ?></p> 
  65.  
  66. </fieldset> 
  67.  
  68. <?php do_action('extra_profile_info', $user); ?> 
  69.  
  70. <p class="submit"> 
  71. <input type="submit" name="Submit" value="<?php echo esc_attr__( 'Register »' ); ?>" /> 
  72. </p> 
  73.  
  74. </form> 
  75.  
  76. <?php else : ?> 
  77.  
  78. <p><?php _e('You’re already logged in, why do you need to register?'); ?></p> 
  79.  
  80. <?php endif; ?> 
  81.  
  82. <?php bb_get_footer(); ?> 
.