Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r8144: LJSUP-5455 (Logic bug: maintainer of non...

Committer: ailyin
LJSUP-5455 (Logic bug: maintainer of non-paid community can't upgrade community to paid at the "upgrade account" page): add "upgrade to paid" link

U   trunk/htdocs/community/account.bml
U   trunk/htdocs/community/account.bml.text.local
Modified: trunk/htdocs/community/account.bml
===================================================================
--- trunk/htdocs/community/account.bml	2010-01-27 10:05:54 UTC (rev 8143)
+++ trunk/htdocs/community/account.bml	2010-01-28 04:57:06 UTC (rev 8144)
@@ -74,6 +74,24 @@
 
     # Non Paid Account
     } else {
+        my $switchto_paid_text = BML::ml('.switchto.paid.text', {
+            'aopts' => qq{ href="$LJ::HELPURL{'paid_benefits'}"},
+        });
+        my $hidden_fields = LJ::html_hidden(
+            'item' => 'paidaccount',
+            'gift' => 1,
+            'for' => $u->display_name,
+        );
+        my $switchto_paid_block .= qq{
+            <?p
+                <span class="hilite">$ML{'.switchto.paid.header'}</span><br>
+                $switchto_paid_text
+            p?>
+            <form action="$LJ::SITEROOT/shop/view.bml" method="get">
+                $hidden_fields
+                <button type="submit">$ML{'.btn.topaid'}</button>
+            </form>
+        };
 
         # If Plus account
         if ($u->in_class("plus")) {
@@ -109,6 +127,8 @@
                 $body .= LJ::form_auth();
                 $body .= LJ::html_submit("areyousure", $ML{'.btn.tobasic'});
                 $body .= "</form> p?>\n";
+
+                $body .= $switchto_paid_block;
             }
 
             $body .= "</td><td valign='top' width='50%'>\n";
@@ -129,8 +149,11 @@
             $body .= LJ::html_submit("sponsored", $ML{'.btn.toplus'});
             $body .= "</form><br />\n";
 
+            $body .= $switchto_paid_block;
+
             $body .= "</td><td valign='top' width='50%'>\n";
         }
+
         $body .= "</td></tr></table>\n";
     }
 

Modified: trunk/htdocs/community/account.bml.text.local
===================================================================
--- trunk/htdocs/community/account.bml.text.local	2010-01-27 10:05:54 UTC (rev 8143)
+++ trunk/htdocs/community/account.bml.text.local	2010-01-28 04:57:06 UTC (rev 8144)
@@ -43,3 +43,9 @@
 
 .title=Community Account Status
 
+.switchto.paid.header=Paid account
+
+.switchto.paid.text=The Paid account level gives you access to all LiveJournal's premium community features. <a [[aopts]]>See a full list of features.</a>
+
+.btn.topaid=Buy a Paid account for this community
+

Tags: andy, bml, ljcom, local
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