[ljcom] r9602: LJSUP-6867: Twitter auth - LJSUP-7051: N...
Committer: ssafronova
LJSUP-6867: Twitter auth - LJSUP-7051: No checking validation emailU trunk/htdocs/identity/twitter-interstitial.bml U trunk/htdocs/identity/twitter-interstitial.bml.text.local U trunk/templates/Identity/TwitterInterstitial.tmpl
Modified: trunk/htdocs/identity/twitter-interstitial.bml
===================================================================
--- trunk/htdocs/identity/twitter-interstitial.bml 2010-10-08 11:05:15 UTC (rev 9601)
+++ trunk/htdocs/identity/twitter-interstitial.bml 2010-10-08 11:18:00 UTC (rev 9602)
@@ -21,6 +21,7 @@
my $returl = LJ::Request->get_param('ret') || $LJ::SITEROOT;
my @errors;
+ my $step2 = 0;
my $handle_post = sub {
if (!LJ::check_form_auth()) {
@@ -28,14 +29,14 @@
return;
}
+ return LJ::Request->redirect($returl) if $POST{'next'};
+
if (!LJ::Request->post_param('subscribe')) {
return LJ::Request->redirect($returl);
}
my $email = LJ::Request->post_param('email');
- return LJ::Request->redirect($returl) unless $email;
-
my @email_errors;
LJ::check_email($email, \@email_errors);
@@ -144,7 +145,7 @@
Carp::cluck "error subscribing user: " . $u->id;
}
- return LJ::Request->redirect($returl);
+ $step2 = 1;
};
if (LJ::Request->did_post) {
@@ -164,8 +165,9 @@
'form_intro' => LJ::form_auth(),
'form_email' => LJ::ehtml(LJ::Request->post_param('email')),
'ml_congrats' => LJ::Lang::ml('.congrats', {
- 'username' => $remote->ljuser_display,
- }),
+ 'username' => $remote->ljuser_display, }),
+ 'step2' => $step2,
+ 'ml_validation' => LJ::Lang::ml('.validation', { resend_url => "$LJ::SITEROOT/register.bml" }),
);
return $template->output;
Modified: trunk/htdocs/identity/twitter-interstitial.bml.text.local
===================================================================
--- trunk/htdocs/identity/twitter-interstitial.bml.text.local 2010-10-08 11:05:15 UTC (rev 9601)
+++ trunk/htdocs/identity/twitter-interstitial.bml.text.local 2010-10-08 11:18:00 UTC (rev 9602)
@@ -1,7 +1,11 @@
.btn.proceed=Save and proceed
+.btn.next=Next
+
.congrats=Congratulations, [[username]], your accounts are now connected.
+.desc=Log into LiveJournal with your Twitter account and get instant access to LiveJournal, including commenting, friend-finding, uploading userpics, and more!
+
.heading.subscribe=Do you want to receive email notifications?
.label.email=Enter your email:
@@ -11,3 +15,7 @@
.label.subscribe.no=No
.title=Log in with OpenID and more
+
+.tip.email=This is where you’ll get notifications and important account information. We will never share or sell your email address!
+
+.validation=Validation...[[resend_url]]
Modified: trunk/templates/Identity/TwitterInterstitial.tmpl
===================================================================
--- trunk/templates/Identity/TwitterInterstitial.tmpl 2010-10-08 11:05:15 UTC (rev 9601)
+++ trunk/templates/Identity/TwitterInterstitial.tmpl 2010-10-08 11:18:00 UTC (rev 9602)
@@ -1,33 +1,32 @@
-<div><TMPL_VAR ml_congrats></div>--<TMPL_IF errors>- <TMPL_LOOP errors>- <?errorbar <TMPL_VAR error> errorbar?>- </TMPL_LOOP>-</TMPL_IF>--<form action="" method="post">-<TMPL_VAR form_intro>--<div>-<label for="email"><TMPL_VAR expr="ml('.label.email')"></label>-<input type="text" name="email" id="email" value="<TMPL_VAR form_email>">-</div>--<div><TMPL_VAR expr="ml('.heading.subscribe')"></div>--<div>-<input type="radio" name="subscribe" value="1" id="subscribe_yes" checked="checked">-<label for="subscribe_yes"><TMPL_VAR expr="ml('.label.subscribe.yes')"></label>-</div>--<div>-<input type="radio" name="subscribe" value="0" id="subscribe_no">-<label for="subscribe_no"><TMPL_VAR expr="ml('.label.subscribe.no')"></label>-</div>--<div>-<button type="submit"><TMPL_VAR expr="ml('.btn.proceed')"></button>-</div>--</form>
\ No newline at end of file
+<TMPL_IF errors>
+ <TMPL_LOOP errors>
+ <?errorbar <TMPL_VAR error> errorbar?>
+ </TMPL_LOOP>
+</TMPL_IF>
+<form action="" method="post">
+<TMPL_VAR form_intro>
+<TMPL_IF step2>
+ <TMPL_VAR ml_validation>
+ <input type="submit" name="next" value="<TMPL_VAR expr="ml('.btn.next')">">
+<TMPL_ELSE>
+ <div><TMPL_VAR ml_congrats></div>
+ <TMPL_VAR expr="ml('.desc')">
+ <div><TMPL_VAR expr="ml('.heading.subscribe')"></div>
+ <div>
+ <input type="radio" name="subscribe" value="1" id="subscribe_yes" checked="checked">
+ <label for="subscribe_yes"><TMPL_VAR expr="ml('.label.subscribe.yes')"></label>
+ </div>
+ <div>
+ <input type="radio" name="subscribe" value="0" id="subscribe_no">
+ <label for="subscribe_no"><TMPL_VAR expr="ml('.label.subscribe.no')"></label>
+ </div>
+ <div>
+ <label for="email"><TMPL_VAR expr="ml('.label.email')"></label>
+ <input type="text" name="email" id="email" value="<TMPL_VAR form_email>">
+ <TMPL_VAR expr="ml('.tip.email')">
+ </div>
+ <div>
+ <button type="submit"><TMPL_VAR expr="ml('.btn.proceed')"></button>
+ </div>
+</TMPL_IF>
+</form>
