[livejournal] r17428: LJSUP-6706: Sign up server side - LJSUP-...
Committer: ssafronova
LJSUP-6706: Sign up server side - LJSUP-6804: update step 1 widgetU trunk/bin/upgrading/en.dat U trunk/cgi-bin/LJ/Widget/CreateAccount.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat 2010-09-22 06:50:23 UTC (rev 17427)
+++ trunk/bin/upgrading/en.dat 2010-09-22 07:54:22 UTC (rev 17428)
@@ -6041,6 +6041,10 @@
widget.createaccount.field.gender|staleness=1
widget.createaccount.field.gender=Gender:
+widget.createaccount.field.location=Location
+
+widget.createaccount.field.location.detect=Detect
+
widget.createaccount.field.news|staleness=1
widget.createaccount.field.news=Yes, send me [[sitename]] announcements via email.
@@ -6056,6 +6060,16 @@
widget.createaccount.field.username.available|staleness=1
widget.createaccount.field.username.available=Username available
+widget.createaccount.head1=Find yourself and each other on LiveJournal!
+
+widget.createaccount.head2=It only takes a few minutes to sign up! Here's all we need:
+
+widget.createaccount.intro<<
+LiveJournal is a global journaling platform that helps you share your unique passions and interests and form deep connections with friends, old and new!
+Whether you’re interested in baking, writing, politics, photography, or pretty much anything else, you’re sure to find like-minded friends from around
+the corner and around the world!
+.
+
widget.createaccount.tip.birthdate|staleness=1
widget.createaccount.tip.birthdate=Required by law. No worries, you can set privacy on this after you're done creating an account.
@@ -6070,6 +6084,8 @@
widget.createaccount.tip.gender=By default we will not show your gender to anybody.
+widget.createaccount.tip.location=LiveJournal detects your location automatically, but you can change if you want
+
widget.createaccount.tip.password|staleness=1
widget.createaccount.tip.password=Choose a secure password that is at least 6 characters long. Passwords cannot be based on your username, name, or email address.
Modified: trunk/cgi-bin/LJ/Widget/CreateAccount.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccount.pm 2010-09-22 06:50:23 UTC (rev 17427)
+++ trunk/cgi-bin/LJ/Widget/CreateAccount.pm 2010-09-22 07:54:22 UTC (rev 17428)
@@ -41,6 +41,10 @@
$ret .= "<div class='rounded-box-content'>";
}
+ $ret .= "<p><b>" . $class->ml('widget.createaccount.head1') . "</b></p>";
+ $ret .= "<p>" . $class->ml('widget.createaccount.intro') . "</p>";
+ $ret .= "<p><b>" . $class->ml('widget.createaccount.head2') . "</b></p>";
+
$ret .= $class->start_form(%{$opts{form_attr}});
my $tip_birthdate = LJ::ejs($class->ml('widget.createaccount.tip.birthdate2'));
@@ -48,6 +52,7 @@
my $tip_password = LJ::ejs($class->ml('widget.createaccount.tip.password'));
my $tip_username = LJ::ejs($class->ml('widget.createaccount.tip.username'));
my $tip_gender = LJ::ejs($class->ml('widget.createaccount.tip.gender'));
+ my $tip_location = LJ::ejs($class->ml('widget.createaccount.tip.location'));
# tip module
if ($alt_layout) {
@@ -61,6 +66,7 @@
$ret .= "CreateAccount.password = \"$tip_password\"\n";
$ret .= "CreateAccount.username = \"$tip_username\"\n";
$ret .= "CreateAccount.gender = \"$tip_gender\"\n";
+ $ret .= "CreateAccount.location = \"$tip_location\"\n";
$ret .= "</script>\n";
$ret .= "<div id='tips_box_arrow'></div>";
$ret .= "<div id='tips_box'></div>";
@@ -224,8 +230,59 @@
$ret .= "</td></tr>\n" unless $alt_layout;
}
+ ### location
+ if ($alt_layout) {
+ $ret .= "<label for='create_location' class='label_create'>" . $class->ml('widget.createaccount.field.location') . "</label>";
+ $ret .= "<div class='bubble' id='bubble_location'>";
+ $ret .= "<div class='bubble-arrow'></div>";
+ $ret .= "<div class='bubble-text'>$tip_location</div>";
+ $ret .= "</div>";
+ } else {
+ $ret .= "<tr><td class='field-name'>" . $class->ml('widget.createaccount.field.location') . "</td>\n<td>";
+ }
+ $ret .= $class->html_text(
+ name => 'location',
+ id => 'create_location',
+ size => 15,
+ maxlength => 50,
+ value => $post->{location},
+ );
+ $ret .= $error_msg->('location', '<br /><span class="formitemFlag">', '</span>');
+
+ if ($IpMap::VERSION ge "1.1.0") {
+ $ret .= "<div class='lc_detect'>";
+ $ret .= "<input type='button' name='detect' value='" . $class->ml('widget.createaccount.field.location.detect') . "' id='detect' onClick='countryregions.autoDetect()'> ";
+ $ret .= "</div>";
+ }
+
+ $ret .= "</td></tr>\n" unless $alt_layout;
+
#$ret .= LJ::run_hook("create_account_extra_fields", {class => $class, errors => $errors});
+ if ($alt_layout) {
+
+ ### site news
+ $ret .= $class->html_check(
+ name => 'news',
+ id => 'create_news',
+ value => '1',
+ selected => LJ::did_post() ? $post->{news} : 0,
+ );
+ $ret .= " <label for='create_news' class='text'>" . $class->ml('widget.createaccount.field.news', { sitename => $LJ::SITENAMESHORT }) . "</label>";
+
+ } else {
+ ### site news
+ $ret .= "<tr valign='top'><td class='field-name'> </td>\n<td>";
+ $ret .= $class->html_check(
+ name => 'news',
+ id => 'create_news',
+ value => '1',
+ selected => LJ::did_post() ? $post->{news} : 1,
+ label => $class->ml('widget.createaccount.field.news', { sitename => $LJ::SITENAMESHORT }),
+ );
+ $ret .= "</td></tr>\n";
+ }
+
### captcha
if ($LJ::HUMAN_CHECK{create}) {
if (LJ::is_enabled("recaptcha")) {
@@ -308,37 +365,17 @@
}
}
- ### site news
- $ret .= $class->html_check(
- name => 'news',
- id => 'create_news',
- value => '1',
- selected => LJ::did_post() ? $post->{news} : 0,
- );
- $ret .= " <label for='create_news' class='text'>" . $class->ml('widget.createaccount.field.news', { sitename => $LJ::SITENAMESHORT }) . "</label>";
-
$ret .= "</p>";
$ret .= $error_msg->('tos', '<span class="formitemFlag">', '</span><br />');
} else {
- ### site news
- $ret .= "<tr valign='top'><td class='field-name'> </td>\n<td>";
- $ret .= $class->html_check(
- name => 'news',
- id => 'create_news',
- value => '1',
- selected => LJ::did_post() ? $post->{news} : 1,
- label => $class->ml('widget.createaccount.field.news', { sitename => $LJ::SITENAMESHORT }),
- );
- $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>";
+ aopts1 => LJ::SUP->is_remote_sup ? "href='$LJ::SITEROOT/legal/tos-russian-translation.bml'" : "href='$LJ::SITEROOT/legal/tos.bml'",
+ aopts2 => LJ::SUP->is_remote_sup ? "href='$LJ::SITEROOT/legal/privacy-russian-translation.bml'" : "href='$LJ::SITEROOT/legal/privacy.bml'",
+ }) . "</p>";
$ret .= "</td></tr>\n";
}
$ret .= $error_msg->('tos', '<span class="formitemFlag">', '</span><br />');
