Index: trunk/extensions/SocialProfile/UserProfile/SpecialUpdateProfile.php |
— | — | @@ -385,17 +385,17 @@ |
386 | 386 | <div class="cleared"></div> |
387 | 387 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-email' ) . '</p> |
388 | 388 | <p class="profile-update-unit"><input type="text" size="25" name="email" id="email" value="' . $email . '"/>'; |
389 | | - if ( !$wgUser->mEmailAuthenticated ) { |
390 | | - $confirm = SpecialPage::getTitleFor( 'Confirmemail' ); |
391 | | - $form .= " <a href=\"{$confirm->getFullURL()}\">" . wfMsg( 'user-profile-personal-confirmemail' ) . '</a>'; |
392 | | - } |
393 | | - $form .= '</p> |
| 389 | + if ( !$wgUser->mEmailAuthenticated ) { |
| 390 | + $confirm = SpecialPage::getTitleFor( 'Confirmemail' ); |
| 391 | + $form .= " <a href=\"{$confirm->getFullURL()}\">" . wfMsg( 'user-profile-personal-confirmemail' ) . '</a>'; |
| 392 | + } |
| 393 | + $form .= '</p> |
394 | 394 | <div class="cleared"></div>'; |
395 | | - if ( !$wgUser->mEmailAuthenticated ) { |
396 | | - $form .= '<p class="profile-update-unit-left"></p> |
| 395 | + if ( !$wgUser->mEmailAuthenticated ) { |
| 396 | + $form .= '<p class="profile-update-unit-left"></p> |
397 | 397 | <p class="profile-update-unit-small">' . wfMsg( 'user-profile-personal-email-needs-auth' ) . '</p>'; |
398 | | - } |
399 | | - $form .= '<div class="cleared"></div> |
| 398 | + } |
| 399 | + $form .= '<div class="cleared"></div> |
400 | 400 | </div> |
401 | 401 | <div class="cleared"></div>'; |
402 | 402 | |
— | — | @@ -405,13 +405,13 @@ |
406 | 406 | <p class="profile-update-unit"><input type="text" size="25" name="location_city" id="location_city" value="' . ( isset( $location_city ) ? $location_city : '' ) . '" /></p> |
407 | 407 | <div class="cleared"></div> |
408 | 408 | <p class="profile-update-unit-left" id="location_state_label">' . wfMsg( 'user-profile-personal-country' ) . '</p>'; |
409 | | - $form .= '<p class="profile-update-unit">'; |
410 | | - $form .= '<span id="location_state_form">'; |
411 | | - $form .= "</span> |
412 | | - <script type=\"text/javascript\"> |
| 409 | + $form .= '<p class="profile-update-unit">'; |
| 410 | + $form .= '<span id="location_state_form">'; |
| 411 | + $form .= "</span> |
| 412 | + <script type=\"text/javascript\"> |
413 | 413 | displaySection(\"location_state\",\"" . $location_country . "\",\"" . ( isset( $location_state ) ? $location_state : '' ) . "\"); |
414 | 414 | </script>"; |
415 | | - $form .= "<select name=\"location_country\" id=\"location_country\" onchange=\"displaySection('location_state',this.value,'')\"><option></option>"; |
| 415 | + $form .= "<select name=\"location_country\" id=\"location_country\" onchange=\"displaySection('location_state',this.value,'')\"><option></option>"; |
416 | 416 | |
417 | 417 | foreach ( $countries as $country ) { |
418 | 418 | $form .= "<option value=\"{$country}\"" . ( ( $country == $location_country ) ? ' selected="selected"' : '' ) . ">"; |
— | — | @@ -548,60 +548,66 @@ |
549 | 549 | $wgOut->setPageTitle( wfMsg( 'user-profile-section-interests' ) ); |
550 | 550 | $form = UserProfile::getEditProfileNav( wfMsg( 'user-profile-section-interests' ) ); |
551 | 551 | $form .= '<form action="" method="post" enctype="multipart/form-data" name="profile"> |
552 | | - <div class="profile-info clearfix">'; |
553 | | - $form .= "<div class=\"profile-update\"> |
554 | | - <p class=\"profile-update-title\">" . wfMsg( 'user-profile-interests-entertainment' ) . "</p> |
555 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-movies' ) . "</p> |
556 | | - <p class=\"profile-update-unit\"> |
557 | | - <textarea name=\"movies\" id=\"movies\" rows=\"3\" cols=\"75\">{$movies}</textarea> |
| 552 | + <div class="profile-info clearfix"> |
| 553 | + <div class="profile-update"> |
| 554 | + <p class="profile-update-title">' . wfMsg( 'user-profile-interests-entertainment' ) . '</p> |
| 555 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-movies' ) . '</p> |
| 556 | + <p class="profile-update-unit"> |
| 557 | + <textarea name="movies" id="movies" rows="3" cols="75">' . ( isset( $movies ) ? $movies : '' ) . '</textarea> |
558 | 558 | </p> |
559 | | - <div class=\"cleared\"></div> |
560 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-tv' ) . "</p> |
561 | | - <p class=\"profile-update-unit\"> |
562 | | - <textarea name=\"tv\" id=\"tv\" rows=\"3\" cols=\"75\">{$tv}</textarea> |
563 | | - </p> |
564 | | - <div class=\"cleared\"></div> |
565 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-music' ) . "</p> |
566 | | - <p class=\"profile-update-unit\"> |
567 | | - <textarea name=\"music\" id=\"music\" rows=\"3\" cols=\"75\">{$music}</textarea> |
| 559 | + <div class="cleared"></div> |
| 560 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-tv' ) . '</p> |
| 561 | + <p class="profile-update-unit"> |
| 562 | + <textarea name="tv" id="tv" rows="3" cols="75">' . ( isset( $tv ) ? $tv : '' ) . '</textarea> |
568 | 563 | </p> |
569 | | - <div class=\"cleared\"></div> |
570 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-books' ) . "</p> |
571 | | - <p class=\"profile-update-unit\"> |
572 | | - <textarea name=\"books\" id=\"books\" rows=\"3\" cols=\"75\">{$books}</textarea> |
| 564 | + <div class="cleared"></div> |
| 565 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-music' ) . '</p> |
| 566 | + <p class="profile-update-unit"> |
| 567 | + <textarea name="music" id="music" rows="3" cols="75">' . ( isset( $music ) ? $music : '' ) . '</textarea> |
573 | 568 | </p> |
574 | | - <div class=\"cleared\"></div> |
575 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-magazines' ) . "</p> |
576 | | - <p class=\"profile-update-unit\"> |
577 | | - <textarea name=\"magazines\" id=\"magazines\" rows=\"3\" cols=\"75\">{$magazines}</textarea> |
| 569 | + <div class="cleared"></div> |
| 570 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-books' ) . '</p> |
| 571 | + <p class="profile-update-unit"> |
| 572 | + <textarea name="books" id="books" rows="3" cols="75">' . ( isset( $books ) ? $books : '' ) . '</textarea> |
578 | 573 | </p> |
579 | | - <div class=\"cleared\"></div> |
580 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-videogames' ) . "</p> |
581 | | - <p class=\"profile-update-unit\"> |
582 | | - <textarea name=\"videogames\" id=\"videogames\" rows=\"3\" cols=\"75\">{$videogames}</textarea> |
| 574 | + <div class="cleared"></div> |
| 575 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-magazines' ) . '</p> |
| 576 | + <p class="profile-update-unit"> |
| 577 | + <textarea name="magazines" id="magazines" rows="3" cols="75">' . ( isset( $magazines ) ? $magazines : '' ) . '</textarea> |
583 | 578 | </p> |
584 | | - <div class=\"cleared\"></div> |
| 579 | + <div class="cleared"></div> |
| 580 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-videogames' ) . '</p> |
| 581 | + <p class="profile-update-unit"> |
| 582 | + <textarea name="videogames" id="videogames" rows="3" cols="75">' . ( isset( $videogames ) ? $videogames : '' ) . '</textarea> |
| 583 | + </p> |
| 584 | + <div class="cleared"></div> |
585 | 585 | </div> |
586 | | - <div class=\"profile-info clearfix\"> |
587 | | - <p class=\"profile-update-title\">" . wfMsg( 'user-profile-interests-eats' ) . "</p> |
588 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-foodsnacks' ) . "</p> |
589 | | - <p class=\"profile-update-unit\"> |
590 | | - <textarea name=\"snacks\" id=\"snacks\" rows=\"3\" cols=\"75\">{$snacks}</textarea> |
| 586 | + <div class="profile-info clearfix"> |
| 587 | + <p class="profile-update-title">' . wfMsg( 'user-profile-interests-eats' ) . '</p> |
| 588 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-foodsnacks' ) . '</p> |
| 589 | + <p class="profile-update-unit"> |
| 590 | + <textarea name="snacks" id="snacks" rows="3" cols="75">' . ( isset( $snacks ) ? $snacks : '' ) . '</textarea> |
591 | 591 | </p> |
592 | | - <div class=\"cleared\"></div> |
593 | | - <p class=\"profile-update-unit-left\">" . wfMsg( 'user-profile-interests-drinks' ) . "</p> |
594 | | - <p class=\"profile-update-unit\"> |
595 | | - <textarea name=\"drinks\" id=\"drinks\" rows=\"3\" cols=\"75\">{$drinks}</textarea> |
| 592 | + <div class="cleared"></div> |
| 593 | + <p class="profile-update-unit-left">' . wfMsg( 'user-profile-interests-drinks' ) . '</p> |
| 594 | + <p class="profile-update-unit"> |
| 595 | + <textarea name="drinks" id="drinks" rows="3" cols="75">' . ( isset( $drinks ) ? $drinks : '' ) . '</textarea> |
596 | 596 | </p> |
597 | | - <div class=\"cleared\"></div> |
| 597 | + <div class="cleared"></div> |
598 | 598 | </div> |
599 | | - <input type=\"button\" class=\"site-button\" value=" . wfMsg( 'user-profile-update-button' ) . " size=\"20\" onclick=\"document.profile.submit()\" /> |
| 599 | + <input type="button" class="site-button" value="' . wfMsg( 'user-profile-update-button' ) . '" size="20" onclick="document.profile.submit()" /> |
600 | 600 | </div> |
601 | | - </form>"; |
| 601 | + </form>'; |
602 | 602 | |
603 | 603 | return $form; |
604 | 604 | } |
605 | 605 | |
| 606 | + /** |
| 607 | + * Displays the form for toggling notifications related to social tools |
| 608 | + * (e-mail me when someone friends/foes me, send me a gift, etc.) |
| 609 | + * |
| 610 | + * @return HTML |
| 611 | + */ |
606 | 612 | function displayPreferencesForm() { |
607 | 613 | global $wgUser, $wgOut; |
608 | 614 | |
— | — | @@ -674,28 +680,28 @@ |
675 | 681 | <div id="profile-update-custom1"> |
676 | 682 | <p class="profile-update-unit-left">' . wfMsgForContent( 'custom-info-field1' ) . '</p> |
677 | 683 | <p class="profile-update-unit"> |
678 | | - <textarea name="custom1" id="fav_moment" rows="3" cols="75">' . $custom1 . '</textarea> |
| 684 | + <textarea name="custom1" id="fav_moment" rows="3" cols="75">' . ( isset( $custom1 ) ? $custom1 : '' ) . '</textarea> |
679 | 685 | </p> |
680 | 686 | </div> |
681 | 687 | <div class="cleared"></div> |
682 | 688 | <div id="profile-update-custom2"> |
683 | 689 | <p class="profile-update-unit-left">' . wfMsgForContent( 'custom-info-field2' ) . '</p> |
684 | 690 | <p class="profile-update-unit"> |
685 | | - <textarea name="custom2" id="least_moment" rows="3" cols="75">' . $custom2 . '</textarea> |
| 691 | + <textarea name="custom2" id="least_moment" rows="3" cols="75">' . ( isset( $custom2 ) ? $custom2 : '' ) . '</textarea> |
686 | 692 | </p> |
687 | 693 | </div> |
688 | 694 | <div class="cleared"></div> |
689 | 695 | <div id="profile-update-custom3"> |
690 | 696 | <p class="profile-update-unit-left">' . wfMsgForContent( 'custom-info-field3' ) . '</p> |
691 | 697 | <p class="profile-update-unit"> |
692 | | - <textarea name="custom3" id="fav_athlete" rows="3" cols="75">' . $custom3 . '</textarea> |
| 698 | + <textarea name="custom3" id="fav_athlete" rows="3" cols="75">' . ( isset( $custom3 ) ? $custom3 : '' ) . '</textarea> |
693 | 699 | </p> |
694 | 700 | </div> |
695 | 701 | <div class="cleared"></div> |
696 | 702 | <div id="profile-update-custom4"> |
697 | 703 | <p class="profile-update-unit-left">' . wfMsgForContent( 'custom-info-field4' ) . '</p> |
698 | 704 | <p class="profile-update-unit"> |
699 | | - <textarea name="custom4" id="least_fav_athlete" rows="3" cols="75">' . $custom4 . '</textarea> |
| 705 | + <textarea name="custom4" id="least_fav_athlete" rows="3" cols="75">' . ( isset( $custom4 ) ? $custom4 : '' ) . '</textarea> |
700 | 706 | </p> |
701 | 707 | </div> |
702 | 708 | <div class="cleared"></div> |