sbrajesh

Brajesh Singh

Apr 3rd, 2010
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.96 KB | None | 0 0
  1. <?php do_action( 'bp_before_profile_edit_content' ) ?>
  2. <?php if(bp_get_current_profile_group_id()==1):?>
  3. <ul class="button-nav">
  4.             <?php bp_profile_group_tabs(); ?>
  5.         </ul>
  6.         <div class="clear"></div>
  7. <?php
  8.     locate_template(array("members/single/profile/profile-loop.php"),true);?>
  9. <p><b>Your Username is your identity and We hate to see you changing your identity, so our computer has decided to disable editing it for you.Please Edit all other data in your profile as you wish :)
  10. </b>
  11. </p>
  12. <?php
  13. else:?>
  14. <?php if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  15.  
  16. <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() ?>">
  17.  
  18.     <?php do_action( 'bp_before_profile_field_content' ) ?>
  19.  
  20.         <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4>
  21.  
  22.         <ul class="button-nav">
  23.             <?php bp_profile_group_tabs(); ?>
  24.         </ul>
  25.  
  26.         <div class="clear"></div>
  27.  
  28.         <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  29.  
  30.             <div<?php bp_field_css_class( 'editfield' ) ?>>
  31.  
  32.                 <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
  33.  
  34.                     <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>
  35.                     <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() ?>" />
  36.  
  37.                 <?php endif; ?>
  38.  
  39.                 <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
  40.  
  41.                     <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>
  42.                     <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>
  43.  
  44.                 <?php endif; ?>
  45.  
  46.                 <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
  47.  
  48.                     <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>
  49.                     <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>">
  50.                         <?php bp_the_profile_field_options() ?>
  51.                     </select>
  52.  
  53.                 <?php endif; ?>
  54.  
  55.                 <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
  56.  
  57.                     <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>
  58.                     <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple">
  59.                         <?php bp_the_profile_field_options() ?>
  60.                     </select>
  61.  
  62.                     <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
  63.                         <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a>
  64.                     <?php endif; ?>
  65.  
  66.                 <?php endif; ?>
  67.  
  68.                 <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
  69.  
  70.                     <div class="radio">
  71.                         <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>
  72.  
  73.                         <?php bp_the_profile_field_options() ?>
  74.  
  75.                         <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
  76.                             <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a>
  77.                         <?php endif; ?>
  78.                     </div>
  79.  
  80.                 <?php endif; ?>
  81.  
  82.                 <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
  83.  
  84.                     <div class="checkbox">
  85.                         <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>
  86.  
  87.                         <?php bp_the_profile_field_options() ?>
  88.                     </div>
  89.  
  90.                 <?php endif; ?>
  91.  
  92.                 <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
  93.  
  94.                     <div class="datebox">
  95.                         <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>
  96.  
  97.                         <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day">
  98.                             <?php bp_the_profile_field_options( 'type=day' ) ?>
  99.                         </select>
  100.  
  101.                         <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month">
  102.                             <?php bp_the_profile_field_options( 'type=month' ) ?>
  103.                         </select>
  104.  
  105.                         <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year">
  106.                             <?php bp_the_profile_field_options( 'type=year' ) ?>
  107.                         </select>
  108.                     </div>
  109.  
  110.                 <?php endif; ?>
  111.  
  112.                 <?php do_action( 'bp_custom_profile_edit_fields' ) ?>
  113.  
  114.                 <p class="description"><?php bp_the_profile_field_description() ?></p>
  115.             </div>
  116.  
  117.         <?php endwhile; ?>
  118.  
  119.     <?php do_action( 'bp_after_profile_field_content' ) ?>
  120.  
  121.     <div class="submit">
  122.         <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?> " />
  123.     </div>
  124.  
  125.     <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
  126.     <?php wp_nonce_field( 'bp_xprofile_edit' ) ?>
  127.  
  128. </form>
  129.  
  130. <?php endwhile; endif; ?>
  131.  
  132. <?php endif;?>
  133.  
  134. <?php do_action( 'bp_after_profile_edit_content' ) ?>
Add Comment
Please, Sign In to add comment