Subversion Repositories SmartDukaan

Rev

Rev 8018 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7285 rajveer 1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
	<head>
4
		<title>Recharge Top Up</title>
5
 
6
		<link type = "text/css" href = "css/pincode.css" rel = "stylesheet"/>
7
		<link type = "text/css" href = "css/colorbox.css" rel = "stylesheet"/>
8
		<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
9
		<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
10
	</head>
11
	<body>
12
		<h3>Recharge Topup</h3>
13
		#set($errorMsg=$action.getErrorMsg())
14
		#if(!$errorMsg.isEmpty())
15
        <div style="color:red">
16
            $errorMsg
17
        </div>
18
		#end
7363 rajveer 19
		Saholic wallet balance (with MobiSoc) is : INR $action.getSaholicRechargeBalance()<br>
7824 rajveer 20
		Spice Retail Current wallet balance is : INR $action.getWalletBalance(1)<br>
7749 rajveer 21
		Spice Online Retail Current wallet balance is : INR $action.getWalletBalance(2)
11652 kshitij.so 22
		<form id="recharge-topup" name="recharge-topup" action="" method="post"">
7285 rajveer 23
			<table>
24
				<tr>
25
					<td>Company:</td>
26
					<td>
11652 kshitij.so 27
						<select id="companyId" name="companyId">
8018 rajveer 28
                            <option value="1" selected>Spice Retail Ltd</option>
7824 rajveer 29
							<option value="2">Spice Online Retail Pvt Ltd</option>
7285 rajveer 30
						</select>
31
					</td>
32
				</tr>
33
				<tr>
34
					<td>Amount:</td>
35
					<td>
11652 kshitij.so 36
						<input id="amount" name="amount" type="text"/>
7285 rajveer 37
					</td>
38
				</tr>
39
				<tr>
40
					<td>&nbsp;</td>
41
					<td><input type="submit" value="Add amount"/></td>
42
				</tr>
43
            </table>
44
		</form>
45
 
46
		<br />
47
		<br />
48
		<br />
49
		<br />
50
 
51
	</body>
11652 kshitij.so 52
<script type="text/javascript">
53
$("#recharge-topup").live('submit', function(){
54
	var amt = $('#amount').val();
55
	var cmp = $( "#companyId option:selected" ).text();
56
	if (amt==isNaN(amt) || amt==null || amt==""){
57
		alert("Empty amount.");
58
		return false;
59
	}
60
	if(!confirm("Adding amount "+amt+" to "+cmp)){
61
		return false;
62
	}
63
	var data = $(this).serialize();
64
    jQuery.ajax({
65
        url: "/Support/recharge-topup",
66
        type: 'POST',
67
        data: data,
68
        async: false,
69
        success: function (data) {
70
			$('#recharge-topup')[0].reset();
71
		},
72
		error : function() {
73
		 	alert("OOPS!!!Failed to do changes.Try Again.");
74
			$('#recharge-topup')[0].reset();
75
		 },
76
        cache: false,
77
        contentType: "application/x-www-form-urlencoded",
78
        processData: false
79
    });
80
	location.reload();
81
    return false;
82
	});
83
</script>
7285 rajveer 84
</html>