Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[ljcom] r9481: LJSUP-6582: Custom Userheads: SMS paymen...

Committer: pkornilov
LJSUP-6582: Custom Userheads: SMS payments.
U   trunk/htdocs/js/pay.js
Modified: trunk/htdocs/js/pay.js
===================================================================
--- trunk/htdocs/js/pay.js	2010-09-09 20:31:02 UTC (rev 9480)
+++ trunk/htdocs/js/pay.js	2010-09-10 04:09:41 UTC (rev 9481)
@@ -294,16 +294,23 @@
 	
 	userheadsPaySms_click: function(e, userhead_id)
 	{
-		jQuery.event.fix(e).preventDefault();
+		e = jQuery.event.fix(e);
+		e.preventDefault();
+		var form_ary = jQuery(e.target).parents('form').serializeArray(),
+			obj = {
+				_widget_post: 1
+			}, i;
 		
+		for (i = -1; form_ary[++i];) {
+			obj['Widget[IPPU_UserHeadSmsPay]_' + form_ary[i].name] = form_ary[i].value;
+		}
+		
 		new LJWidgetIPPU_UserheadSmsPay({
 			title: this.ml_userheadsSmsPayTitle,
 			authToken: this.authToken
-		}, {
-			'Widget[IPPU_UserHeadSmsPay]_id': userhead_id,
-			'Widget[IPPU_UserHeadSmsPay]_to': LiveJournal.parseGetArgs(location+'').giftto || '',
-			_widget_post: 1
-		});
+		},
+			obj
+		);
 	},
 	
 	pageDiskquota: function()

Tags: js, ljcom, lusever
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