Committer: iaskarov
LJSUP-8043U trunk/htdocs/manage/account/index.bml
Modified: trunk/htdocs/manage/account/index.bml =================================================================== --- trunk/htdocs/manage/account/index.bml 2011-02-28 05:22:39 UTC (rev 10134) +++ trunk/htdocs/manage/account/index.bml 2011-02-28 07:16:07 UTC (rev 10135) @@ -402,13 +402,15 @@ $body .= "</td></tr></table>\n"; # Non Paid Account } else { + my $trynbuy_active = LJ::TryNBuy->active($u); + $body .= "<form action='$LJ::SITEROOT/manage/account/' method='post'>"; $body .= LJ::form_auth(); $body .= "<table id='upgrade_page' cellspacing='5'>"; $body .= "<tr><td colspan='3' valign='top'>"; $body .= "<div class='account_level'>"; - if ($u->get_cap('trynbuy')){ + if (LJ::TryNBuy->active($u)){ my $exptime = $u->prop('trynbuy_enabled_at') + $LJ::TRY_AND_BUY_LIFETIME; my (undef, undef, undef, $day, $month, $year) = localtime($exptime); $month ++; @@ -420,6 +422,7 @@ } $body .= "<br /><span class='userpic_count'>" . BML::ml('.accountlevel.userpics', { used => $u->get_userpic_count, max => $u->userpic_quota }) . "</span>"; $body .= "</div>"; + if($trynbuy_active) { $body .= '<p class="b-bubble b-bubble-alert b-bubble-noarrow b-bubble-intext"><i class="i-bubble-arrow-border"></i><i class="i-bubble-arrow"></i>' . BML::ml('.accountlevel.trynbuy.alert') .'</p>'; } $body .= "</td></tr>"; if ($change_level) { @@ -461,15 +464,15 @@ $body .= "</td></tr>"; $body .= "<tr><td>"; - $body .= LJ::html_check({ type => "radio", name => "acct_level", value => "plus", id => "change_level_plus" }); - $body .= "</td><td>"; + $body .= LJ::html_check({ type => "radio", name => "acct_level", value => "plus", id => "change_level_plus", disabled => $trynbuy_active ? 1 : 0 }); + $body .= $trynbuy_active ? "</td><td class='disabled'>" : "</td><td>"; $body .= "<p><strong><label for='change_level_plus'>$ML{'.changelevel.plus.title'}</label></strong><br />"; $body .= "<label for='change_level_plus'>" . BML::ml('.changelevel.plus.text', { aopts => "href='$LJ::SITEROOT/manage/horizon.bml'" }) . "</label></p>"; $body .= "</td></tr>"; $body .= "<tr><td>"; - $body .= LJ::html_check({ type => "radio", name => "acct_level", value => "basic", id => "change_level_basic" }); - $body .= "</td><td>"; + $body .= LJ::html_check({ type => "radio", name => "acct_level", value => "basic", id => "change_level_basic", disabled => $trynbuy_active ? 1 : 0 }); + $body .= $trynbuy_active ? "</td><td class='disabled'>" : "</td><td>"; $body .= "<p><strong><label for='change_level_basic'>$ML{'.changelevel.basic.title'}</label></strong><br />"; $body .= "<label for='change_level_basic'>" . BML::ml('.changelevel.basic.text', { aopts => "href='$LJ::HELPURL{downgrade_to_basic}'" }) . "</label></p>"; $body .= "</td></tr>"; @@ -481,7 +484,7 @@ $body .= "</table></td></tr></table>"; } else { - my $plus_block .= "<div class='plus_block'>"; + my $plus_block .= $trynbuy_active ? "<div class='plus_block disabled'>" : "<div class='plus_block'>"; $plus_block .= "<p>" . $ML{'.plusblock.intro'} . "</p>"; $plus_block .= "<div class='plus_upsell'>$ML{'.plusblock.upsell'}</div>"; $plus_block .= "<p><strong>$ML{'.plusblock.benefit.themes.title'}</strong><br />"; @@ -494,7 +497,7 @@ $plus_block .= BML::ml('.plusblock.benefit.photos.text', { num => 1 }) . "</p>"; $plus_block .= "<p><strong>$ML{'.plusblock.benefit.more.title'}</strong><br />"; $plus_block .= "<a href='$LJ::HELPURL{plus_benefits_full}'>$ML{'.plusblock.benefit.more.text'}</a></p>"; - $plus_block .= "<div class='plus_button' align='center'>" . LJ::html_submit( plus => $ML{'.btn.plus'} ) . "</div>"; + $plus_block .= "<div class='plus_button' align='center'>" . LJ::html_submit( plus => $ML{'.btn.plus'}, {disabled => $trynbuy_active ? 1 : 0} ) . "</div>"; $plus_block .= "</div>"; my $paid_block .= "<div class='paid_block'>"; @@ -670,6 +673,12 @@ .back_link { font-size: 11px; } + .disabled { + filter:alpha(opacity=50); + opacity: 0.5; + -moz-opacity:0.5; + -khtml-opacity: 0.5; + } </style> <=head page?>