Skip to content

Commit

Permalink
change payment forms location
Browse files Browse the repository at this point in the history
  • Loading branch information
Sapbasu15 committed May 13, 2016
1 parent 621507a commit 7307562
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function parseQueryString(str) {
parentFrame = argument.parent.split('/')[4];
console.log(params);
console.log(parentFrame);
//alert(params['height']);
$frame = null;
switch(parentFrame){
case "manage" : $frame = $("#load_profile");break;
Expand All @@ -63,7 +64,7 @@ function parseQueryString(str) {
switch(params['action']){
case "resizeWindow" : if( parentFrame== "manage" && parseInt(params['height'])<1150) params['height']=1150;
$frame.outerHeight(parseInt(params['height']));
$frame.css("border","1px solid #CCC");
$frame.css("border","2px double #CCC");
break;
case "successfulSave" : $('#myModal').modal('hide'); location.reload(false); break;
case "cancel" : switch(parentFrame){
Expand Down Expand Up @@ -179,6 +180,23 @@ function showTab(target){

<?php include 'getProfiles.php'; ?>

<div class="panel" id="iframe_holder">
<iframe id="load_profile" class="embed-responsive-item" name="load_profile" width="100%" height="1150px" frameborder="0" scrolling="no" hidden="true">
</iframe>

<iframe id="add_payment" class="embed-responsive-item" name="add_payment" width="100%" frameborder="0" scrolling="no" hidden="true">
</iframe>

<iframe id="edit_payment" class="embed-responsive-item" name="edit_payment" width="100%" frameborder="0" scrolling="no" hidden="true">
</iframe>

<form id="send_token" action="" method="post" target="load_profile" >
<input type="hidden" name="token" value="<?php echo $response->token ?>" />
<input type="hidden" name="paymentProfileId" value="" />
<input type="hidden" name="shippingAddressId" value="" />
</form>
</div>

<div class="tab-content">

<div class="tab-pane panel col-centered text-center" id="home" style="background: floralwhite; ">
Expand Down Expand Up @@ -240,22 +258,7 @@ function showTab(target){
</div>
</div>

<div class="panel" id="iframe_holder">
<iframe id="load_profile" class="embed-responsive-item" name="load_profile" width="100%" height="1150px" frameborder="0" scrolling="no" hidden="true">
</iframe>

<iframe id="add_payment" class="embed-responsive-item" name="add_payment" width="100%" frameborder="0" scrolling="no" hidden="true">
</iframe>

<iframe id="edit_payment" class="embed-responsive-item" name="edit_payment" width="100%" frameborder="0" scrolling="no" hidden="true">
</iframe>

<form id="send_token" action="" method="post" target="load_profile" >
<input type="hidden" name="token" value="<?php echo $response->token ?>" />
<input type="hidden" name="paymentProfileId" value="" />
<input type="hidden" name="shippingAddressId" value="" />
</form>
</div>


<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
Expand Down

0 comments on commit 7307562

Please sign in to comment.