Changeset 2831
- Timestamp:
- 03/11/2010 11:41:31 AM (15 years ago)
- Location:
- branches/1.2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-themes/bp-default/_inc/css/default.css
r2720 r2831 803 803 } 804 804 805 form.standard-form a.clear-value { 806 display: block; 807 margin-top: 5px; 808 outline: none; 809 } 810 805 811 form.standard-form #basic-details-section, form.standard-form #blog-details-section, 806 812 form.standard-form #profile-details-section { -
branches/1.2/bp-themes/bp-default/_inc/global.js
r2727 r2831 1226 1226 var container = document.getElementById(container); 1227 1227 1228 radioButtons = container.getElementsByTagName('INPUT'); 1229 1230 for(var i=0; i<radioButtons.length; i++) { 1231 radioButtons[i].checked = ''; 1228 if ( radioButtons = container.getElementsByTagName('INPUT') ) { 1229 for(var i=0; i<radioButtons.length; i++) { 1230 radioButtons[i].checked = ''; 1231 } 1232 } 1233 1234 if ( options = container.getElementsByTagName('OPTION') ) { 1235 for(var i=0; i<options.length; i++) { 1236 options[i].selected = false; 1237 } 1232 1238 } 1233 1239 -
branches/1.2/bp-themes/bp-default/members/single/profile/edit.php
r2558 r2831 48 48 <?php bp_the_profile_field_options() ?> 49 49 </select> 50 51 <?php if ( !bp_get_the_profile_field_is_required() ) : ?> 52 <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a> 53 <?php endif; ?> 50 54 51 55 <?php endif; ?> -
branches/1.2/bp-xprofile.php
r2824 r2831 336 336 } 337 337 338 do_action( 'xprofile_updated_profile', $ posted_field_ids, $errors );338 do_action( 'xprofile_updated_profile', $bp->displayed_user->id, $posted_field_ids, $errors ); 339 339 340 340 /* Set the feedback messages */ -
branches/1.2/bp-xprofile/bp-xprofile-templatetags.php
r2695 r2831 345 345 global $field; 346 346 347 return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id ); 347 $array_box = false; 348 if ( 'multiselectbox' == $field->type ) 349 $array_box = '[]'; 350 351 return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id . $array_box ); 348 352 } 349 353 … … 373 377 374 378 for ( $k = 0; $k < count($options); $k++ ) { 375 $option_value = BP_XProfile_ProfileData::get_value_byid($options[$k]->parent_id); 379 $option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $options[$k]->parent_id ) ); 380 $option_values = (array)$option_values; 376 381 377 382 /* Check for updated posted values, but errors preventing them from being saved first time */ 378 if ( isset( $_POST['field_' . $field->id] ) && $option_value != $_POST['field_' . $field->id] ) { 379 if ( !empty( $_POST['field_' . $field->id] ) ) 380 $option_value = $_POST['field_' . $field->id]; 383 foreach( (array)$option_values as $i => $option_value ) { 384 if ( isset( $_POST['field_' . $field->id] ) && $_POST['field_' . $field->id] != $option_value ) { 385 if ( !empty( $_POST['field_' . $field->id] ) ) 386 $option_values[$i] = $_POST['field_' . $field->id]; 387 } 381 388 } 382 389 383 if ( $option_value == $options[$k]->name|| $options[$k]->is_default_option ) {390 if ( in_array( $options[$k]->name, (array)$option_values ) || $options[$k]->is_default_option ) { 384 391 $selected = ' selected="selected"'; 385 392 } else {
Note: See TracChangeset
for help on using the changeset viewer.