журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12509: LJSUP-12917: Add RESERVED and INCOMING t...

Committer: nnikulochkina
LJSUP-12917: Add RESERVED and INCOMING tabs to user wallet page
U   trunk/htdocs/shop/tokens.bml
U   trunk/templates/Shop/Wallet.tmpl
Modified: trunk/htdocs/shop/tokens.bml
===================================================================
--- trunk/htdocs/shop/tokens.bml	2012-08-21 12:09:43 UTC (rev 12508)
+++ trunk/htdocs/shop/tokens.bml	2012-08-21 12:43:31 UTC (rev 12509)
@@ -34,6 +34,14 @@
     return BML::redirect($self_uri)
         unless LJ::Request->uri eq LJ::Pay::Wallet::LANDING_URL;
 
+
+    if ( LJ::Request->did_post ) {
+        my $act = LJ::Request->post_param('act');
+        if ( $act && $act eq 'revoke_account' ) {
+            return LJ::Widget::Shop::View::Wallet::Reserved->render;
+        }
+    }
+
     return LJ::Widget::Shop::View::Wallet->render;
 }
 _code?>

Modified: trunk/templates/Shop/Wallet.tmpl
===================================================================
--- trunk/templates/Shop/Wallet.tmpl	2012-08-21 12:09:43 UTC (rev 12508)
+++ trunk/templates/Shop/Wallet.tmpl	2012-08-21 12:43:31 UTC (rev 12509)
@@ -130,7 +130,9 @@
 
 		<TMPL_UNLESS wallet_ext_disabled>
         	<li class="b-buy-goods-item b-reserved-item <TMPL_IF tab_reserved_active>current</TMPL_IF>">
-        		<form action="" method="post" id="shop_reserved_token">
+        		<form action="<TMPL_VAR self_uri>?show=reserved" method="post" id="shop_reserved_token">
+                                <input type="hidden" name="act" value="revoke_account">
+                                <TMPL_VAR form_auth>                                
 	        		<table class="b-tokens-reserved b-tokens-items">
 	        			<thead>
 			        		<tr>
@@ -152,7 +154,7 @@
 							<TMPL_IF tab_reserved_active>
 	    						<TMPL_LOOP accounts>
 	        						<tr <TMPL_IF __odd__> class="odd" </TMPL_IF>>
-		        						<td class="b-tokens-items-subject"><input type="checkbox" value="<TMPL_VAR id>" /><tmpl_var desc></td>
+		        						<td class="b-tokens-items-subject"><input type="checkbox" name="account_id" value="<TMPL_VAR id>" /><tmpl_var desc></td>
 			        					<td class="b-tokens-items-amount"><tmpl_var blocked></td>
 				        				<td class="b-tokens-items-amount"><tmpl_var balance></td>
 					         		</tr>
@@ -170,7 +172,7 @@
 						</tbody>
 		        		<tfoot class="b-tokens-reserved b-tokens-items">
 	        				<tr class="b-shop-tokens-total">
-		        				<td class="b-tokens-items-button"><input type="submit" value="<tmpl_var expr="ml('wallet.bml.reserved.takeoff')">" class="b-input-tokens-total" /> <strong><tmpl_var expr="ml('wallet.bml.reserved.total')"></strong></td>
+		        				<td class="b-tokens-items-button"><input type="submit" value="<tmpl_var expr="ml('wallet.bml.reserved.takeoff')">" class="b-input-tokens-total" /><strong><tmpl_var expr="ml('wallet.bml.reserved.total')"></strong></td>
 			        			<td class="b-tokens-items-total"><tmpl_var total_blocked></td>
 				        		<td class="b-tokens-items-total"><tmpl_var total_balance></td>
 					        </tr>

Tags: bml, ljcom, nikulochkina, nnikulochkina, tmpl
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