juks (juks) wrote in changelog,
juks
juks
changelog

[ljcom] r10068: LJSUP-7445

Committer: iaskarov
LJSUP-7445
U   trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm
U   trunk/cgi-bin/LJ/Widget/CreateAccountUpgrade.pm
U   trunk/htdocs/create/step2a.bml
U   trunk/htdocs/manage/account/index.bml
Modified: trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm	2011-02-17 10:28:56 UTC (rev 10067)
+++ trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm	2011-02-17 11:03:57 UTC (rev 10068)
@@ -13,48 +13,10 @@
     my $u = LJ::get_effective_remote();
 
     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.createaccountlevel.title') . "</h2>";
-
     ### plus
-    my @plus_checked = ( checked => "checked" ) unless $u->in_class('paid');
-    $ret .= "<div class='plus-row'>" . $class->html_check(
-        name => 'ljcom_atype',
-        id => 'plus_check',
-        type => 'radio',
-        value => 'plus',
-        @plus_checked,
-    );
-    $ret .= "<label for='plus_check'>" . $class->ml('widget.createaccountlevel.field.plus') . "</label></div>\n";
+    $ret .= "<input type='hidden' id='plus_check' name='Widget[CreateAccountLevel]_ljcom_atype' value='plus'>";
 
-    ### paid
-    my @paid_checked = $u->in_class('paid') ? ( checked => "checked" ) : ();
-    $ret .= "<div class='paid-row'>";
-    $ret .= "<div class='paid-info'>" . $class->html_check(
-        name => 'ljcom_atype',
-        id => 'paid_check',
-        type => 'radio',
-        value => 'paid',
-        @paid_checked,
-    );
-    $ret .= "<label for='paid_check'>" . $class->ml('widget.createaccountlevel.field.paid', { price => "\$20" }) . "</label></div>";
-
-    $ret .= "<div class='paid-moreinfo'><div class='paid-moreinfo-in'>";
-    $ret .= $class->ml('widget.createaccountlevel.field.paid.moreinfo', {
-        numthemes => 600,
-        storageamount => 2,
-        numuserpics => 30,
-        aopts => "href='$LJ::SITEROOT/paidaccounts/' target='_blank'",
-    }) . "</div></div></div>";
-
-    $ret .= "</div>";
-
-    $ret .= "</div></div></div></div>";
-    $ret .= "</div></div></div></div>";
-
     return $ret;
 }
 

Modified: trunk/cgi-bin/LJ/Widget/CreateAccountUpgrade.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccountUpgrade.pm	2011-02-17 10:28:56 UTC (rev 10067)
+++ trunk/cgi-bin/LJ/Widget/CreateAccountUpgrade.pm	2011-02-17 11:03:57 UTC (rev 10068)
@@ -21,7 +21,7 @@
     $ret .= "<div class='rounded-box-content'>";
     $ret .= "<p class='header'>" . $class->ml('widget.createaccountupgrade.benefits') . "</p>";
 
-    $ret .= $class->start_form;
+    #$ret .= $class->start_form;
     $ret .= "<table cellspacing='0' cellpadding='0'>";
     $ret .= "<tr valign='top'><td>";
     $ret .= "<ul class='paidbenefits'>";
@@ -37,7 +37,7 @@
     $ret .= '<div class="b-createupgr-paid">' . $class->ml('widget.createaccountupgrade.price', { price => "\$$normalpricerec" }) . ' ' . $class->ml('widget.createaccountupgrade.priceinfo', { numcents => "\$0.06" }) . '</p><p class="b-createupgr-try">' . $class->ml('widget.createaccountupgrade.trynbuy.try', { aopts => "href='$LJ::SITEROOT/shop/paidaccount.bml' target='_blank'" }) . '</p></div>';
     $ret .= "</td></tr>";
     $ret .= "</table>";
-    $ret .= $class->end_form;
+    #$ret .= $class->end_form;
 
     $ret .= "</div>";
 

Modified: trunk/htdocs/create/step2a.bml
===================================================================
--- trunk/htdocs/create/step2a.bml	2011-02-17 10:28:56 UTC (rev 10067)
+++ trunk/htdocs/create/step2a.bml	2011-02-17 11:03:57 UTC (rev 10068)
@@ -55,6 +55,7 @@
     $ret .= "<tr valign='top'><td style='padding-right: 10px;'>";
 
     $ret .= LJ::Widget::CreateAccountProfile->render( from_post => \%from_post );
+    $ret .= LJ::Widget::CreateAccountLevel->render;
     $ret .= LJ::Widget::CreateAccountUpgrade->render;
 
     $ret .= "</td><td width='300'>";

Modified: trunk/htdocs/manage/account/index.bml
===================================================================
--- trunk/htdocs/manage/account/index.bml	2011-02-17 10:28:56 UTC (rev 10067)
+++ trunk/htdocs/manage/account/index.bml	2011-02-17 11:03:57 UTC (rev 10068)
@@ -44,7 +44,7 @@
             $u->set_prop('journal_box_placement', 'h')
                 if $u->prop('journal_box_placement') eq '';
             return BML::redirect( "$LJ::SITEROOT/manage/account/adsettings.bml?changelevel=1" );
-        } elsif ($POST{acct_level} eq "trynbuy") {
+        } elsif ($POST{acct_level} eq "trynbuy" && !$POST{change_level_cancel}) {
             $POST{'Widget[Trynbuy]_acct_level'} = $POST{acct_level};
             $POST{'Widget[Trynbuy]_account'} = $u->userid; 
             my %res = LJ::Widget->handle_post(\%POST, qw(Trynbuy));
@@ -99,7 +99,7 @@
             return BML::redirect( "$LJ::SITEROOT/" )                              if $POST{acct_level} eq "plus";
             return BML::redirect( "$LJ::SITEROOT/manage/horizon.bml" )            if $POST{change_level_cancel};
             return BML::redirect( "$LJ::SITEROOT/manage/account/downgrade.bml" )  if $POST{acct_level} eq "basic";
-            return BML::redirect( "$LJ::SITEROOT/manage/account/modify.bml" )     if $POST{paid} || $POST{acct_level} eq "paid" || $POST{change} || $POST{setup};
+            return BML::redirect( "$LJ::SITEROOT/manage/account/modify.bml" )     if $POST{paid} || $POST{acct_level} eq "paid" || $POST{acct_level} eq "trynbuy" || $POST{change} || $POST{setup};
             return BML::redirect( "$LJ::SITEROOT/sponsors/choose_sponsor.bml" )   if ($POST{sponsored} || $POST{acct_level} eq "sponsored") && $u->knows_about_sponsors;
             return BML::redirect( "$LJ::SITEROOT/manage/account/cancel.bml" )     if $POST{cancel};
             return BML::redirect( "$LJ::SSLROOT/manage/account/cc.bml" )         if $POST{change_cc};

Tags: bml, juks, ljcom, pm
Subscribe
  • 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