From 3745485e6cad286081eb7339d3f328eb9ef48cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Mon, 5 Sep 2016 13:11:02 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20urls=20et=20type=20op=C3=A9ration=20'init?= =?UTF-8?q?ial'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfet/static/kfet/js/history.js | 3 +++ kfet/templates/kfet/base_nav.html | 2 +- kfet/templates/kfet/kpsul.html | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kfet/static/kfet/js/history.js b/kfet/static/kfet/js/history.js index cc4748ab..291c106d 100644 --- a/kfet/static/kfet/js/history.js +++ b/kfet/static/kfet/js/history.js @@ -31,6 +31,9 @@ function KHistory(options={}) { if (ope['type'] == 'purchase') { infos1 = ope['article_nb']; infos2 = ope['article__name']; + } else if (ope['type'] == 'initial') { + infos1 = parsed_amount.toFixed(2)+'€'; + infos2 = 'Initial'; } else { infos1 = parsed_amount.toFixed(2)+'€'; infos2 = (ope['type'] == 'deposit') ? 'Charge' : 'Retrait'; diff --git a/kfet/templates/kfet/base_nav.html b/kfet/templates/kfet/base_nav.html index 4bfc7be4..b5c98375 100644 --- a/kfet/templates/kfet/base_nav.html +++ b/kfet/templates/kfet/base_nav.html @@ -51,7 +51,7 @@ {% endif %} {% if user.is_authenticated %} -
  • +
  • {% endif %} diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index 56ba42d9..3ac32345 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -192,7 +192,9 @@ $(document).ready(function() { var buttons = ''; if (account_data['id'] != 0) { - buttons += ''; + var url_base = '{% url 'kfet.account.read' 'LIQ' %}'; + url_base = url_base.substr(0, url_base.length - 3); + buttons += ''; } if (account_data['id'] == 0) { var trigramme = triInput.val().toUpperCase();