Created
September 20, 2019 17:04
-
-
Save samhk222/71c6f53f9bb289cbd7469fba655e6b11 to your computer and use it in GitHub Desktop.
Página para fazer o teste do card 327- Dashboard Cotar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Simulação do cadastro de Cotar</title> | |
<!-- Bootstrap --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" | |
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div class="container-fluid"> | |
<h1>Submit Formulário</h1> | |
<form id="frm1" action="http://www.local.meucambio.com.br/api/v1/transactions/1/store" method="POST" | |
onsubmit="return false;"> | |
<div class="row"> | |
<div class="col-md-4"> | |
<label for="transaction_authorization_id">transaction_authorization_id</label> | |
<input type="text" class="form-control" id="transaction_authorization_id" | |
name="transaction_authorization_id" value="1"/> | |
</div> | |
<div class="col-md-4"> | |
<label for="amount">amount</label> | |
<input type="text" class="form-control" id="amount" name="amount" value="5.000,00"/> | |
</div> | |
</div> | |
<div class="row" style="margin-top: 10px;"> | |
<div class="col-md-8"> | |
<label class="radio-inline"> | |
<input type="radio" name="type" id="inlineRadio1" value="partial" checked> Partial | |
</label> | |
<label class="radio-inline"> | |
<input type="radio" name="type" id="inlineRadio2" value="full"> Full | |
</label> | |
</div> | |
</div> | |
<div class="row" style="margin-top: 10px;"> | |
<div class="col-md-8"> | |
<input type='button' name='btn_submit' id='btn_submit' class='btn btn-default' value='Enviar' | |
onclick="submeter()"/> | |
</div> | |
</div> | |
<div class="row"> | |
<div class='col-md-12'> | |
<div id="retorno"></div> | |
</div> | |
</div> | |
</form> | |
</div> | |
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<!-- Include all compiled plugins (below), or include individual files as needed --> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" | |
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" | |
crossorigin="anonymous"></script> | |
<script> | |
$(document).ready(function () { | |
}); | |
function submeter() { | |
$.ajax({ | |
type: "POST", | |
url: "http://www.local.meucambio.com.br/api/v1/transactions/" + $('#transaction_authorization_id').val() + "/store", | |
data: $("#frm1").serialize(), | |
dataType: 'json', | |
success: function (ret) { | |
console.log(ret); | |
$('#retorno').html(ret); | |
if (ret.success) { | |
// alert("Data Saved: " + ret.parm); | |
} | |
}, | |
beforeSend: function () { | |
} | |
}); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment