/bp-themes/bp-default/members/single/profile/edit.php

  1. <?php do_action( 'bp_before_profile_edit_content' ); 
  2.  
  3. if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) : 
  4. while ( bp_profile_groups() ) : bp_the_profile_group(); ?> 
  5.  
  6. <form action="<?php bp_the_profile_group_edit_form_action(); ?>" method="post" id="profile-edit-form" class="standard-form <?php bp_the_profile_group_slug(); ?>"> 
  7.  
  8. <?php do_action( 'bp_before_profile_field_content' ); ?> 
  9.  
  10. <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4> 
  11.  
  12. <ul class="button-nav"> 
  13.  
  14. <?php bp_profile_group_tabs(); ?> 
  15.  
  16. </ul> 
  17.  
  18. <div class="clear"></div> 
  19.  
  20. <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> 
  21.  
  22. <div<?php bp_field_css_class( 'editfield' ); ?>> 
  23.  
  24. <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?> 
  25.  
  26. <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> 
  27. <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; ?>/> 
  28.  
  29. <?php endif; ?> 
  30.  
  31. <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> 
  32.  
  33. <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> 
  34. <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>><?php bp_the_profile_field_edit_value(); ?></textarea> 
  35.  
  36. <?php endif; ?> 
  37.  
  38. <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?> 
  39.  
  40. <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> 
  41. <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>> 
  42. <?php bp_the_profile_field_options(); ?> 
  43. </select> 
  44.  
  45. <?php endif; ?> 
  46.  
  47. <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?> 
  48.  
  49. <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> 
  50. <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>> 
  51.  
  52. <?php bp_the_profile_field_options(); ?> 
  53.  
  54. </select> 
  55.  
  56. <?php if ( !bp_get_the_profile_field_is_required() ) : ?> 
  57.  
  58. <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a> 
  59.  
  60. <?php endif; ?> 
  61.  
  62. <?php endif; ?> 
  63.  
  64. <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?> 
  65.  
  66. <div class="radio"> 
  67. <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> 
  68.  
  69. <?php bp_the_profile_field_options(); ?> 
  70.  
  71. <?php if ( !bp_get_the_profile_field_is_required() ) : ?> 
  72.  
  73. <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a> 
  74.  
  75. <?php endif; ?> 
  76. </div> 
  77.  
  78. <?php endif; ?> 
  79.  
  80. <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?> 
  81.  
  82. <div class="checkbox"> 
  83. <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> 
  84.  
  85. <?php bp_the_profile_field_options(); ?> 
  86. </div> 
  87.  
  88. <?php endif; ?> 
  89.  
  90. <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?> 
  91.  
  92. <div class="datebox"> 
  93. <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> 
  94.  
  95. <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>> 
  96.  
  97. <?php bp_the_profile_field_options( 'type=day' ); ?> 
  98.  
  99. </select> 
  100.  
  101. <select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>> 
  102.  
  103. <?php bp_the_profile_field_options( 'type=month' ); ?> 
  104.  
  105. </select> 
  106.  
  107. <select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>> 
  108.  
  109. <?php bp_the_profile_field_options( 'type=year' ); ?> 
  110.  
  111. </select> 
  112. </div> 
  113.  
  114. <?php endif; ?> 
  115.  
  116. <?php if ( 'url' == bp_get_the_profile_field_type() ) : ?> 
  117.  
  118. <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> 
  119. <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; ?>/> 
  120.  
  121. <?php endif; ?> 
  122.  
  123. <?php do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); ?> 
  124.  
  125. <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 
  126. <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 
  127. <?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 _e( 'Change', 'buddypress' ); ?></a> 
  128. </p> 
  129.  
  130. <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 
  131. <fieldset> 
  132. <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> 
  133.  
  134. <?php bp_profile_visibility_radio_buttons() ?> 
  135.  
  136. </fieldset> 
  137. <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a> 
  138. </div> 
  139. <?php else : ?> 
  140. <div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> 
  141. <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> 
  142. </div> 
  143. <?php endif ?> 
  144.  
  145. <?php do_action( 'bp_custom_profile_edit_fields' ); ?> 
  146.  
  147. <p class="description"><?php bp_the_profile_field_description(); ?></p> 
  148. </div> 
  149.  
  150. <?php endwhile; ?> 
  151.  
  152. <?php do_action( 'bp_after_profile_field_content' ); ?> 
  153.  
  154. <div class="submit"> 
  155. <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " /> 
  156. </div> 
  157.  
  158. <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" /> 
  159.  
  160. <?php wp_nonce_field( 'bp_xprofile_edit' ); ?> 
  161.  
  162. </form> 
  163.  
  164. <?php endwhile; endif; ?> 
  165.  
  166. <?php do_action( 'bp_after_profile_edit_content' ); ?> 
.