/bp-themes/bp-default/registration/register.php

  1. <?php get_header( 'buddypress' ); ?> 
  2.  
  3. <div id="content"> 
  4. <div class="padder"> 
  5.  
  6. <?php do_action( 'bp_before_register_page' ); ?> 
  7.  
  8. <div class="page" id="register-page"> 
  9.  
  10. <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data"> 
  11.  
  12. <?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?> 
  13. <?php do_action( 'template_notices' ); ?> 
  14. <?php do_action( 'bp_before_registration_disabled' ); ?> 
  15.  
  16. <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p> 
  17.  
  18. <?php do_action( 'bp_after_registration_disabled' ); ?> 
  19. <?php endif; // registration-disabled signup setp ?> 
  20.  
  21. <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?> 
  22.  
  23. <h2><?php _e( 'Create an Account', 'buddypress' ); ?></h2> 
  24.  
  25. <?php do_action( 'template_notices' ); ?> 
  26.  
  27. <p><?php _e( 'Registering for this site is easy, just fill in the fields below and we\'ll get a new account set up for you in no time.', 'buddypress' ); ?></p> 
  28.  
  29. <?php do_action( 'bp_before_account_details_fields' ); ?> 
  30.  
  31. <div class="register-section" id="basic-details-section"> 
  32.  
  33. <?php /***** Basic Account Details ******/ ?> 
  34.  
  35. <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4> 
  36.  
  37. <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  38. <?php do_action( 'bp_signup_username_errors' ); ?> 
  39. <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" /> 
  40.  
  41. <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  42. <?php do_action( 'bp_signup_email_errors' ); ?> 
  43. <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" /> 
  44.  
  45. <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  46. <?php do_action( 'bp_signup_password_errors' ); ?> 
  47. <input type="password" name="signup_password" id="signup_password" value="" /> 
  48.  
  49. <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  50. <?php do_action( 'bp_signup_password_confirm_errors' ); ?> 
  51. <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" /> 
  52.  
  53. <?php do_action( 'bp_account_details_fields' ); ?> 
  54.  
  55. </div><!-- #basic-details-section --> 
  56.  
  57. <?php do_action( 'bp_after_account_details_fields' ); ?> 
  58.  
  59. <?php /***** Extra Profile Details ******/ ?> 
  60.  
  61. <?php if ( bp_is_active( 'xprofile' ) ) : ?> 
  62.  
  63. <?php do_action( 'bp_before_signup_profile_fields' ); ?> 
  64.  
  65. <div class="register-section" id="profile-details-section"> 
  66.  
  67. <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4> 
  68.  
  69. <?php /** Use the profile field loop to render input fields for the 'base' profile field group */ ?> 
  70. <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> 
  71.  
  72. <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> 
  73.  
  74. <div class="editfield"> 
  75.  
  76. <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?> 
  77.  
  78. <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 
  79. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  80. <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" /> 
  81.  
  82. <?php endif; ?> 
  83.  
  84. <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> 
  85.  
  86. <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 
  87. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  88. <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea> 
  89.  
  90. <?php endif; ?> 
  91.  
  92. <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?> 
  93.  
  94. <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 
  95. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  96. <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"> 
  97. <?php bp_the_profile_field_options(); ?> 
  98. </select> 
  99.  
  100. <?php endif; ?> 
  101.  
  102. <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?> 
  103.  
  104. <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 
  105. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  106. <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple"> 
  107. <?php bp_the_profile_field_options(); ?> 
  108. </select> 
  109.  
  110. <?php endif; ?> 
  111.  
  112. <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?> 
  113.  
  114. <div class="radio"> 
  115. <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span> 
  116.  
  117. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  118. <?php bp_the_profile_field_options(); ?> 
  119.  
  120. <?php if ( !bp_get_the_profile_field_is_required() ) : ?> 
  121. <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a> 
  122. <?php endif; ?> 
  123. </div> 
  124.  
  125. <?php endif; ?> 
  126.  
  127. <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?> 
  128.  
  129. <div class="checkbox"> 
  130. <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span> 
  131.  
  132. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  133. <?php bp_the_profile_field_options(); ?> 
  134. </div> 
  135.  
  136. <?php endif; ?> 
  137.  
  138. <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?> 
  139.  
  140. <div class="datebox"> 
  141. <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 
  142. <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 
  143.  
  144. <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day"> 
  145. <?php bp_the_profile_field_options( 'type=day' ); ?> 
  146. </select> 
  147.  
  148. <select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month"> 
  149. <?php bp_the_profile_field_options( 'type=month' ); ?> 
  150. </select> 
  151.  
  152. <select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year"> 
  153. <?php bp_the_profile_field_options( 'type=year' ); ?> 
  154. </select> 
  155. </div> 
  156.  
  157. <?php endif; ?> 
  158.  
  159. <?php if ( 'url' == bp_get_the_profile_field_type() ) : ?> 
  160.  
  161. <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 
  162. <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>/> 
  163.  
  164. <?php endif; ?> 
  165.  
  166. <?php do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); ?> 
  167.  
  168. <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 
  169. <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 
  170. <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a> 
  171. </p> 
  172.  
  173. <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 
  174. <fieldset> 
  175. <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> 
  176.  
  177. <?php bp_profile_visibility_radio_buttons() ?> 
  178.  
  179. </fieldset> 
  180. <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a> 
  181.  
  182. </div> 
  183. <?php else : ?> 
  184. <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 
  185. <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> 
  186. </p> 
  187. <?php endif ?> 
  188.  
  189. <?php do_action( 'bp_custom_profile_edit_fields' ); ?> 
  190.  
  191. <p class="description"><?php bp_the_profile_field_description(); ?></p> 
  192.  
  193. </div> 
  194.  
  195. <?php endwhile; ?> 
  196.  
  197. <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" /> 
  198.  
  199. <?php endwhile; endif; endif; ?> 
  200.  
  201. <?php do_action( 'bp_signup_profile_fields' ); ?> 
  202.  
  203. </div><!-- #profile-details-section --> 
  204.  
  205. <?php do_action( 'bp_after_signup_profile_fields' ); ?> 
  206.  
  207. <?php endif; ?> 
  208.  
  209. <?php if ( bp_get_blog_signup_allowed() ) : ?> 
  210.  
  211. <?php do_action( 'bp_before_blog_details_fields' ); ?> 
  212.  
  213. <?php /***** Blog Creation Details ******/ ?> 
  214.  
  215. <div class="register-section" id="blog-details-section"> 
  216.  
  217. <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4> 
  218.  
  219. <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ); ?></p> 
  220.  
  221. <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>> 
  222.  
  223. <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  224. <?php do_action( 'bp_signup_blog_url_errors' ); ?> 
  225.  
  226. <?php if ( is_subdomain_install() ) : ?> 
  227. http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?> 
  228. <?php else : ?> 
  229. <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> 
  230. <?php endif; ?> 
  231.  
  232. <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 
  233. <?php do_action( 'bp_signup_blog_title_errors' ); ?> 
  234. <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" /> 
  235.  
  236. <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?>:</span> 
  237. <?php do_action( 'bp_signup_blog_privacy_errors' ); ?> 
  238.  
  239. <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes', 'buddypress' ); ?></label> 
  240. <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No', 'buddypress' ); ?></label> 
  241.  
  242. <?php do_action( 'bp_blog_details_fields' ); ?> 
  243.  
  244. </div> 
  245.  
  246. </div><!-- #blog-details-section --> 
  247.  
  248. <?php do_action( 'bp_after_blog_details_fields' ); ?> 
  249.  
  250. <?php endif; ?> 
  251.  
  252. <?php do_action( 'bp_before_registration_submit_buttons' ); ?> 
  253.  
  254. <div class="submit"> 
  255. <input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" /> 
  256. </div> 
  257.  
  258. <?php do_action( 'bp_after_registration_submit_buttons' ); ?> 
  259.  
  260. <?php wp_nonce_field( 'bp_new_signup' ); ?> 
  261.  
  262. <?php endif; // request-details signup step ?> 
  263.  
  264. <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?> 
  265.  
  266. <h2><?php _e( 'Check Your Email To Activate Your Account!', 'buddypress' ); ?></h2> 
  267.  
  268. <?php do_action( 'template_notices' ); ?> 
  269. <?php do_action( 'bp_before_registration_confirmed' ); ?> 
  270.  
  271. <?php if ( bp_registration_needs_activation() ) : ?> 
  272. <p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); ?></p> 
  273. <?php else : ?> 
  274. <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p> 
  275. <?php endif; ?> 
  276.  
  277. <?php do_action( 'bp_after_registration_confirmed' ); ?> 
  278.  
  279. <?php endif; // completed-confirmation signup step ?> 
  280.  
  281. <?php do_action( 'bp_custom_signup_steps' ); ?> 
  282.  
  283. </form> 
  284.  
  285. </div> 
  286.  
  287. <?php do_action( 'bp_after_register_page' ); ?> 
  288.  
  289. </div><!-- .padder --> 
  290. </div><!-- #content --> 
  291.  
  292. <?php get_sidebar( 'buddypress' ); ?> 
  293.  
  294. <script type="text/javascript"> 
  295. jQuery(document).ready( function() { 
  296. if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') ) 
  297. jQuery('div#blog-details').toggle(); 
  298.  
  299. jQuery( 'input#signup_with_blog' ).click( function() { 
  300. jQuery('div#blog-details').fadeOut().toggle(); 
  301. }); 
  302. }); 
  303. </script> 
  304.  
  305. <?php get_footer( 'buddypress' ); ?> 
.