PageRenderTime 25ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/buddypress/members/register.php

https://gitlab.com/thongta/fituet
PHP | 430 lines | 185 code | 107 blank | 138 comment | 25 complexity | ad62c613f4f225e3ee66e4c8a541e9bd MD5 | raw file
  1. <div id="buddypress">
  2. <?php
  3. /**
  4. * Fires at the top of the BuddyPress member registration page template.
  5. *
  6. * @since BuddyPress (1.1.0)
  7. */
  8. do_action( 'bp_before_register_page' ); ?>
  9. <div class="page" id="register-page">
  10. <form action="" name="signup_form" id="signup_form" class="standard-form" method="post"
  11. enctype="multipart/form-data">
  12. <?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?>
  13. <?php
  14. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
  15. do_action( 'template_notices' ); ?>
  16. <?php
  17. /**
  18. * Fires before the display of the registration disabled message.
  19. *
  20. * @since BuddyPress (1.5.0)
  21. */
  22. do_action( 'bp_before_registration_disabled' ); ?>
  23. <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p>
  24. <?php
  25. /**
  26. * Fires after the display of the registration disabled message.
  27. *
  28. * @since BuddyPress (1.5.0)
  29. */
  30. do_action( 'bp_after_registration_disabled' ); ?>
  31. <?php endif; // registration-disabled signup step ?>
  32. <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
  33. <?php
  34. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
  35. do_action( 'template_notices' ); ?>
  36. <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>
  37. <?php
  38. /**
  39. * Fires before the display of member registration account details fields.
  40. *
  41. * @since BuddyPress (1.1.0)
  42. */
  43. do_action( 'bp_before_account_details_fields' ); ?>
  44. <div class="register-section" id="basic-details-section">
  45. <?php /***** Basic Account Details ******/ ?>
  46. <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4>
  47. <label
  48. for="signup_username"><?php _e( 'Username', 'buddypress' ); ?><?php _e( '(required)', 'buddypress' ); ?></label>
  49. <?php
  50. /**
  51. * Fires and displays any member registration username errors.
  52. *
  53. * @since BuddyPress (1.1.0)
  54. */
  55. do_action( 'bp_signup_username_errors' ); ?>
  56. <input type="text" name="signup_username" id="signup_username"
  57. value="<?php bp_signup_username_value(); ?>" <?php bp_form_field_attributes( 'username' ); ?>/>
  58. <label
  59. for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?><?php _e( '(required)', 'buddypress' ); ?></label>
  60. <?php
  61. /**
  62. * Fires and displays any member registration email errors.
  63. *
  64. * @since BuddyPress (1.1.0)
  65. */
  66. do_action( 'bp_signup_email_errors' ); ?>
  67. <input type="email" name="signup_email" id="signup_email"
  68. value="<?php bp_signup_email_value(); ?>" <?php bp_form_field_attributes( 'email' ); ?>/>
  69. <label
  70. for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?><?php _e( '(required)', 'buddypress' ); ?></label>
  71. <?php
  72. /**
  73. * Fires and displays any member registration password errors.
  74. *
  75. * @since BuddyPress (1.1.0)
  76. */
  77. do_action( 'bp_signup_password_errors' ); ?>
  78. <input type="password" name="signup_password" id="signup_password" value=""
  79. class="password-entry" <?php bp_form_field_attributes( 'password' ); ?>/>
  80. <div id="pass-strength-result"></div>
  81. <label
  82. for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?><?php _e( '(required)', 'buddypress' ); ?></label>
  83. <?php
  84. /**
  85. * Fires and displays any member registration password confirmation errors.
  86. *
  87. * @since BuddyPress (1.1.0)
  88. */
  89. do_action( 'bp_signup_password_confirm_errors' ); ?>
  90. <input type="password" name="signup_password_confirm" id="signup_password_confirm" value=""
  91. class="password-entry-confirm" <?php bp_form_field_attributes( 'password' ); ?>/>
  92. <?php
  93. /**
  94. * Fires and displays any extra member registration details fields.
  95. *
  96. * @since BuddyPress (1.9.0)
  97. */
  98. do_action( 'bp_account_details_fields' ); ?>
  99. </div><!-- #basic-details-section -->
  100. <?php
  101. /**
  102. * Fires after the display of member registration account details fields.
  103. *
  104. * @since BuddyPress (1.1.0)
  105. */
  106. do_action( 'bp_after_account_details_fields' ); ?>
  107. <?php /***** Extra Profile Details ******/ ?>
  108. <?php if ( bp_is_active( 'xprofile' ) ) : ?>
  109. <?php
  110. /**
  111. * Fires before the display of member registration xprofile fields.
  112. *
  113. * @since BuddyPress (1.2.4)
  114. */
  115. do_action( 'bp_before_signup_profile_fields' ); ?>
  116. <div class="register-section" id="profile-details-section">
  117. <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4>
  118. <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
  119. <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile(
  120. array(
  121. 'profile_group_id' => 1,
  122. 'fetch_field_data' => false
  123. )
  124. ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  125. <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  126. <div<?php bp_field_css_class( 'editfield' ); ?>>
  127. <?php
  128. $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
  129. $field_type->edit_field_html();
  130. /**
  131. * Fires before the display of the visibility options for xprofile fields.
  132. *
  133. * @since BuddyPress (1.7.0)
  134. */
  135. do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
  136. if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
  137. <p class="field-visibility-settings-toggle"
  138. id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  139. <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
  140. <a href="#"
  141. class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
  142. </p>
  143. <div class="field-visibility-settings"
  144. id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
  145. <fieldset>
  146. <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
  147. <?php bp_profile_visibility_radio_buttons() ?>
  148. </fieldset>
  149. <a class="field-visibility-settings-close"
  150. href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
  151. </div>
  152. <?php else : ?>
  153. <p class="field-visibility-settings-notoggle"
  154. id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  155. <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
  156. </p>
  157. <?php endif ?>
  158. <?php
  159. /**
  160. * Fires after the display of the visibility options for xprofile fields.
  161. *
  162. * @since BuddyPress (1.1.0)
  163. */
  164. do_action( 'bp_custom_profile_edit_fields' ); ?>
  165. <p class="description"><?php bp_the_profile_field_description(); ?></p>
  166. </div>
  167. <?php endwhile; ?>
  168. <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids"
  169. value="<?php bp_the_profile_field_ids(); ?>" />
  170. <?php endwhile; endif; endif; ?>
  171. <?php
  172. /**
  173. * Fires and displays any extra member registration xprofile fields.
  174. *
  175. * @since BuddyPress (1.9.0)
  176. */
  177. do_action( 'bp_signup_profile_fields' ); ?>
  178. </div><!-- #profile-details-section -->
  179. <?php
  180. /**
  181. * Fires after the display of member registration xprofile fields.
  182. *
  183. * @since BuddyPress (1.1.0)
  184. */
  185. do_action( 'bp_after_signup_profile_fields' ); ?>
  186. <?php endif; ?>
  187. <?php if ( bp_get_blog_signup_allowed() ) : ?>
  188. <?php
  189. /**
  190. * Fires before the display of member registration blog details fields.
  191. *
  192. * @since BuddyPress (1.1.0)
  193. */
  194. do_action( 'bp_before_blog_details_fields' ); ?>
  195. <?php /***** Blog Creation Details ******/ ?>
  196. <div class="register-section" id="blog-details-section">
  197. <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4>
  198. <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog"
  199. 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' ); ?>
  200. </p>
  201. <div id="blog-details"
  202. <?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  203. <label
  204. for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?><?php _e( '(required)', 'buddypress' ); ?></label>
  205. <?php
  206. /**
  207. * Fires and displays any member registration blog URL errors.
  208. *
  209. * @since BuddyPress (1.1.0)
  210. */
  211. do_action( 'bp_signup_blog_url_errors' ); ?>
  212. <?php if ( is_subdomain_install() ) : ?>
  213. http:// <input type="text" name="signup_blog_url" id="signup_blog_url"
  214. value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_signup_subdomain_base(); ?>
  215. <?php else : ?>
  216. <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url"
  217. id="signup_blog_url"
  218. value="<?php bp_signup_blog_url_value(); ?>" />
  219. <?php endif; ?>
  220. <label
  221. for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?><?php _e( '(required)', 'buddypress' ); ?></label>
  222. <?php
  223. /**
  224. * Fires and displays any member registration blog title errors.
  225. *
  226. * @since BuddyPress (1.1.0)
  227. */
  228. do_action( 'bp_signup_blog_title_errors' ); ?>
  229. <input type="text" name="signup_blog_title" id="signup_blog_title"
  230. value="<?php bp_signup_blog_title_value(); ?>" />
  231. <span
  232. class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?></span>
  233. <?php
  234. /**
  235. * Fires and displays any member registration blog privacy errors.
  236. *
  237. * @since BuddyPress (1.1.0)
  238. */
  239. do_action( 'bp_signup_blog_privacy_errors' ); ?>
  240. <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public"
  241. 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' ); ?>
  242. </label>
  243. <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private"
  244. value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No', 'buddypress' ); ?>
  245. </label>
  246. <?php
  247. /**
  248. * Fires and displays any extra member registration blog details fields.
  249. *
  250. * @since BuddyPress (1.9.0)
  251. */
  252. do_action( 'bp_blog_details_fields' ); ?>
  253. </div>
  254. </div><!-- #blog-details-section -->
  255. <?php
  256. /**
  257. * Fires after the display of member registration blog details fields.
  258. *
  259. * @since BuddyPress (1.1.0)
  260. */
  261. do_action( 'bp_after_blog_details_fields' ); ?>
  262. <?php endif; ?>
  263. <?php
  264. /**
  265. * Fires before the display of the registration submit buttons.
  266. *
  267. * @since BuddyPress (1.1.0)
  268. */
  269. do_action( 'bp_before_registration_submit_buttons' ); ?>
  270. <div class="submit">
  271. <input type="submit" name="signup_submit" id="signup_submit"
  272. value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" />
  273. </div>
  274. <?php
  275. /**
  276. * Fires after the display of the registration submit buttons.
  277. *
  278. * @since BuddyPress (1.1.0)
  279. */
  280. do_action( 'bp_after_registration_submit_buttons' ); ?>
  281. <?php wp_nonce_field( 'bp_new_signup' ); ?>
  282. <?php endif; // request-details signup step ?>
  283. <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  284. <?php
  285. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
  286. do_action( 'template_notices' ); ?>
  287. <?php
  288. /**
  289. * Fires before the display of the registration confirmed messages.
  290. *
  291. * @since BuddyPress (1.5.0)
  292. */
  293. do_action( 'bp_before_registration_confirmed' ); ?>
  294. <?php if ( bp_registration_needs_activation() ) : ?>
  295. <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>
  296. <?php else : ?>
  297. <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
  298. <?php endif; ?>
  299. <?php
  300. /**
  301. * Fires after the display of the registration confirmed messages.
  302. *
  303. * @since BuddyPress (1.5.0)
  304. */
  305. do_action( 'bp_after_registration_confirmed' ); ?>
  306. <?php endif; // completed-confirmation signup step ?>
  307. <?php
  308. /**
  309. * Fires and displays any custom signup steps.
  310. *
  311. * @since BuddyPress (1.1.0)
  312. */
  313. do_action( 'bp_custom_signup_steps' ); ?>
  314. </form>
  315. </div>
  316. <?php
  317. /**
  318. * Fires at the bottom of the BuddyPress member registration page template.
  319. *
  320. * @since BuddyPress (1.1.0)
  321. */
  322. do_action( 'bp_after_register_page' ); ?>
  323. </div><!-- #buddypress -->