vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r16017: LJSUP-5264: removed extra option 'gender...

Committer: vsukhanov
LJSUP-5264: removed extra option 'gender accessability'.

U   trunk/bin/upgrading/en.dat
U   trunk/bin/upgrading/proplists.dat
U   trunk/cgi-bin/LJ/User.pm
U   trunk/cgi-bin/LJ/Widget/CreateAccount.pm
U   trunk/htdocs/manage/profile/index.bml
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2009-12-10 07:47:25 UTC (rev 16016)
+++ trunk/bin/upgrading/en.dat	2009-12-10 09:53:27 UTC (rev 16017)
@@ -3329,6 +3329,8 @@
 
 widget.createaccount.error.email.lj_domain=You cannot use a [[domain]] alias when creating an account.  Please enter a different email address.
 
+widget.createaccount.error.nogender=Gender must be specified.
+
 widget.createaccount.error.password.asciionly=You can only use ASCII symbols in the password.
 
 widget.createaccount.error.password.bad=Bad password:

Modified: trunk/bin/upgrading/proplists.dat
===================================================================
--- trunk/bin/upgrading/proplists.dat	2009-12-10 07:47:25 UTC (rev 16016)
+++ trunk/bin/upgrading/proplists.dat	2009-12-10 09:53:27 UTC (rev 16017)
@@ -1485,11 +1485,3 @@
   des: Custom user icon, to be used instead of /img/userinfo.gif in ljuser
   prettyname: Custom user icon
 
-userproplist.opt_sharegender:
-  cldversion: 4
-  datatype: char
-  des: User selected security setting to determine who can see gender info
-  indexed: 0
-  multihomed: 0
-  prettyname: Share Gender
-

Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2009-12-10 07:47:25 UTC (rev 16016)
+++ trunk/cgi-bin/LJ/User.pm	2009-12-10 09:53:27 UTC (rev 16017)
@@ -1438,9 +1438,7 @@
     if ({ map { $_ => 1 }
           qw(opt_sharebday opt_showbday opt_showlocation opt_showmutualfriends
              view_control_strip show_control_strip opt_ctxpopup opt_embedplaceholders
-             esn_inbox_default_expand opt_getting_started
-             opt_sharegender
-             )
+             esn_inbox_default_expand opt_getting_started)
         }->{$prop})
     {
         return $u->$prop;
@@ -1524,26 +1522,6 @@
     }
 }
 
-# opt_sharegender options
-# A - All people
-# R - Registered Users
-# F - Friends Only
-# N - Nobody
-# By default "N".
-sub opt_sharegender {
-    my $u = shift;
-
-    if ($u->raw_prop('opt_sharegender') =~ /^(A|F|N|R)$/) {
-        my $val = $u->raw_prop('opt_sharegender');
-        $val = 'N' unless $val =~ m/^(A|F|N|R)$/;
-        return $val;
-    } else {
-        return 'N' if $u->underage or $u->is_child;
-        return 'F' if $u->is_minor;
-        return 'N';
-    }
-}
-
 # opt_showljtalk options based on user setting
 # Y = Show the LJ Talk field on profile (default)
 # N = Don't show the LJ Talk field on profile

Modified: trunk/cgi-bin/LJ/Widget/CreateAccount.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccount.pm	2009-12-10 07:47:25 UTC (rev 16016)
+++ trunk/cgi-bin/LJ/Widget/CreateAccount.pm	2009-12-10 09:53:27 UTC (rev 16017)
@@ -29,7 +29,6 @@
     LJ::run_hook('partners_registration_visited', $get->{from});
 
     my $alt_layout = $opts{alt_layout} ? 1 : 0;
-$alt_layout=1;
     my $ret;
 
     if ($alt_layout) {
@@ -60,6 +59,7 @@
         $ret .= "CreateAccount.email = \"$tip_email\"\n";
         $ret .= "CreateAccount.password = \"$tip_password\"\n";
         $ret .= "CreateAccount.username = \"$tip_username\"\n";
+        $ret .= "CreateAccount.gender   = \"$tip_gender\"\n";
         $ret .= "</script>\n";
         $ret .= "<div id='tips_box_arrow'></div>";
         $ret .= "<div id='tips_box'></div>";
@@ -168,7 +168,7 @@
     }
     $ret .= $class->html_select(
                 name => "gender",
-                id => "create_gender_mm",
+                id => "create_gender",
                 selected => $post->{gender},
                 list => [ 
                     ''  =>  LJ::Lang::ml("gender.specify"),
@@ -176,6 +176,7 @@
                     'F' =>  LJ::Lang::ml("gender.female"),
                     ],
                 ) . " ";
+    $ret .= $error_msg->('gender', '<br /><span class="formitemFlag">', '</span>');
     $ret .= "</td></tr>\n" unless $alt_layout;
     
 
@@ -455,7 +456,7 @@
     }
 
     ### gender check
-    $from_post{errors}->{confirmpass} = $class->ml('widget.createaccount.error.nogender')
+    $from_post{errors}->{gender} = $class->ml('widget.createaccount.error.nogender')
         unless $post->{gender} =~ /^M|F$/;
 
     ### start COPPA_CHECK

Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2009-12-10 07:47:25 UTC (rev 16016)
+++ trunk/htdocs/manage/profile/index.bml	2009-12-10 09:53:27 UTC (rev 16017)
@@ -153,26 +153,7 @@
         $ret .= "<tr><td class='field_name'>$ML{'.fn.gender'}</td><td>";
         $ret .= LJ::html_select({ 'name' => 'gender', 'selected' => $u->{'gender'} },
                                   'U' => $ML{'.gender.unspecified'}, 'M' => $ML{'.gender.male'}, 'F' => $ML{'.gender.female'} );
-        
-        $ret .= "<div style=\"padding-top: .5em;\">\n";
-        $ret .= " <label for='opt_sharebday'>$ML{'.share.gender'}</label>\n";
-        $ret .= LJ::html_select({ 'name' => 'opt_sharegender',
-                                  'selected' => $u->opt_sharegender },
-                                  { text => BML::ml(".security.visibility.everybody"),
-                                    value => "A",
-                                    disabled => $u->is_child,},
-                                  { text => BML::ml(".security.visibility.regusers"),
-                                    value => "R",
-                                    disabled => $u->is_child,},
-                                  { text => BML::ml(".security.visibility.friends"),
-                                    value => "F",
-                                    disabled => $u->is_child,},
-                                  { text => BML::ml(".security.visibility.nobody"),
-                                    value => "N",});
-        $ret .= "</div>";
-        $ret .= "</td></tr>\n";
 
-
         # birthday
         $ret .= "<tr><td class='field_name'>$ML{'.fn.birthday'}</td><td>";
         my %bdpart;
@@ -599,6 +580,11 @@
             push @errors, $ML{'.error.bio.toolong'};
         }
 
+        # gender
+        unless ($POST{gender} =~ /^F|M$/){
+            push @errors => $ML{'.error.gender.not_specified'};
+        }
+
         # text messaging
         if ($POST{'txtmsg_security'} =~ m/^(all|reg|friends)$/) {
             unless ($POST{'txtmsg_provider'}) {
@@ -677,8 +663,6 @@
             $POST{'opt_showmutualfriends'} = $POST{'opt_showmutualfriends'} ? 1 : 0;
             $POST{'opt_hidefriendofs'} = $POST{'opt_hidefriendofs'} ? 0 : 1;
             $POST{'opt_showschools'} = 'N' unless $POST{'opt_showschools'} =~ m/^(N|R|Y|F)$/;
-            $POST{'opt_sharegender'} = undef unless $POST{'opt_sharegender'} =~ m/^(A|F|N|R)$/;
-            $POST{'gender'} = 'U' unless $POST{'gender'} =~ m/^[UMF]$/;
             $POST{'opt_sharebday'} = undef unless $POST{'opt_sharebday'} =~ m/^(A|F|N|R)$/;
             $POST{'opt_showbday'} = 'D' unless $POST{'opt_showbday'} =~ m/^(D|F|N|Y)$/;
             # undefined means show to everyone, "N" means don't show
@@ -718,7 +702,6 @@
               opt_showmutualfriends opt_showschools
               opt_showbday opt_showlocation opt_showljtalk
               opt_sharebday opt_showonlinestatus
-              opt_sharegender
             );
 
             # reset the gizmo account for this user account

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments