Advertisement
jungermedia

members/single/profile/edit.php

Jun 17th, 2011
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. <?php do_action( 'bp_before_profile_edit_content' ) ?>
  2.  
  3. <?php if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  4.  
  5. <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() ?>">
  6.  
  7. <?php do_action( 'bp_before_profile_field_content' ) ?>
  8.  
  9. <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4>
  10.  
  11. <ul class="button-nav">
  12. <?php bp_profile_group_tabs(); ?>
  13. </ul>
  14.  
  15. <div class="clear"></div>
  16.  
  17. <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  18.  
  19. <div<?php bp_field_css_class( 'editfield' ) ?>>
  20.  
  21. <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
  22.  
  23. <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>
  24. <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() ?>" />
  25.  
  26. <?php endif; ?>
  27.  
  28. <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
  29.  
  30. <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>
  31. <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>
  32.  
  33. <?php endif; ?>
  34.  
  35. <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
  36.  
  37. <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>
  38. <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>">
  39. <?php bp_the_profile_field_options() ?>
  40. </select>
  41.  
  42. <?php endif; ?>
  43.  
  44. <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
  45.  
  46. <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>
  47. <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple">
  48. <?php bp_the_profile_field_options() ?>
  49. </select>
  50.  
  51. <?php endif; ?>
  52.  
  53. <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
  54.  
  55. <div class="radio">
  56. <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>
  57.  
  58. <?php bp_the_profile_field_options() ?>
  59.  
  60. <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
  61. <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a>
  62. <?php endif; ?>
  63. </div>
  64.  
  65. <?php endif; ?>
  66.  
  67. <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
  68.  
  69. <div class="checkbox">
  70. <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>
  71.  
  72. <?php bp_the_profile_field_options() ?>
  73. </div>
  74.  
  75. <?php endif; ?>
  76.  
  77. <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
  78.  
  79. <div class="datebox">
  80. <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>
  81.  
  82. <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day">
  83. <?php bp_the_profile_field_options( 'type=day' ) ?>
  84. </select>
  85.  
  86. <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month">
  87. <?php bp_the_profile_field_options( 'type=month' ) ?>
  88. </select>
  89.  
  90. <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year">
  91. <?php bp_the_profile_field_options( 'type=year' ) ?>
  92. </select>
  93. </div>
  94.  
  95. <?php endif; ?>
  96.  
  97. <?php do_action( 'bp_custom_profile_edit_fields' ) ?>
  98.  
  99. <p class="description"><?php bp_the_profile_field_description() ?></p>
  100. </div>
  101.  
  102. <?php endwhile; ?>
  103.  
  104. <?php do_action( 'bp_after_profile_field_content' ) ?>
  105.  
  106. <div class="submit">
  107. <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?> " />
  108. </div>
  109.  
  110. <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
  111. <?php wp_nonce_field( 'bp_xprofile_edit' ) ?>
  112.  
  113. </form>
  114.  
  115. <?php endwhile; endif; ?>
  116.  
  117. <?php do_action( 'bp_after_profile_edit_content' ) ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement