/app_old/membershipincludes/includes/bp.registration.form.php

  1. <?php 
  2.  
  3. if(is_wp_error($error) && method_exists($error, 'get_error_code')) { 
  4. $anyerrors = $error->get_error_code(); 
  5. if( !empty($anyerrors) ) { 
  6. // we have an error - output 
  7. $messages = $error->get_error_messages(); 
  8. $errormessages = "<div class='alert alert-error'>"; 
  9. $errormessages .= implode('<br/>', $messages); 
  10. $errormessages .= "</div>"; 
  11. } else { 
  12. $errormessages = ''; 
  13. } else { 
  14. $errormessages = ''; 
  15. ?> 
  16. <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data"> 
  17.  
  18. <input type='hidden' name='subscription' value='<?php echo esc_attr($_REQUEST['subscription']); ?>' /> 
  19.  
  20. <h2><?php _e( 'Create an Account', 'membership' ) ?></h2> 
  21.  
  22. <?php do_action( 'template_notices' ) ?> 
  23. <?php 
  24. if(!empty($errormessages)) { 
  25. echo $errormessages; 
  26. ?> 
  27.  
  28. <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.', 'membership' ) ?></p> 
  29.  
  30. <?php do_action( 'bp_before_account_details_fields' ) ?> 
  31.  
  32. <div class="register-section" id="basic-details-section"> 
  33.  
  34. <?php /***** Basic Account Details ******/ ?> 
  35.  
  36. <h4><?php _e( 'Account Details', 'membership' ) ?></h4> 
  37.  
  38. <label for="signup_username"><?php _e( 'Username', 'membership' ) ?> <?php _e( '(required)', 'membership' ) ?></label> 
  39. <?php do_action( 'bp_signup_username_errors' ) ?> 
  40. <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" /> 
  41.  
  42. <label for="signup_email"><?php _e( 'Email Address', 'membership' ) ?> <?php _e( '(required)', 'membership' ) ?></label> 
  43. <?php do_action( 'bp_signup_email_errors' ) ?> 
  44. <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" /> 
  45.  
  46. <label for="signup_password"><?php _e( 'Choose a Password', 'membership' ) ?> <?php _e( '(required)', 'membership' ) ?></label> 
  47. <?php do_action( 'bp_signup_password_errors' ) ?> 
  48. <input type="password" name="signup_password" id="signup_password" value="" /> 
  49.  
  50. <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'membership' ) ?> <?php _e( '(required)', 'membership' ) ?></label> 
  51. <?php do_action( 'bp_signup_password_confirm_errors' ) ?> 
  52. <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" /> 
  53.  
  54. </div><!-- #basic-details-section --> 
  55.  
  56. <?php do_action( 'bp_after_account_details_fields' ) ?> 
  57.  
  58. <?php /***** Extra Profile Details ******/ ?> 
  59.  
  60. <?php if ( bp_is_active( 'xprofile' ) ) : ?> 
  61.  
  62. <?php do_action( 'bp_before_signup_profile_fields' ) ?> 
  63.  
  64. <div class="register-section" id="profile-details-section"> 
  65.  
  66. <h4><?php _e( 'Profile Details', 'membership' ) ?></h4> 
  67.  
  68. <?php /** Use the profile field loop to render input fields for the 'base' profile field group */ ?> 
  69. <?php if ( function_exists('bp_is_active') && bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( 'profile_group_id=1&hide_empty_fields=0' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> 
  70.  
  71. <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> 
  72.  
  73. <div class="editfield"> 
  74.  
  75. <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?> 
  76.  
  77. <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)', 'membership' ) ?><?php endif; ?></label> 
  78. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  79. <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() ?>" /> 
  80.  
  81. <?php endif; ?> 
  82.  
  83. <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> 
  84.  
  85. <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)', 'membership' ) ?><?php endif; ?></label> 
  86. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  87. <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> 
  88.  
  89. <?php endif; ?> 
  90.  
  91. <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?> 
  92.  
  93. <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)', 'membership' ) ?><?php endif; ?></label> 
  94. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  95. <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"> 
  96. <?php bp_the_profile_field_options() ?> 
  97. </select> 
  98.  
  99. <?php endif; ?> 
  100.  
  101. <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?> 
  102.  
  103. <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)', 'membership' ) ?><?php endif; ?></label> 
  104. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  105. <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple"> 
  106. <?php bp_the_profile_field_options() ?> 
  107. </select> 
  108.  
  109. <?php endif; ?> 
  110.  
  111. <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?> 
  112.  
  113. <div class="radio"> 
  114. <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'membership' ) ?><?php endif; ?></span> 
  115.  
  116. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  117. <?php bp_the_profile_field_options() ?> 
  118.  
  119. <?php if ( !bp_get_the_profile_field_is_required() ) : ?> 
  120. <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'membership' ) ?></a> 
  121. <?php endif; ?> 
  122. </div> 
  123.  
  124. <?php endif; ?> 
  125.  
  126. <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?> 
  127.  
  128. <div class="checkbox"> 
  129. <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'membership' ) ?><?php endif; ?></span> 
  130.  
  131. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  132. <?php bp_the_profile_field_options() ?> 
  133. </div> 
  134.  
  135. <?php endif; ?> 
  136.  
  137. <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?> 
  138.  
  139. <div class="datebox"> 
  140. <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)', 'membership' ) ?><?php endif; ?></label> 
  141. <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> 
  142.  
  143. <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day"> 
  144. <?php bp_the_profile_field_options( 'type=day' ) ?> 
  145. </select> 
  146.  
  147. <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month"> 
  148. <?php bp_the_profile_field_options( 'type=month' ) ?> 
  149. </select> 
  150.  
  151. <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year"> 
  152. <?php bp_the_profile_field_options( 'type=year' ) ?> 
  153. </select> 
  154. </div> 
  155.  
  156. <?php endif; ?> 
  157.  
  158. <?php do_action( 'bp_custom_profile_edit_fields' ) ?> 
  159.  
  160. <p class="description"><?php bp_the_profile_field_description() ?></p> 
  161.  
  162. </div> 
  163.  
  164. <?php endwhile; ?> 
  165.  
  166. <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" /> 
  167.  
  168. <?php endwhile; endif; endif; ?> 
  169.  
  170. </div><!-- #profile-details-section --> 
  171.  
  172. <?php do_action( 'bp_after_signup_profile_fields' ) ?> 
  173.  
  174. <?php endif; ?> 
  175.  
  176. <?php do_action( 'bp_before_registration_submit_buttons' ) ?> 
  177.  
  178. <div class="submit"> 
  179. <input type="submit"name="signup_submit" id="signup_submit" value="<?php _e( 'Sign Up', 'membership' ) ?> →" /> 
  180. </div> 
  181.  
  182. <?php do_action( 'bp_after_registration_submit_buttons' ) ?> 
  183.  
  184. <?php wp_nonce_field( 'bp_new_signup' ) ?> 
  185.  
  186.  
  187. <?php do_action( 'bp_custom_signup_steps' ) ?> 
  188. <input type="hidden" name="action" value="validatepage1bp" /> 
  189. </form> 
  190. <?php 
  191. ?> 
.