logging the TIPI urls in webserver by doing local GET in debug purposes.

Default value for cents given
This commit is contained in:
Serghei Mihai 2014-05-23 18:37:34 +02:00
parent 6789dcef73
commit a4fb868434
1 changed files with 14 additions and 1 deletions

View File

@ -5,6 +5,13 @@
<script type="text/javascript">
var popup;
var timer;
var log = true;
// for logging purposes
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
}
function reinit() {
document.getElementById('refdet_error').style.display='none';
@ -88,6 +95,7 @@ function call_tipi() {
{% endif %}
}};
var tipi_url = '{{ instance.url }}?saisie={{ instance.saisie }}&numcli=' + document.getElementById('numcli').value;
var log_url = '/?saisie={{ instance.saisie }}&numcli=' + document.getElementById('numcli').value;
var url_params = '&';
reinit();
@ -104,6 +112,11 @@ function call_tipi() {
var url = tipi_url;
url = tipi_url + url_params;
log_url = log_url + url_params;
if (log) {
xmlhttp.open('GET', log_url, true);
xmlhttp.send();
}
popup = window.open(url, 'tipi', 'height=800, width=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
document.getElementById('wip').style.display='block';
timer = setInterval(checkpopup, 400);
@ -177,7 +190,7 @@ function call_tipi() {
<li>
<label>{% trans "Montant" %}</label>
<input type='text' id='montant_euros' size="4" maxlength="4" placeholder="0000" tabindex="5" onkeyup="checkLen(this, this.value)" /> ,
<input type='text' id='montant_cents' size="2" maxlength="2" placeholder="00" tabindex="6" onkeyup="checkLen(this, this.value)" />
<input type='text' id='montant_cents' size="2" maxlength="2" placeholder="00" tabindex="6" onkeyup="checkLen(this, this.value)" value="00" />
<span class="error" id="montant_error">{% trans "montant invalide" %}</span>
</li>
<li>