[dw-free] New create account flow
[commit: http://hg.dwscoalition.org/dw-free/rev/0d7ace9475cd]
http://bugs.dwscoalition.org/show_bug.cgi?id=373
New create account flow.
Patch by
janinedog.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=373
New create account flow.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/en.dat
- cgi-bin/LJ/User.pm
- cgi-bin/LJ/Widget/CreateAccount.pm
- cgi-bin/LJ/Widget/CreateAccountNextSteps.pm
- cgi-bin/LJ/Widget/CreateAccountProfile.pm
- cgi-bin/LJ/Widget/CreateAccountProgressMeter.pm
- cgi-bin/LJ/Widget/CreateAccountTheme.pm
- doc/config-local.pl.txt
- doc/raw/memcache-keys.txt
- etc/config.pl
- htdocs/create.bml
- htdocs/create.bml.text
- htdocs/inc/account-codes
- htdocs/js/widgets/createaccount.js
- htdocs/stc/widgets/createaccount.css
- htdocs/stc/widgets/createaccountprofile.css
- htdocs/stc/widgets/createaccountprogressmeter.css
-------------------------------------------------------------------------------- diff -r 3941a1599503 -r 0d7ace9475cd bin/upgrading/en.dat --- a/bin/upgrading/en.dat Thu Mar 19 04:03:21 2009 +0000 +++ b/bin/upgrading/en.dat Thu Mar 19 04:21:13 2009 +0000 @@ -3438,7 +3438,7 @@ widget.createaccount.field.news=Yes, ema widget.createaccount.field.password=Password: -widget.createaccount.field.tos=By creating a [[sitename]] account, you agree to our <a [[aopts1]]>Terms of Service</a> and <a [[aopts2]]>Privacy Policy</a>. +widget.createaccount.field.tos=I have read and agree to [[sitename]]'s <a [[aopts1]]>Terms of Service</a> and <a [[aopts2]]>Privacy Policy</a>. widget.createaccount.field.username=Username: @@ -3456,11 +3456,33 @@ widget.createaccount.tip.password=Choose widget.createaccount.tip.username=Your username is used in your journal URL. Use lower-case letters (a-z), digits (0-9), and underscores (_). +widget.createaccountentercode.btn.proceed=Proceed... + +widget.createaccountentercode.code=Code: + +widget.createaccountentercode.error.invalidcode=Invalid code. + +widget.createaccountentercode.error.toofast=You are entering codes too quickly; please try again later. + +widget.createaccountentercode.info=To create a new account, enter an account creation code: + +widget.createaccountentercode.pay=If you do not have an account creation code, you can <a [[aopts]]>purchase a [[sitename]] account</a>. + +widget.createaccountinviter.addcomms=Join and watch [[user]] ([[name]]). + +widget.createaccountinviter.addcomms.note.mm=[[user]] is a maintainer or moderator of this community. + +widget.createaccountinviter.addcomms.note.moderated=This community has moderated membership; you will have to wait for a maintainer to approve your membership. + +widget.createaccountinviter.addinviter.trust=Add [[user]] to your access list. + +widget.createaccountinviter.addinviter.watch=Add [[user]] to your subscriptions. + +widget.createaccountinviter.title=Manage Your Circle + widget.createaccountnextsteps.steps=Now that your account is set up, you're ready to explore the rest of [[sitename]]. Here are some things to get you started: -widget.createaccountnextsteps.steps.customize=Customize your journal further - -widget.createaccountnextsteps.steps.explore=Browse [[sitenameabbrev]] by categories +widget.createaccountnextsteps.steps.customize=Customize your journal widget.createaccountnextsteps.steps.find=Find others by interests @@ -3511,6 +3533,14 @@ widget.createaccounttheme.preview=Previe widget.createaccounttheme.preview=Preview widget.createaccounttheme.title=Select Your Journal's Theme + +widget.createaccountupgrade.btn.purchase=Purchase a Paid Account + +widget.createaccountupgrade.nextstep=No thanks, I'm not interested at this time. + +widget.createaccountupgrade.text=Purchasing a paid account will give you more account features. It will also help to support [[sitename]], which does not use advertisements to get revenue. Please read <a [[aopts]]>this FAQ</a> to learn more about our different paid account packages. + +widget.createaccountupgrade.title=Upgrade Your Account widget.currenttheme.desc=[[layout]] by [[designer]] diff -r 3941a1599503 -r 0d7ace9475cd cgi-bin/LJ/User.pm --- a/cgi-bin/LJ/User.pm Thu Mar 19 04:03:21 2009 +0000 +++ b/cgi-bin/LJ/User.pm Thu Mar 19 04:21:13 2009 +0000 @@ -172,7 +172,7 @@ sub create { 'userid' => $userid, 'user' => $username, 'code' => undef, - 'news' => $opts{get_ljnews}, + 'news' => $opts{get_news}, }); return $u; @@ -213,19 +213,13 @@ sub create_personal { # Set the default style LJ::run_hook('set_default_style', $u); - if (length $opts{inviter}) { - if ($opts{inviter} =~ /^partner:/) { - LJ::run_hook('partners_registration_done', $u, $opts{inviter}); - } else { - # store inviter, if there was one - my $inviter = LJ::load_user($opts{inviter}); - if ($inviter) { - LJ::set_rel($u, $inviter, "I"); - LJ::statushistory_add($u, $inviter, 'create_from_invite', "Created new account."); - - $u->add_edge( $inviter, watch => {}, trust => {} ); - LJ::Event::InvitedFriendJoins->new($inviter, $u)->fire; - } + if ( $opts{inviter} ) { + # store inviter, if there was one + my $inviter = LJ::load_user( $opts{inviter} ); + if ( $inviter ) { + LJ::set_rel( $u, $inviter, 'I' ); + LJ::statushistory_add( $u, $inviter, 'create_from_invite', "Created new account." ); + LJ::Event::InvitedFriendJoins->new( $inviter, $u )->fire; } } # if we have initial friends for new accounts, add them. @@ -260,7 +254,7 @@ sub create_personal { # subscribe to default events $u->subscribe( event => 'OfficialPost', method => 'Inbox' ); - $u->subscribe( event => 'OfficialPost', method => 'Email' ) if $opts{news}; + $u->subscribe( event => 'OfficialPost', method => 'Email' ) if $opts{get_news}; $u->subscribe( event => 'JournalNewComment', journal => $u, method => 'Inbox' ); $u->subscribe( event => 'JournalNewComment', journal => $u, method => 'Email' ); $u->subscribe( event => 'AddedToCircle', journal => $u, method => 'Inbox' ); @@ -3026,6 +3020,101 @@ sub posting_access_list { } return sort { $a->{user} cmp $b->{user} } @res; +} + + +# gets the relevant communities that the user is a member of +# used to suggest communities to a person who know the user +sub relevant_communities { + my $u = shift; + + my %comms; + my @ids = $u->member_of_userids; + my $memberships = LJ::load_userids( @ids ); + + # get all communities that $u is a member of that aren't closed membership + foreach my $membershipid ( keys %$memberships ) { + my $membershipu = $memberships->{$membershipid}; + + next unless $membershipu->is_community; + next unless $membershipu->is_visible; + next if $membershipu->is_closed_membership; + + $comms{$membershipid}->{u} = $membershipu; + $comms{$membershipid}->{istatus} = 'normal'; + } + + # get usage information about comms + if ( scalar keys %comms ) { + my $comms_times = LJ::get_times_multi( keys %comms ); + foreach my $commid ( keys %comms ) { + if ( $comms_times->{created} && defined $comms_times->{created}->{$commid} ) { + $comms{$commid}->{created} = $comms_times->{created}->{$commid}; + } + if ( $comms_times->{updated} && defined $comms_times->{updated}->{$commid} ) { + $comms{$commid}->{updated} = $comms_times->{updated}->{$commid}; + } + } + } + + # prune the list of communities + # + # keep a community in the list if: + # * it was created in the past 10 days OR + # * $u is a maint or mod of it OR + # * it was updated in the past 30 days + my $over30 = 0; + my $now = time(); + + COMMUNITY: + foreach my $commid ( sort { $comms{$b}->{updated} <=> $comms{$a}->{updated} } keys %comms ) { + my $commu = $comms{$commid}->{u}; + + if ( $now - $comms{$commid}->{created} <= 60*60*24*10 ) { # 10 days + $comms{$commid}->{istatus} = 'new'; + next COMMUNITY; + } + + my @maintainers = $commu->maintainer_userids; + my @moderators = $commu->moderator_userids; + foreach my $mid ( @maintainers, @moderators ) { + if ( $mid == $u->id ) { + $comms{$commid}->{istatus} = 'mm'; + next COMMUNITY; + } + } + + if ( $over30 ) { + delete $comms{$commid}; + next COMMUNITY; + } else { + if ( $now - $comms{$commid}->{updated} > 60*60*24*30 ) { # 30 days + delete $comms{$commid}; + + # since we're going through the communities in timeupdate order, + # we know every community in %comms after this one was updated + # more than 30 days ago + $over30 = 1; + } + } + } + + # if we still have more than 20 comms, delete any with fewer than five members + # as long as it's not new and $u isn't a maint/mod + if ( scalar keys %comms > 20 ) { + foreach my $commid ( keys %comms ) { + my $commu = $comms{$commid}->{u}; + + next unless $comms{$commid}->{istatus} eq 'normal'; + + my @ids = $commu->member_userids; + if ( scalar @ids < 5 ) { + delete $comms{$commid}; + } + } + } + + return %comms; } diff -r 3941a1599503 -r 0d7ace9475cd cgi-bin/LJ/Widget/CreateAccount.pm --- a/cgi-bin/LJ/Widget/CreateAccount.pm Thu Mar 19 04:03:21 2009 +0000 +++ b/cgi-bin/LJ/Widget/CreateAccount.pm Thu Mar 19 04:21:13 2009 +0000 @@ -16,28 +16,21 @@ sub render_body { my $from_post = $opts{from_post}; my $errors = $from_post->{errors}; + my $code = LJ::trim( $get->{code} ); + my $from = LJ::trim( $get->{from} ); + my $error_msg = sub { - my $key = shift; - my $pre = shift; - my $post = shift; + my ( $key, $pre, $post ) = @_; my $msg = $errors->{$key}; return unless $msg; return "$pre $msg $post"; }; - - # hooks - LJ::run_hook('partners_registration_visited', $get->{from}); my $alt_layout = $opts{alt_layout} ? 1 : 0; my $ret; if ($alt_layout) { $ret .= "<div class='signup-container'>"; - } else { - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - - $ret .= "<div class='rounded-box-content'>"; } $ret .= $class->start_form(%{$opts{form_attr}}); @@ -49,15 +42,17 @@ sub render_body { # tip module if ($alt_layout) { - $ret .= "<script language='javascript'>\n"; + $ret .= "<script type='text/javascript'>\n"; $ret .= "CreateAccount.alt_layout = true;\n"; + $ret .= "CreateAccount.coppa_check = " . ( $LJ::COPPA_CHECK ? "true" : "false" ) . ";\n"; $ret .= "</script>\n"; } else { - $ret .= "<script language='javascript'>\n"; + $ret .= "<script type='text/javascript'>\n"; $ret .= "CreateAccount.birthdate = \"$tip_birthdate\"\n"; $ret .= "CreateAccount.email = \"$tip_email\"\n"; $ret .= "CreateAccount.password = \"$tip_password\"\n"; $ret .= "CreateAccount.username = \"$tip_username\"\n"; + $ret .= "CreateAccount.coppa_check = " . ( $LJ::COPPA_CHECK ? "true" : "false" ) . ";\n"; $ret .= "</script>\n"; $ret .= "<div id='tips_box_arrow'></div>"; $ret .= "<div id='tips_box'></div>"; @@ -75,13 +70,13 @@ sub render_body { } else { $ret .= "<tr><td class='field-name'>" . $class->ml('widget.createaccount.field.username') . "</td>\n<td>"; } - # maxlength 16, so if people don't notice that they hit the limit, + # maxlength 26, so if people don't notice that they hit the limit, # we give them a warning. (some people don't notice/proofread) $ret .= $class->html_text( name => 'user', id => 'create_user', - size => $alt_layout ? undef : 15, - maxlength => 16, + size => $alt_layout ? undef : 20, + maxlength => 26, raw => 'style="<?loginboxstyle?>"', value => $post->{user} || $get->{user}, ); @@ -260,20 +255,18 @@ sub render_body { $ret .= "<p class='terms'>"; ### TOS - if ($LJ::TOS_CHECK) { - my $tos_string = $class->ml('widget.createaccount.alt_layout.tos', { sitename => $LJ::SITENAMESHORT }); - if ($tos_string) { - $ret .= "$tos_string<br />"; - $ret .= $class->html_check( - name => 'tos', - id => 'create_tos', - value => '1', - selected => LJ::did_post() ? $post->{tos} : 0, - ); - $ret .= " <label for='create_tos' class='text'>" . $class->ml('widget.createaccount.alt_layout.field.tos') . "</label><br /><br />"; - } else { - $ret .= LJ::html_hidden( tos => 1 ); - } + my $tos_string = $class->ml( 'widget.createaccount.alt_layout.tos', { sitename => $LJ::SITENAMESHORT } ); + if ( $tos_string ) { + $ret .= "$tos_string<br />"; + $ret .= $class->html_check( + name => 'tos', + id => 'create_tos', + value => '1', + selected => LJ::did_post() ? $post->{tos} : 0, + ); + $ret .= " <label for='create_tos' class='text'>" . $class->ml( 'widget.createaccount.alt_layout.field.tos' ) . "</label><br /><br />"; + } else { + $ret .= LJ::html_hidden( tos => 1 ); } ### site news @@ -300,15 +293,22 @@ sub render_body { $ret .= "</td></tr>\n"; ### TOS - if ($LJ::TOS_CHECK) { - $ret .= "<tr valign='top'><td class='field-name'> </td>\n<td>"; - $ret .= "<p class='tos-blurb'>" . $class->ml('widget.createaccount.field.tos', { - sitename => $LJ::SITENAMESHORT, - aopts1 => "href='$LJ::SITEROOT/legal/tos.bml'", - aopts2 => "href='$LJ::SITEROOT/legal/privacy.bml'", - }) . "</p>"; - $ret .= "</td></tr>\n"; - } + $ret .= "<tr valign='top'><td class='field-name'> </td>\n<td>"; + $ret .= $class->html_check( + name => 'tos', + id => 'create_tos', + value => '1', + selected => LJ::did_post() ? $post->{tos} : 0, + ); + $ret .= " <label for='create_tos' class='text'>"; + $ret .= $class->ml( 'widget.createaccount.field.tos', { + sitename => $LJ::SITENAMESHORT, + aopts1 => "href='$LJ::SITEROOT/legal/tos.bml'", + aopts2 => "href='$LJ::SITEROOT/legal/privacy.bml'", + } ); + $ret .= "</label>"; + $ret .= $error_msg->( 'tos', '<span class="formitemFlag">', '</span><br />' ); + $ret .= "</td></tr>\n"; } ### submit button @@ -322,15 +322,13 @@ sub render_body { $ret .= "</table>\n" unless $alt_layout; + $ret .= $class->html_hidden( from => $from ) if $from; + $ret .= $class->html_hidden( code => $code ) if $LJ::USE_ACCT_CODES; + $ret .= $class->end_form; if ($alt_layout) { $ret .= "</div>"; - } else { - $ret .= "</div>"; - - $ret .= "</div></div></div></div>"; - $ret .= "</div></div></div></div>"; } return $ret; @@ -341,7 +339,6 @@ sub handle_post { my $post = shift; my %opts = @_; - my $get = $opts{get}; my %from_post; my $remote = LJ::get_remote(); my $alt_layout = $opts{alt_layout} ? 1 : 0; @@ -380,6 +377,22 @@ sub handle_post { my $second_submit = 0; my $error = LJ::CreatePage->verify_username($post->{user}, post => $post, second_submit_ref => \$second_submit ); $from_post{errors}->{username} = $error if $error; + + # validate code + my $code = LJ::trim( $post->{code} ); + if ( $LJ::USE_ACCT_CODES ) { + my $u = LJ::load_user( $post->{user} ); + my $userid = $u ? $u->id : 0; + if ( DW::InviteCodes->check_code( code => $code, userid => $userid ) ) { + $from_post{code_valid} = 1; + } else { + my $r = DW::Request->get; + my $args = $r->query_string; + my $querysep = $args ? "?" : ""; + my $uri = "$LJ::SITEROOT/create.bml" . $querysep . $args; + return BML::redirect( $uri ); + } + } $post->{password1} = LJ::trim($post->{password1}); $post->{password2} = LJ::trim($post->{password2}); @@ -474,9 +487,7 @@ sub handle_post { } # check TOS agreement - if ($LJ::TOS_CHECK && $alt_layout) { - $from_post{errors}->{tos} = $class->ml('widget.createaccount.alt_layout.error.tos') unless $post->{tos}; - } + $from_post{errors}->{tos} = $class->ml( 'widget.createaccount.alt_layout.error.tos' ) unless $post->{tos}; # create user and send email as long as the user didn't double-click submit # (or they tried to re-create a purged account) @@ -488,8 +499,8 @@ sub handle_post { bdate => $bdate, email => $email, password => $post->{password1}, - get_ljnews => $post->{news}, - inviter => $get->{from}, + get_news => $post->{news} ? 1 : 0, + inviter => $post->{from}, underage => $is_underage, ofage => $ofage, extra_props => $opts{extra_props}, @@ -533,7 +544,7 @@ sub handle_post { }); } - if ($LJ::TOS_CHECK) { + if ( $LJ::TOS_CHECK ) { my $err = ""; $nu->tosagree_set(\$err) or return LJ::bad_input($err); @@ -541,9 +552,11 @@ sub handle_post { $nu->make_login_session; - # Default new accounts to Plus level - $nu->add_to_class('plus'); - $nu->set_prop("create_accttype", "plus"); + # we're all done; mark the invite code as used + if ( $LJ::USE_ACCT_CODES && $code ) { + my $invitecode = DW::InviteCodes->new( code => $code ); + $invitecode->use_code( user => $nu ); + } my $stop_output; my $body; @@ -560,8 +573,7 @@ sub handle_post { $redirect = LJ::run_hook('rewrite_redirect_after_create', $nu); return BML::redirect($redirect) if $redirect; - my $url = LJ::ab_testing_value() == 0 ? "step2a.bml" : "step2b.bml"; - return BML::redirect("$LJ::SITEROOT/create/$url$opts{getextra}"); + return BML::redirect( "$LJ::SITEROOT/create/setup.bml" ); } return %from_post; diff -r 3941a1599503 -r 0d7ace9475cd cgi-bin/LJ/Widget/CreateAccountNextSteps.pm --- a/cgi-bin/LJ/Widget/CreateAccountNextSteps.pm Thu Mar 19 04:03:21 2009 +0000 +++ b/cgi-bin/LJ/Widget/CreateAccountNextSteps.pm Thu Mar 19 04:21:13 2009 +0000 @@ -11,10 +11,6 @@ sub render_body { my %opts = @_; my $ret; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - - $ret .= "<div class='rounded-box-content'>"; $ret .= "<h2>" . $class->ml('widget.createaccountnextsteps.title') . "</h2>"; $ret .= "<p class='intro'>" . $class->ml('widget.createaccountnextsteps.steps', { sitename => $LJ::SITENAMESHORT }) . "</p>"; @@ -24,15 +20,10 @@ sub render_body { $ret .= "<li><a href='$LJ::SITEROOT/editpics.bml'>" . $class->ml('widget.createaccountnextsteps.steps.userpics') . "</a></li>"; $ret .= "<li><a href='$LJ::SITEROOT/interests.bml'>" . $class->ml('widget.createaccountnextsteps.steps.find') . "</a></li>"; $ret .= "</ul></td><td><ul>"; - $ret .= "<li><a href='$LJ::SITEROOT/explore/'>" . $class->ml('widget.createaccountnextsteps.steps.explore', { sitenameabbrev => $LJ::SITENAMEABBREV }) . "</a></li>"; $ret .= "<li><a href='$LJ::SITEROOT/customize/'>" . $class->ml('widget.createaccountnextsteps.steps.customize') . "</a></li>"; $ret .= "<li><a href='$LJ::SITEROOT/manage/profile/'>" . $class->ml('widget.createaccountnextsteps.steps.profile') . "</a></li>"; $ret .= "</ul></td></tr>"; $ret .= "</table>"; - $ret .= "</div>"; - - $ret .= "</div></div></div></div>"; - $ret .= "</div></div></div></div>"; return $ret; } diff -r 3941a1599503 -r 0d7ace9475cd cgi-bin/LJ/Widget/CreateAccountProfile.pm --- a/cgi-bin/LJ/Widget/CreateAccountProfile.pm Thu Mar 19 04:03:21 2009 +0000 +++ b/cgi-bin/LJ/Widget/CreateAccountProfile.pm Thu Mar 19 04:21:13 2009 +0000 @@ -11,27 +11,19 @@ sub render_body { my %opts = @_; my $u = LJ::get_effective_remote(); + my $post = $opts{post}; my $from_post = $opts{from_post}; my $errors = $from_post->{errors}; - my $ab_testing_value = LJ::ab_testing_value(); - my $post; - $post = $class->post_fields($opts{post}); my $loc_post = LJ::Widget->post_fields_of_widget("Location"); my $error_msg = sub { - my $key = shift; - my $pre = shift; - my $post = shift; + my ( $key, $pre, $post ) = @_; my $msg = $errors->{$key}; return unless $msg; return "$pre $msg $post"; }; my $ret; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - - $ret .= "<div class='rounded-box-content'>"; $ret .= "<h2>" . $class->ml('widget.createaccountprofile.title') . "</h2>"; $ret .= "<p>" . $class->ml('widget.createaccountprofile.info') . "</p>"; @@ -56,7 +48,7 @@ sub render_body { $ret .= "<tr valign='middle'><td class='field-name'>" . $class->ml('widget.createaccountprofile.field.gender') . "</td>\n<td>"; $ret .= $class->html_select( name => 'gender', - selected => $post->{gender} || $u->prop('gender'), + selected => $post->{gender} || $u->prop( 'gender' ) || 'U', list => [ F => LJ::Lang::ml('/manage/profile/index.bml.gender.female'), M => LJ::Lang::ml('/manage/profile/index.bml.gender.male'), @@ -67,16 +59,8 @@ sub render_body { $ret .= $error_msg->('gender', '<br /><span class="formitemFlag">', '</span>'); $ret .= "</td></tr>\n"; - ### location - my %countries; - LJ::load_codes({ "country" => \%countries}); - my $defalt_country; - if ($LJ::USE_IPMAP) { - $defalt_country = LJ::LJcom::get_ipmap()->Resolve(LJ::get_remote_ip()); - undef $defalt_country unless $countries{$defalt_country}; - } $ret .= "<tr valign='middle'><td class='field-name'>" . $class->ml('widget.createaccountprofile.field.location') . "</td>\n<td>"; - $ret .= LJ::Widget::Location->render( country => $defalt_country, minimal_display => 1, skip_timezone => 1 , $loc_post); + $ret .= LJ::Widget::Location->render( minimal_display => 1, skip_timezone => 1, $loc_post ); $ret .= "</td></tr>\n"; $ret .= "</table><br />\n"; @@ -160,7 +144,7 @@ sub render_body { if (LJ::text_in($u->bio)) { $ret .= $class->html_textarea( name => 'bio', - rows => $ab_testing_value == 0 ? 3 : 7, + rows => 7, cols => 75, wrap => "soft", value => $bio, @@ -173,10 +157,6 @@ sub render_body { # hidden field to know if JS is on or not $ret .= $class->html_hidden({ name => "js_on", value => 0, id => "js_on" }); - $ret .= "</div>"; - - $ret .= "</div></div></div></div>"; - $ret .= "</div></div></div></div>"; return $ret; } diff -r 3941a1599503 -r 0d7ace9475cd cgi-bin/LJ/Widget/CreateAccountProgressMeter.pm --- a/cgi-bin/LJ/Widget/CreateAccountProgressMeter.pm Thu Mar 19 04:03:21 2009 +0000 +++ b/cgi-bin/LJ/Widget/CreateAccountProgressMeter.pm Thu Mar 19 04:21:13 2009 +0000 @@ -10,8 +10,10 @@ sub render_body { my $class = shift; my %opts = @_; + my $u = LJ::get_effective_remote(); + my $given_step = $opts{step} || 1; - my @steps_to_show = LJ::ab_testing_value() == 0 ? (1, 2, 4) : (1..4); + my @steps_to_show = $given_step > 1 && $u && $u->get_cap( 'paid' ) ? ( 1, 2, 4 ) : ( 1..4 ); my $ret; @@ -26,8 +28,8 @@ sub render_body { my $active = $step == $given_step ? "active" : "inactive"; $ret .= "<td class='step$css_class'>"; - $ret .= "<img src='$LJ::IMGPREFIX/create/numbers-$active/$count.gif' alt='$count' align='absmiddle' /> "; - $ret .= $class->ml("widget.createaccountprogressmeter.step$step"); + $ret .= "<div class='step-block-$active'>$count</div>"; + $ret .= "<div class='step-block-text'>" . $class->ml( "widget.createaccountprogressmeter.step$step" ) . "</div>"; $ret .= "</td>"; $count++; diff -r 3941a1599503 -r 0d7ace9475cd cgi-bin/LJ/Widget/CreateAccountTheme.pm --- a/cgi-bin/LJ/Widget/CreateAccountTheme.pm Thu Mar 19 04:03:21 2009 +0000 +++ b/cgi-bin/LJ/Widget/CreateAccountTheme.pm Thu Mar 19 04:21:13 2009 +0000 @@ -15,10 +15,6 @@ sub render_body { my $current_theme = LJ::Customize->get_current_theme($u); my $ret; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - $ret .= "<div class='rounded-box'><div class='rounded-box-tr'><div class='rounded-box-bl'><div class='rounded-box-br'>"; - - $ret .= "<div class='rounded-box-content'>"; $ret .= "<h2>" . $class->ml('widget.createaccounttheme.title') . "</h2>"; $ret .= "<p>" . $class->ml('widget.createaccounttheme.info') . "</p>"; @@ -53,10 +49,6 @@ sub render_body { $count++; } $ret .= "</table>\n"; - $ret .= "</div>"; - - $ret .= "</div></div></div></div>"; - $ret .= "</div></div></div></div>"; return $ret; } diff -r 3941a1599503 -r 0d7ace9475cd doc/config-local.pl.txt --- a/doc/config-local.pl.txt Thu Mar 19 04:03:21 2009 +0000 +++ b/doc/config-local.pl.txt Thu Mar 19 04:21:13 2009 +0000 @@ -104,6 +104,13 @@ # various PayPal related events email => $DW::PRIVATE::PAYPAL{email}, ); + + # if you define these, little help bubbles appear next to common + # widgets to the URL you define: + %HELPURL = ( + paidaccountinfo => "#", + ); + } 1; diff -r 3941a1599503 -r 0d7ace9475cd doc/raw/memcache-keys.txt --- a/doc/raw/memcache-keys.txt Thu Mar 19 04:03:21 2009 +0000 +++ b/doc/raw/memcache-keys.txt Thu Mar 19 04:21:13 2009 +0000 @@ -155,3 +155,5 @@ pop_interests == array of interest keywo pop_interests == array of interest keywords and counts poll:<pollid> = arrayref of poll properties, see cgi-bin/LJ/Poll.pm for details (section under "use base 'LJ::MemCacheable'") + +invite_code_try_ip:<ip> = stores a value of 1 for the IP address of the person who tried an invalid invite code (for rate limiting) diff -r 3941a1599503 -r 0d7ace9475cd etc/config.pl --- a/etc/config.pl Thu Mar 19 04:03:21 2009 +0000 +++ b/etc/config.pl Thu Mar 19 04:21:13 2009 +0000 @@ -54,21 +54,6 @@ syndicated => 'journal', cssproxy => 'cssproxy', ); - - # if you define these, little help bubbles appear next to common - # widgets to the URL you define: - %HELPURL = ( - #"accounttype" => "", - #"renaming" => "$SITEROOT/support/faqbrowse.bml?faqid=25", - #"security" => "$SITEROOT/support/faqbrowse.bml?faqid=24", - #"noautoformat" => "$SITEROOT/support/faqbrowse.bml?faqid=26", - #"userpics" => "$SITEROOT/support/faqbrowse.bml?faqid=46", - #"iplogging" => "$SITEROOT/support/faqbrowse.bml?faqid=66", - #"s2propoff" => '$SITEROOT/support/faqbrowse.bml?faqid=145', - #"userpic_inactive" => "$SITEROOT/support/faqbrowse.bml?faqid=46", - #"textmessaging_about" => "$SITEROOT/support/faqbrowse.bml?faqid=30", - #"linklist_support" => "$SITEROOT/customize/options.bml?group=linkslist", - ); diff -r 3941a1599503 -r 0d7ace9475cd htdocs/create.bml --- a/htdocs/create.bml Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/create.bml Thu Mar 19 04:21:13 2009 +0000 @@ -1,798 +1,68 @@ -<?page -title=><?_code BML::ml('.title_1', { 'siteabbr' => $LJ::SITENAMEABBREV}); _code?> -head<= -<?_code - return $head; -_code?> - -<script language="javascript"> -<!--// -function tblhilite(tbl, styname) { - tbl.className = styname; -} -// --> -</script> -<=head +<?_c +# +# /create.bml +# +# This is the first and main page in the account creation flow. It lets you +# type in an account creation code and then create your account. +# +# Authors: +# Janine Costanzo <janine@netrophic.com> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# +_c?><?page body<= <?_code +{ + use strict; + use vars qw(%GET %POST $title $headextra @errors @warnings); - my $crumb = $LJ::IS_SSL ? 'securecreatejournal_1' : 'createjournal_1'; - LJ::set_active_crumb($crumb); + $title = BML::ml( '.title', { sitename => $LJ::SITENAMESHORT } ); - return LJ::server_down_html() if ($LJ::SERVER_DOWN); + my @getargs; + push @getargs, "from=$GET{from}" if $GET{from}; + push @getargs, "user=$GET{user}" if $GET{user}; + my $getextra = '?' . join( '&', @getargs ) if @getargs; - return "<?badinput?>" unless LJ::text_in(\%POST); + if ( $LJ::USE_SSL && !$LJ::IS_SSL && $GET{ssl} ne 'no' ) { + return BML::redirect( "$LJ::SSLROOT/create.bml$getextra" ); + } - my $mode = $POST{'mode'}; - my $code = $POST{'code'} || $GET{'code'}; + my %from_post; + my $code_valid = $LJ::USE_ACCT_CODES ? 0 : 1; + if ( LJ::did_post() ) { + LJ::Widget->use_specific_form_fields( post => \%POST, widget => "CreateAccount", fields => [ qw( recaptcha_response_field recaptcha_challenge_field ) ] ) + if $LJ::HUMAN_CHECK{create} && LJ::is_enabled( 'recaptcha' ); + %from_post = LJ::Widget->handle_post( \%POST, ( 'CreateAccount' ) ); + } elsif ( $LJ::USE_ACCT_CODES ) { + $code_valid = DW::InviteCodes->check_code( code => LJ::trim( $GET{code} ) ); + } - my @getargs; - push @getargs,"from=$GET{from}" if $GET{from}; - push @getargs,"user=$GET{user}" if $GET{user}; - my $getextra = '?' . join('&', @getargs) if @getargs; + my $ret; - if ($LJ::USE_SSL && ! $LJ::IS_SSL && $FORM{'ssl'} ne "no") { - return BML::redirect("$LJ::SSLROOT/create.bml$getextra"); - } + $ret .= "<div id='create-page'>"; + $ret .= LJ::Widget::CreateAccountProgressMeter->render( step => 1 ); + if ( !$code_valid && !$from_post{code_valid} ) { + $ret .= LJ::Widget::CreateAccountEnterCode->render( get => \%GET ); + } else { + $ret .= LJ::Widget::CreateAccount->render( + post => LJ::Widget::CreateAccount->post_fields( \%POST ), + get => \%GET, + from_post => \%from_post, + ); + } + $ret .= "</div>"; - # with no mode, decide which screen the user sees first, based - # on whether or not this LJ installation lets in free users - if ($mode eq "") { - $mode = $LJ::USE_ACCT_CODES ? - ($code ? "codesubmit" : "entercode") - : "getinfo"; - } - - my $remote = LJ::get_remote(); - - my %errors; - my $error_msg = sub { - my $key = shift; - my $pre = shift; - my $post = shift; - my $msg = $errors{$key}; - return unless $msg; - return "$pre $msg $post"; - }; - - # Flag to indicate they've submitted with 'audio' as the answer to the spambot - # challenge. - my $wants_audio = 0; - - # Captcha id - my ($capid, $anum); - - # validate a code they've entered and throw them back to entercode - # mode if it's invalid - if ($code && $mode eq "submit" || # account codes turned off, but one specified anyway - $LJ::USE_ACCT_CODES && ($mode eq "codesubmit" || $mode eq "submit")) # account codes required - { - my $userid = 0; # acceptable userid for double-click protection - if ($mode eq "submit") { - my $u = LJ::load_user($POST{'user'}); - $userid = $u->{userid}; - } - my $valid = DW::InviteCodes->check_code( code => $code, userid => $userid ); - - if ( !$valid ) { - $mode = "entercode"; - $errors{code} = $ML{'.error.code.invalid'}; - } elsif ( $valid && $mode eq "codesubmit" ) { - $mode = "getinfo"; - } - } - - # MODE: entercode - enter an account code to proceed making an account - if ($LJ::USE_ACCT_CODES && $mode eq "entercode") - { - my $ret; - my $v; - - $ret .= "<form method=\"post\" action=\"create.bml\">\n"; - $ret .= LJ::html_hidden(mode => 'codesubmit', - ssl => $FORM{'ssl'}); - - $ret .= "<?h1 $ML{'.useacctcodes.welcome'} h1?><?p $ML{'.useacctcodes.entercode'} p?>"; - - $v = LJ::ehtml($code); - $ret .= "<?standout Code: <input type=\"text\" name=\"code\" value=\"$v\" size=\"21\" maxlength=\"20\"> <input type=\"submit\" value=\"$ML{'.btn.proceed'}\">"; - $ret .= $error_msg->('code', '<br>'); - $ret .= " standout?>"; - $ret .= "</form>\n"; - - open (REM, "$LJ::HOME/htdocs/inc/account-codes"); - while (<REM>) { - $ret .= $_; - } - close REM; - - return $ret; - } - -# MODE: submit - if they've given 'audio' as the answer to the spambot-blocker, -# reset the mode to 'getinfo' and set the audio flag -if ( $LJ::HUMAN_CHECK{create} && $mode eq 'submit' && lc($POST{answer}) eq 'audio' ) -{ - $mode = 'getinfo'; - $wants_audio = 1; + return $ret; } - - # MODE: submit - try to create an account. might change mode - # if there are errors, we'll populate %errors and - # return to "getinfo" mode below - SUBMIT: - while ($mode eq "submit") # using while instead of if so we can 'last' out of it - { - return "<b>$ML{'Error'}</b>: $ML{'.error.postrequired'}" unless LJ::did_post(); - - my $user = LJ::canonical_username($POST{'user'}); - my $email = LJ::trim(lc($POST{'email'})); - - # setup global things that can be used to modify the user later - my $is_underage = 0; # turn on if the user should be marked as underage - my $ofage = 0; # turn on to note that the user is over 13 in actuality - # (but is_underage might be on which just means that their - # account is being marked as underage--even if they're old - # enough [unique cookie check]) - - # reject this email? - return LJ::sysban_block(0, "Create user blocked based on email", - { 'new_user' => $user, 'email' => $email, 'name' => $user }) - if LJ::sysban_check('email', $email); - - my $dbh = LJ::get_db_writer(); - - if (length($user) > 25) { - $errors{'username'} = "$ML{'error.usernamelong'}"; - } - if ($POST{'user'} && ! $user) { - $errors{'username'} = "$ML{'error.usernameinvalid'}"; - } - unless ($POST{'user'}) { - $errors{'username'} = "$ML{'.error.username.mustenter'}"; - } - - - $errors{username} = $ML{'.error.username.reserved'} - if LJ::User->is_protected_username( $user ); - - # see if they're confused and entered a valid account code - # for their username (happens often) - if ($LJ::USE_ACCT_CODES && $user =~ /^.....a[ab].....$/) { - # see if the acctcode is valid and unused - my ($acid, $auth) = DW::InviteCodes->decode( $user ); - my $is_valid = $dbh->selectrow_array("SELECT COUNT(*) FROM acctcode ". - "WHERE acid=? AND rcptid=0", - undef, $acid); - $errors{'username'} = "$ML{'.error.username.iscode'}" - if $is_valid; - } - - my $u = LJ::load_user($user); - my $second_submit = 0; - - # do not create if this account name is purged - if ($u && $u->{'statusvis'} eq "X") { - $errors{'username'} = BML::ml('.error.username.purged', - {'aopts' => 'href="/rename/"'} ); - } elsif ($u) { - my $in_use = 1; - - if ($u->{'email'} eq $POST{'email'}) { - if (LJ::login_ip_banned($u)) { - # brute-force possible going on - } else { - if ($u->{'password'} eq $POST{'password1'}) { - # okay either they double-clicked the submit button - # or somebody entered an account name that already exists - # with the existing password - $second_submit = 1; - $in_use = 0; - } else { - LJ::handle_bad_login($u); - } - } - } - - if ($in_use) { - $errors{'username'} = "$ML{'.error.username.inuse'}"; - } - } - - $POST{'password1'} = LJ::trim($POST{'password1'}); - $POST{'password2'} = LJ::trim($POST{'password2'}); - - if ($POST{'password1'} ne $POST{'password2'}) { - $errors{'password'} = "$ML{'.error.password.nomatch'}"; - } else { - my $checkpass = LJ::run_hook("bad_password", - { - 'user' => $user, - 'email' => $email, - 'password' => $POST{'password1'}, - }); - if ($checkpass) { - $errors{'password'} = "Bad password: $checkpass"; - } - } - if (! $POST{'password1'}) { - $errors{'password'} = "$ML{'.error.password.blank'}"; - } elsif (length $POST{'password1'} > 30) { - $errors{'password'} = "$ML{'password.max30'}"; - } - - unless (LJ::is_ascii($POST{'password1'})) { - $errors{'password'} = "$ML{'.error.password.asciionly'}"; - } - - ### start COPPA_CHECK - # age checking to determine how old they are - if ($LJ::COPPA_CHECK) { - my $uniq; - if ($LJ::UNIQ_COOKIES) { - $uniq = BML::get_request()->notes('uniq'); - if ($uniq) { - my $timeof = $dbh->selectrow_array('SELECT timeof FROM underage WHERE uniq = ?', undef, $uniq); - $is_underage = 1 if $timeof && $timeof > 0; - } - } - - my ($year, $mon, $day) = ( $POST{"bday_yyyy"}+0, $POST{"bday_mm"}+0, $POST{"bday_dd"}+0 ); - if ($year < 100 && $year > 0) { - $POST{'bday_yyyy'} += 1900; - $year += 1900; - } - - # get current time - my ($nday, $nmon, $nyear) = (gmtime())[3, 4, 5]; - $nyear += 1900; - $nmon += 1; - - # require dates in the 1900s (or beyond) - if ($year && $mon && $day && $year >= 1900 && $year < $nyear) { - # now see how many years back they are - my $ofageyear = $year + 13; - if ($ofageyear > $nyear) { - $is_underage = 1; - } elsif ($ofageyear == $nyear) { - # years match, see if they were born after this month - if ($mon > $nmon) { - $is_underage = 1; - } elsif ($mon == $nmon) { - # now check the day - if ($day > $nday) { - $is_underage = 1; - } else { - $ofage = 1; - } - } else { - $ofage = 1; - } - } else { - $ofage = 1; - } - } else { - $errors{'bday'} = "$ML{'.error.birthday.invalid'}"; - } - - # note this unique cookie as underage (if we have a unique cookie) - if ($is_underage && $uniq) { - $dbh->do("REPLACE INTO underage (uniq, timeof) VALUES (?, UNIX_TIMESTAMP())", undef, $uniq); - } - } - ### end COPPA_CHECK - - if ($LJ::TOS_CHECK && ! $POST{'agree_tos'}) { - $errors{'agree_tos'} = $ML{'tos.error'}; - } - - # check the email address - { - my @email_errors; - LJ::check_email($email, \@email_errors); - if ($LJ::USER_EMAIL and $email =~ /\@\Q$LJ::USER_DOMAIN\E$/i) { - push @email_errors, BML::ml(".error.email.lj_domain", - {domain => $LJ::USER_DOMAIN}); - } - $errors{'email'} = join(", ", @email_errors) if @email_errors; - } - - # Check the turing test answer if it's turned on - if ($LJ::HUMAN_CHECK{create}) { - ($capid, $anum) = LJ::Captcha::session_check_code($POST{captcha_chal}, $POST{answer}); - $errors{'captcha'} = $ML{'.captcha.invalid'} unless $capid && $anum; - } - last SUBMIT if %errors; - - my $clusterid = ($LJ::DEBUG{'allow_cluster_select'} - ? $POST{'cluster_id'} - : LJ::new_account_cluster()) + 0; - die "Cluster 0 not supported" unless $clusterid; - - my $userid = $u ? $u->{'userid'}+0 : 0; - - # create user and send email as long as the user didn't double-click submit - # (or they tried to re-create a purged account) - unless ($second_submit) { - my $bdate = sprintf("%04d-%02d-%02d", $POST{bday_yyyy}, $POST{bday_mm}, $POST{bday_dd}); - - my $nu = LJ::User->create_personal( - 'user' => $user, - 'bdate' => $bdate, - 'email' => $email, - 'password' => $POST{password1}, - 'get_ljnews' => $POST{news}, - 'underage' => $is_underage, - 'ofage' => $ofage, - ); - return "There was an error creating your account." unless $nu; - - # Mark the turing test for deletion - if ($LJ::HUMAN_CHECK{create}) { - LJ::Captcha::expire($capid, $anum, $nu->id); - } - - # if we're using account codes on this site, mark the code as used - if ($code) { - my $invitecode = DW::InviteCodes->new( code => $code ); - $invitecode->use_code( user => $nu ); - } - - # just do watch on initial friends since they will almost certainly not be personal journals - # if they are personal journals, we probably don't want to trust them anyway - foreach my $friend (@LJ::INITIAL_OPTIONAL_FRIENDS) { - my $friendu = LJ::load_user( $friend ); - $nu->add_edge( $friendu, watch => { nonotify => 1 } ) if $friendu && $POST{"initial_optional_friend_$friend"}; - } - - # Mark the turing test for deletion - if ($LJ::HUMAN_CHECK{create}) { - LJ::Captcha::expire($capid, $anum, $nu->id); - } - - # send welcome mail... unless they're underage - unless ($is_underage) { - my $aa = LJ::register_authaction($nu->id, "validateemail", $email); - - my $body = BML::ml('email.newacct4.body', { - "sitename" => $LJ::SITENAME, - "regurl" => "$LJ::SITEROOT/confirm/$aa->{'aaid'}.$aa->{'authcode'}", - "journal_base" => $nu->journal_base, - "username" => $nu->user, - "siteroot" => $LJ::SITEROOT, - "sitenameshort" => $LJ::SITENAMESHORT, - "lostinfourl" => "$LJ::SITEROOT/lostinfo.bml", - "editprofileurl" => "$LJ::SITEROOT/manage/profile/", - "searchinterestsurl" => "$LJ::SITEROOT/interests.bml", - "editpicsurl" => "$LJ::SITEROOT/editpics.bml", - "customizeurl" => "$LJ::SITEROOT/customize/style.bml", - "postentryurl" => "$LJ::SITEROOT/update.bml", - }); - - LJ::send_mail({ - 'to' => $email, - 'from' => $LJ::ADMIN_EMAIL, - 'fromname' => $LJ::SITENAME, - 'charset' => 'utf-8', - 'subject' => BML::ml('email.newacct.subject', {'sitename' => $LJ::SITENAME}), - 'body' => $body, - }); - } - - # If they were invited then add trust and/or watch and do joins - # Needed to do this after we load the $nu object - if ($POST{from}) { - my $ivf = LJ::load_user($POST{from}); - my $friend_trust = $POST{"inviter_trust_$ivf->{user}"}; - my $friend_watch = $POST{"inviter_watch_$ivf->{user}"}; - - $nu->add_edge( $ivf, trust => {} ) - if $friend_trust; - $nu->add_edge( $ivf, watch => {} ) - if $friend_watch; - - my @ijoins; - foreach (split(',', $POST{inviter_joins})) { - # Join the comm and add to friends list - next unless $POST{"inviter_join_$_"}; - - push @ijoins, $_; - - my $ci = LJ::get_community_row($_); - next unless $ci; - if ($ci->{membership} eq 'open') { - LJ::join_community($nu->id, $_, 1); - } else { - my $cu = LJ::load_userid($_); - next unless $cu && $nu; - - LJ::comm_join_request($cu, $nu); - $nu->add_edge( $cu, watch => {} ); - } - } - - # Log who invited them - my $ijoinsstr = join(',', @ijoins); - LJ::statushistory_add($nu->id, $ivf->{userid}, 'create_from_invite', - "Recommended: $POST{inviter_joins}\nJoined: $ijoinsstr"); - LJ::set_rel( $nu, $ivf, "I" ); - - # Send the inviter an email - LJ::Event::InvitedFriendJoins->new( $ivf, $nu )->fire; - } - - if ($LJ::TOS_CHECK) { - my $err = ""; - $nu->tosagree_set(\$err) - or return LJ::bad_input($err); - } - - $nu->make_login_session; - - # local sites may want to override what happens at this point - my $redirect = undef; - my $stop_output; - LJ::run_hooks("create.bml_postsession", { - post => \%POST, - u => $nu, - redirect => \$redirect, - ret => \$ret, - stop_output => \$stop_output, - }); - return BML::redirect($redirect) if $redirect; - return $ret if $stop_output; - - return BML::redirect("$LJ::SITEROOT/newuser.bml"); - } - - } - - if ($mode eq "getinfo" || %errors) - { - my $ret; - my $v; - - if (%errors) { - my @errors_order = ('code', 'username', 'email', 'password', 'agree_tos', 'captcha', 'invalidform'); - my %errors_def; - $errors_def{$_} = 1 for @errors_order; - foreach my $key (keys %errors) { push @errors_order, $key unless $errors_def{$key}; } - $ret .= "<?standout <strong>$ML{'.errors.label'}</strong><ul><li>"; - $ret .= join ("</li><li>", grep { $_ } map { $errors{$_} } @errors_order); - $ret .= "</li></ul> standout?>"; - } - - $ret .= "<?p $ML{'.create.text_1'} " . - BML::ml('.community', { aopts => "href='$LJ::SITEROOT/community/create.bml'" }) . - " p?>" unless %errors; - $ret .= "<form action=\"create.bml\" method=\"post\">\n"; - $ret .= LJ::html_hidden(mode => 'submit', - code => $code, - ssl => $FORM{'ssl'}); - - $ret .= "<ol>"; - - ### username - $v = LJ::ehtml($FORM{'user'}); - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.username.box.head'}</div>"; - $ret .= $error_msg->('username', '<p class="formitemFlag">', '</p>'); - $ret .= "<div class='formitemDesc'>" . - BML::ml(".username.text_1", {'sitename' => $LJ::SITENAME, - 'lc_sitename' => lc($LJ::SITENAME) }) - . "</div>"; - $ret .= LJ::html_text({'name' => 'user', 'size' => 15, 'maxlength' => 25, 'value' => $v, raw => 'style="<?loginboxstyle?>"' }); - $ret .= " ($ML{'.username.maxchars'})<br />\n"; - $ret .= "<div class='formitemNote'>$ML{'.username.charsallowed_1'}</div>" if (!%errors || exists $errors{'username'}); - $ret .= "</div></li>"; - - ### email address - $v = LJ::ehtml($FORM{'email'}); - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.email.input.head'}</div>"; - $ret .= $error_msg->('email', '<p class="formitemFlag">', '</p>'); - $ret .= "<div class='formitemDesc'>" . BML::ml('.email.text_1', { - aopts => "target='_new' href='$LJ::SITEROOT/legal/privacy.bml'", - }) . "</div>"; - $ret .= LJ::html_text({'name' => 'email', 'size' => 40, 'maxlength' => 50, 'value' => $v,}); - $ret .= "</div></li>"; - - # Password - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.password.input.head1'}</div>\n"; - $ret .= $error_msg->('password', '<p class="formitemFlag">', '</p>'); - $ret .= "<div class='formitemFlag'>$ML{'.password.secure'}</div>" if exists $errors{'password'}; - $ret .= "<div style='float: left;'><div class='formitemDesc'>$ML{'.password.text'}</div>\n<div>"; - my $pass_value = $errors{'password'} ? "" : $POST{'password1'}; - $ret .= LJ::html_text({'name' => 'password1', 'size' => 30, 'maxlength' => 31, 'type' => "password", - value => $pass_value, }); - $ret .= "</div><div class='formitemDesc'>$ML{'.password.input.head2'}</div>\n<div>"; - $ret .= LJ::html_text({'name' => 'password2', 'size' => 30, 'maxlength' => 31, 'type' => "password", - value => $pass_value, }); - $ret .= "</div></div><div class='formitemNote' style='float: left; margin-left: 20px; width: 340px'>\n"; - unless ($LJ::NO_PASSWORD_CHECK) { - $ret .= BML::ml('.password.secure_1', - { aopts => "target='_new' href='$LJ::HELPURL{secure_password}'"}); - $ret .= "<ul style='margin-left: 20px; padding-left: 0px;'>"; - $ret .= "<li>$ML{'.password.secure.pt1'}</li>\n"; - $ret .= "<li>$ML{'.password.secure.pt2'}</li>\n"; - $ret .= "<li>$ML{'.password.secure.pt3'}</li>\n"; - $ret .= "<li>$ML{'.password.secure.pt4'}</li>\n</ul>\n"; - } - $ret .= "</div><div style='clear: both'></div></li>"; - - if (@LJ::INITIAL_OPTIONAL_FRIENDS) { - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.initialfriends.heading'}</div>"; - $ret .= "<div class='formitemDesc'>$ML{'.initialfriends'}</div>"; - $ret .= "<div>"; - foreach my $friend (@LJ::INITIAL_OPTIONAL_FRIENDS) { - my $selected = LJ::did_post() ? $POST{"initial_optional_friend_$friend"} : - (grep { $_ eq $friend } @LJ::INITIAL_OPTOUT_FRIENDS); - - $ret .= LJ::html_check({'name' => "initial_optional_friend_$friend", - 'value' => 1, - 'selected' => $selected, - 'id' => "optfriend_$friend", - }); - $ret .= "<label for='optfriend_$friend'>" . - LJ::ljuser($friend) . " " . $ML{".initial.friend.$friend"} . - "</label><br />"; - } - $ret .= "</div></div></li>"; - } - - - # Was this person invited by another user? If so, - # then show interface to add inviter as friend as - # well as 10ish communities they are a member of - my $ifrom = LJ::did_post() ? $POST{from} : $GET{from}; - my $inviter; - $inviter = LJ::load_user($ifrom) - if $ifrom; - - if ($inviter) { - $ret .= "<li><div class='formitem'><div class='formitemName'>Your friend " . LJ::ljuser($inviter) . " welcomes you to "; - $ret .= "$LJ::SITENAMESHORT</div>"; - - $ret .= "<div>"; - - $ret .= LJ::html_hidden('from', $inviter->{user}); - - $ret .= LJ::html_check({ name => "inviter_trust_$inviter->{user}", - value => 1, - selected => LJ::did_post() ? $POST{"inviter_trust_$inviter->{user}"} : 1, - id => "inviter_trust_$inviter->{user}", - }); - $ret .= "<label for='inviter_trust_$inviter->{user}'>" . - 'add ' . LJ::ljuser($inviter->{user}) . ' to your access list' . - "</label><br />"; - - $ret .= LJ::html_check({ name => "inviter_watch_$inviter->{user}", - value => 1, - selected => LJ::did_post() ? $POST{"inviter_watch_$inviter->{user}"} : 1, - id => "inviter_watch_$inviter->{user}", - }); - $ret .= "<label for='inviter_watch_$inviter->{user}'>" . - 'add ' . LJ::ljuser($inviter->{user}) . ' to your subscriptions' . - "</label><br />"; - - my %comms; - unless ($POST{inviter_joins}) { - # Load their community memberships - my @ids = $inviter->member_of_userids; - my %memberships; - LJ::load_userids_multiple([ map { $_ => \$memberships{$_} } @ids ]); - - foreach my $ulocal (values %memberships) { - next unless $ulocal->{'statusvis'} eq 'V'; - next unless $ulocal->{'journaltype'} eq 'C'; - - # TODO: This is bad if they belong to a lot of communities, - # is a db query to global each call - my $ci = LJ::get_community_row($ulocal); - next if $ci->{'membership'} eq 'closed'; - - # Add to %comms - $ulocal->{istatus} = 'normal'; - $comms{$ulocal->{userid}} = $ulocal; - } - - # Get usage information about comms - if (%comms) { - my $ids = join(',', map { $_->{userid} } values %comms); - - my $dbr = LJ::get_db_reader; - my $sth = $dbr->prepare("SELECT UNIX_TIMESTAMP(timeupdate), UNIX_TIMESTAMP(timecreate), userid ". - "FROM userusage WHERE userid IN($ids)"); - $sth->execute; - - while (my @row = $sth->fetchrow_array) { - ($comms{$row[2]}->{'timeupdate'}, - $comms{$row[2]}->{'timecreate'}) = ($row[0], $row[1]); - } - } - - # Prune the list by time last updated and make sure to - # display comms created in the past 10 days or where - # the inviter is a maint or mod - my $over30 = 0; - my $now = time(); - foreach my $comm (sort {$b->{timeupdate} <=> $a->{timeupdate}} values %comms) { - if ($now - $comm->{timecreate} <= 86400*10) { - $comm->{istatus} = 'new'; - next; - } - - my $maintainers = LJ::load_rel_user_cache($comm->{userid}, 'A') || []; - my $moderators = LJ::load_rel_user_cache($comm->{userid}, 'M') || []; - foreach (@$maintainers, @$moderators) { - if ($_ == $inviter->{userid}) { - $comm->{istatus} = 'mm'; - next; - } - } - - if ($over30) { - delete $comms{$comm->{userid}}; - next; - } else { - if (time() - $comm->{timeupdate} > 86400*30) { - delete $comms{$comm->{userid}}; - $over30 = 1; - } - } - } - - # If we still have more than 20 comms, delete any with less than - # five members - if (scalar keys %comms > 20) { - foreach my $comm (values %comms) { - next unless $comm->{istatus} eq 'normal'; - - my @ids = $comm->member_userids; - if ( scalar @ids < 5 ) { - delete $comms{$comm->{userid}}; - } - } - } - } - - if (LJ::did_post()) { - foreach (split(',', $POST{inviter_joins})) { - my $cj = LJ::load_userid($_); - $comms{$_} = $cj - if $cj; - } - } - - if (%comms) { - $ret .= "<br />Select which of your friend's communities you'd like to join:<br />"; - - my $i = 0; - foreach my $comm (sort { $a->{user} cmp $b->{user} } values %comms) { - last if $i >= 20; - $ret .= LJ::html_check({ name => "inviter_join_$comm->{userid}", - value => 1, - selected => LJ::did_post() ? $POST{"inviter_join_$comm->{user}"} : 0, - id => "inviter_$comm->{user}", - }); - - my $le = $comm->{istatus} eq 'mm' ? ' *' : ''; - - $ret .= "<label for='inviter_$comm->{user}'>" . - LJ::ljuser($comm->{user}) . " - $comm->{name}$le</label><br />"; - push @joins, $comm->{userid}; - $i++; - } - $ret .= LJ::html_hidden('inviter_joins', join(',', @joins)); - - $ret .= "<?de A community with a * means that your friend is a maintainer or moderator of that community. de?>"; - } - $ret .= "</div></li>"; - } - - if ($LJ::COPPA_CHECK) - { - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.birthday.head'}</div>"; - $ret .= "<div class='formitemFlag'>$errors{'bday'}</div>" if exists $errors{'bday'}; - $ret .= "<div class='formitemDesc'>"; - $ret .= BML::ml('.birthday.question_3', {'aopts' => "target='_new' href='$LJ::SITEROOT/legal/privacy.bml'"}); - $ret .= "</div><div>"; - $ret .= "<table><tr><td><span class='formitemName'>$ML{'.birthday.birthdate'}</span></td><td>"; - $ret .= LJ::html_datetime({ name => 'bday', notime => 1, - default => sprintf("%04d-%02d-%02d", $POST{bday_yyyy}, $POST{bday_mm}, $POST{bday_dd}) }); - $ret .= "</td></tr>"; - $ret .= "</table></div></div></li>"; - - $ret .= "<div class='formitemNote'>$ML{'.birthday.warning'}</div>"; - } - - LJ::run_hooks("create.bml_opts", { - post => \%POST, - get => \%GET, - ret => \$ret, - }); - - if ($LJ::TOS_CHECK) - { - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.tos.heading'}</div>"; - $ret .= LJ::tosagree_widget($POST{agree_tos}, $errors->{agree_tos}); - $ret .= "</div></li>"; - } - - if ($LJ::DEBUG{'allow_cluster_select'}) { - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.clusterselect.head'}</div>"; - $ret .= "<div class='formitemDesc'>$ML{'.clusterselect.text'}</div>"; - $ret .= LJ::html_select({ 'name' => 'cluster_id' }, - "0", "$BML{'.clusterselect.nocluster'}", - map { $_, BML::ml(".clusterselect.clusternum", {'number' => $_}) } @LJ::CLUSTERS); - - $ret .= "<div class='formitemNote'>$ML{'.clusterselect.cluster'}</div>"; - $ret .= "</div></li>"; - } - - if ($LJ::HUMAN_CHECK{create}) { - my ($captcha_chal, $captcha_sess); - - my $answer = $POST{answer}; - undef $answer if $errors{'captcha'} || $wants_audio; - $captcha_chal = $POST{captcha_chal}; - undef $captcha_chal if $errors{'captcha'}; - - $captcha_chal = $captcha_chal || LJ::challenge_generate(900); - $captcha_sess = LJ::get_challenge_attributes($captcha_chal); - - my $try = 0; - if ($form->{captcha_chal}) { - my $dbcm = LJ::get_cluster_reader(); - $try = $dbcm->selectrow_array('SELECT trynum FROM captcha_session ' . - 'WHERE sess=?', undef, $captcha_sess); - } - - $ret .= "<li><div class='formitem'><div class='formitemName'>$ML{'.captcha.prove'}</div>"; - - # Visual challenge - unless ( $wants_audio || $POST{audio_chal} ) { - $ret .= "<div class='formitemDesc'>$ML{'.captcha.desc'}</div>"; - if ($capid && $anum) { # previously entered correctly - $ret .= "<img src='/captcha/image.bml?capid=$capid&anum=$anum' width='175' height='35' />"; - } else { - $ret .= "<img src='/captcha/image.bml?chal=$captcha_chal&try=$try' width='175' height='35' />"; - } - } - - # Audio challenge - else { - $ret .= "<div class='formitemDesc'>$ML{'.captcha.audiodesc'}</div>"; - if ($capid && $anum) { - $ret .= "<a href='/captcha/audio.bml?capid=$capid&anum=$anum'>$ML{'.captcha.play'}</a>"; - } else { - $ret .= "<a href='/captcha/audio.bml?chal=$captcha_chal&try=$try'>$ML{'.captcha.play'}</a>"; - } - $ret .= LJ::html_hidden(audio_chal => 1); - } - - $ret .= "<br /><br />$ML{'.captcha.answer'}"; - $ret .= LJ::html_text({ name => 'answer', size => 15, value => $answer }); - $ret .= LJ::html_hidden(captcha_chal => $captcha_chal); - $ret .= $error_msg->('captcha', '<p class="formitemFlag">', '</p>'); - $ret .= "</div></li>"; - } - - $ret .= "</ol>"; - - $ret .= "<div style='width:600; text-align: center'>"; - $ret .= "<input type=\"submit\" value=\"$ML{'.btn.create'}\">"; - $ret .= "</div>"; - $ret .= "</form>"; - - return $ret; - } - - return "$ML{'error.unknownmode'}: <b>$mode</b>"; - _code?> <=body -page?><?_c <LJDEP> -link: htdocs/legal/privacy.bml -post: htdocs/create.bml, htdocs/manage/profile/index.bml -file: htdocs/inc/account-codes -hook: post_create -</LJDEP> _c?> +title=><?_code return $title; _code?> +head<= +<?_code return $headextra; _code?> +<=head +page?> diff -r 3941a1599503 -r 0d7ace9475cd htdocs/create.bml.text --- a/htdocs/create.bml.text Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/create.bml.text Thu Mar 19 04:21:13 2009 +0000 @@ -1,171 +1,5 @@ ;; -*- coding: utf-8 -*- -.birthday.birthdate=Birthdate: +.btn.saveandcontinue=Save and Continue -.birthday.head=Age Verification - -.birthday.question=Please select the month, day, and year you were born. We require this information to create an account in order to comply with the Children's Online Privacy Protection Act (COPPA). This information is not stored in our database and is only used during account creation. Read our <a [[aopts]]>privacy policy</a> for more information on our information practices. - -.birthday.question_1=We require this information in order to comply with the Children's Online Privacy Protection Act (COPPA). - -.birthday.question_3=Please select the month, day and year you were born. We require this information to create an account in order to comply with the Children's Online Privacy Protection Act (COPPA). If you are under the age of thirteen you are not allowed to use our service. Read our <a [[aopts]]>privacy policy</a> for more information regarding our information practices. - -.birthday.required=(required) - -.birthday.security=Security: - -.birthday.warning=Entering a false birthdate may prevent you from creating a new account or could prevent you from using your account in the future. - -.btn.create=Create Journal - -.btn.proceed=Proceed... - -.captcha.answer=Answer: - -.captcha.audiodesc=Type the numbers you hear to prove that you're not a spam robot: - -.captcha.desc=Type the letters and numbers you see below, to prove that you're not a spam robot. If you can't read the text, type "AUDIO" and take a sound test instead. - -.captcha.invalid=Invalid answer to previous challenge. Try another. - -.captcha.play=Play the sound - -.captcha.prove=Prove that you're a human - -.clusterselect.cluster=Cluster: - -.clusterselect.clusternum=Cluster [[number]] - -.clusterselect.head=Cluster Selection - -.clusterselect.nocluster=No Cluster - -.clusterselect.text=Please select the cluster you want to create this account on. <b>Note:</b> This is a debugging/test option only. In production, users won't pick this, or know anything about it. - -.community=Would you rather <a [[aopts]]>create a community</a>? - -.create.head=Creating a New Journal - -.create.text=Creating a new LiveJournal is easy, just follow the instructions below! - -.create.text_1=Here's the information we need to create your account. All fields are required. - -.email.head=Your email address - -.email.input.head=Email Address: - -.email.text2=For verification and security purposes, we need your email address. It will never ever, under any circumstances, be sold or given away to spammers. We hate that more than anything. Read our <a [[aopts]]>privacy policy</a> for more information. - -.email.text3=For verification and security purposes, we need your email address. Read our <a [[aopts]]>privacy policy</a> for more information on our information practices. - -.email.text_1=We never share or sell your email address. Read our <a [[aopts]]>privacy policy</a> for more information. - -.error.birthday.invalid=You must enter a valid birthday. - -.error.code.invalid=Invalid code. - -.error.coppa.under13=Sorry, due to COPPA restrictions, you cannot use the LiveJournal service until you're 13 years old. Please come back on your 13th birthday. - -.error.email.blank=You must provide your email address. - -.error.email.lj_domain=You cannot use a [[domain]] alias when creating an account. Please enter a different email address. - -.error.email.nospaces=No spaces allowed in email address. If you're on AOL, remember that your Internet Email address is your screen name with all spaces removed, followed by <b>@aol.com</b> - -.error.password.asciionly=You can only use ASCII symbols in the password. - -.error.password.blank=You must enter a password. - -.error.password.nomatch=Passwords do not match. - -.error.postrequired=POST required. - -.error.username.blank=Please supply a name or handle/alias. - -.error.username.inuse=Username already in use; please select a different one. - -.error.username.iscode=Username appears to be an invite code, not a username. - -.error.username.mustenter=You must enter a username. - -.error.username.purged=This account has been deleted and purged. - -.error.username.reserved=Sorry, that is a reserved username. - -.errors.label=Please note the following problems and resubmit: - -.initialfriends=Add these journals to your friends list to be kept up to date on site news and information. - -.initialfriends.heading=Starter Friends - -.name.head=Your Name - -.name.input.head=Name: - -.name.text=What's your name or handle? This will appear at the top of your journal, and in the user directory should you choose to be listed in it. You do not have to provide your full name or even your real name. - -.password.head=Password - -.password.input.head1=Password: - -.password.input.head2=Confirm password: - -.password.secure.pt1=is at least six characters long. - -.password.secure.pt2=contains at least four different characters. - -.password.secure.pt3=contains at least one number or symbol. - -.password.secure.pt4=cannot be based upon your username, display name or email address. - -.password.secure2=For your security, your password must <strong>not</strong> contain a dictionary word or be based upon your username or email address. It must also contain at least one numeral or punctuation mark in it. - -.password.secure_1=<b>You must choose a <a [[aopts]]>secure password</a></b>, which: - -.password.text=Select a password. - -.proceed.btn.proceed=Proceed... - -.proceed.warning=Only press <b>Proceed</b> <i>once</i>! - -.success.btn.enterinfo=Enter Personal Information - -.success.head=Success! - -.success.text1=Your journal has been created. Important registration information has been emailed to <font size="+1"><b>[[email]]</b></font> containing further instructions. Be sure to confirm your journal creation by clicking on the link sent to you in email. - -.success.text2=Your LiveJournal will be available at: - -.success.text3=Now, please take the time to fill in some information about yourself. It's mostly optional, but it lets us get an idea of who's using LiveJournal. - -.title=Create New Journal - -.title_1=Create Your [[siteabbr]] Account - -.tos.heading=Terms of Service - -.tos.p1.3=Before continuing you must read and agree to the <a [[aopts]]>Terms of Service</a> (which includes our privacy policy). - -.useacctcodes.entercode=To create a new account, enter an account creation code: - -.useacctcodes.welcome=Welcome - -.username.box.head=Username: - -.username.charsallowed=Your username may contain only lower-case letters (a-z), digits (0-9) and the underscore character (_). <br />Aditionally, it must not be longer than 15 characters. - -.username.charsallowed_1=Your username can contain only lower-case letters (a-z), digits (0-9) and the underscore character (_). - -.username.forpaidaccts=Or, for paid accounts: - -.username.head=Username - -.username.ljaddress=Your journal will be at these addresses: - -.username.maxchars=15 characters max - -.username.text=Each [[sitename]] user must have their own unique username. Your username is what appears in the address to your journal and what you use to log into the [[sitename]] server. It also shows up when you post comments in other people's journals. - -.username.text_1=Your username is what you use to log in to [[sitename]]. It will appear in your journal address (username.[[lc_sitename]]) as well as next to your posts and comments. - -.username.username=username +.title=Create Your [[sitename]] Account diff -r 3941a1599503 -r 0d7ace9475cd htdocs/inc/account-codes --- a/htdocs/inc/account-codes Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/inc/account-codes Thu Mar 19 04:21:13 2009 +0000 @@ -1,1 +0,0 @@ -<!-- stub file. modify if you want. --> diff -r 3941a1599503 -r 0d7ace9475cd htdocs/js/widgets/createaccount.js --- a/htdocs/js/widgets/createaccount.js Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/js/widgets/createaccount.js Thu Mar 19 04:21:13 2009 +0000 @@ -4,9 +4,11 @@ CreateAccount.init = function () { if (!$('create_user')) return; if (!$('create_email')) return; if (!$('create_password1')) return; - if (!$('create_bday_mm')) return; - if (!$('create_bday_dd')) return; - if (!$('create_bday_yyyy')) return; + if ( CreateAccount.coppa_check ) { + if (!$('create_bday_mm')) return; + if (!$('create_bday_dd')) return; + if (!$('create_bday_yyyy')) return; + } CreateAccount.bubbleid = ""; @@ -14,18 +16,22 @@ CreateAccount.init = function () { DOM.addEventListener($('create_email'), "focus", CreateAccount.eventShowTip.bindEventListener("create_email")); DOM.addEventListener($('create_password1'), "focus", CreateAccount.eventShowTip.bindEventListener("create_password1")); DOM.addEventListener($('create_password2'), "focus", CreateAccount.eventShowTip.bindEventListener("create_password1")); - DOM.addEventListener($('create_bday_mm'), "focus", CreateAccount.eventShowTip.bindEventListener("create_bday_mm")); - DOM.addEventListener($('create_bday_dd'), "focus", CreateAccount.eventShowTip.bindEventListener("create_bday_mm")); - DOM.addEventListener($('create_bday_yyyy'), "focus", CreateAccount.eventShowTip.bindEventListener("create_bday_mm")); + if ( CreateAccount.coppa_check ) { + DOM.addEventListener($('create_bday_mm'), "focus", CreateAccount.eventShowTip.bindEventListener("create_bday_mm")); + DOM.addEventListener($('create_bday_dd'), "focus", CreateAccount.eventShowTip.bindEventListener("create_bday_mm")); + DOM.addEventListener($('create_bday_yyyy'), "focus", CreateAccount.eventShowTip.bindEventListener("create_bday_mm")); + } if (CreateAccount.alt_layout) { DOM.addEventListener($('create_user'), "blur", CreateAccount.eventHideTip.bindEventListener("create_user")); DOM.addEventListener($('create_email'), "blur", CreateAccount.eventHideTip.bindEventListener("create_email")); DOM.addEventListener($('create_password1'), "blur", CreateAccount.eventHideTip.bindEventListener("create_password1")); DOM.addEventListener($('create_password2'), "blur", CreateAccount.eventHideTip.bindEventListener("create_password1")); - DOM.addEventListener($('create_bday_mm'), "blur", CreateAccount.eventHideTip.bindEventListener("create_bday_mm")); - DOM.addEventListener($('create_bday_dd'), "blur", CreateAccount.eventHideTip.bindEventListener("create_bday_mm")); - DOM.addEventListener($('create_bday_yyyy'), "blur", CreateAccount.eventHideTip.bindEventListener("create_bday_mm")); + if ( CreateAccount.coppa_check ) { + DOM.addEventListener($('create_bday_mm'), "blur", CreateAccount.eventHideTip.bindEventListener("create_bday_mm")); + DOM.addEventListener($('create_bday_dd'), "blur", CreateAccount.eventHideTip.bindEventListener("create_bday_mm")); + DOM.addEventListener($('create_bday_yyyy'), "blur", CreateAccount.eventHideTip.bindEventListener("create_bday_mm")); + } } if (!$('username_check')) return; @@ -71,10 +77,10 @@ CreateAccount.showTip = function (id) { if (box && box_arr) { box.innerHTML = text; - box.style.top = y - 188 + "px"; + box.style.top = y - 260 + "px"; box.style.display = "block"; - box_arr.style.top = y - 183 + "px"; + box_arr.style.top = y - 255 + "px"; box_arr.style.display = "block"; } } diff -r 3941a1599503 -r 0d7ace9475cd htdocs/stc/widgets/createaccount.css --- a/htdocs/stc/widgets/createaccount.css Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/stc/widgets/createaccount.css Thu Mar 19 04:21:13 2009 +0000 @@ -34,9 +34,6 @@ } .appwidget-createaccount .create-button { - color: #fff; - background-color: #213368; - border: 1px solid #fff; font-size: 14px; font-weight: bold; padding: 5px; diff -r 3941a1599503 -r 0d7ace9475cd htdocs/stc/widgets/createaccountprofile.css --- a/htdocs/stc/widgets/createaccountprofile.css Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/stc/widgets/createaccountprofile.css Thu Mar 19 04:21:13 2009 +0000 @@ -12,7 +12,6 @@ .appwidget-createaccountprofile .field-name { font-size: 12px; - background-color: #dee9f1; font-weight: bold; text-align: right; width: 70px; @@ -25,8 +24,7 @@ } .appwidget-createaccountprofile .header { - color: #213368; - font-size: 14px; + font-size: 13px; font-weight: bold; margin: 0; } diff -r 3941a1599503 -r 0d7ace9475cd htdocs/stc/widgets/createaccountprogressmeter.css --- a/htdocs/stc/widgets/createaccountprogressmeter.css Thu Mar 19 04:03:21 2009 +0000 +++ b/htdocs/stc/widgets/createaccountprogressmeter.css Thu Mar 19 04:21:13 2009 +0000 @@ -2,15 +2,20 @@ padding-right: 20px; } -.appwidget-createaccountprogressmeter .step-selected { - color: #213368; +.appwidget-createaccountprogressmeter .step-selected .step-block-text { font-weight: bold; } -.appwidget-createaccountprogressmeter .step-previous { - color: #4b5985; +.appwidget-createaccountprogressmeter .step-block-active, +.appwidget-createaccountprogressmeter .step-block-inactive { + display: block; + padding: 0; + width: 16px; + text-align: center; + float: left; } -.appwidget-createaccountprogressmeter .step-next { - color: #666; +.appwidget-createaccountprogressmeter .step-block-text { + float: left; + margin-left: 5px; } --------------------------------------------------------------------------------