Fix urls et type opération 'initial'

This commit is contained in:
Aurélien Delobelle 2016-09-05 13:11:02 +02:00
parent 4ff963b5cb
commit 3745485e6c
3 changed files with 7 additions and 2 deletions

View file

@ -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';

View file

@ -51,7 +51,7 @@
</li>
{% endif %}
{% if user.is_authenticated %}
<li><a href="/logout?next=/k-fet/" title="Déconnexion"><span class="glyphicon glyphicon-log-out"></span></a></li>
<li><a href="{% url 'gestioncof.views.logout' %}?next=/k-fet/" title="Déconnexion"><span class="glyphicon glyphicon-log-out"></span></a></li>
{% endif %}
</ul>
</div>

View file

@ -192,7 +192,9 @@ $(document).ready(function() {
var buttons = '';
if (account_data['id'] != 0) {
buttons += '<a href="/k-fet/accounts/'+account_data['trigramme']+'" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>';
var url_base = '{% url 'kfet.account.read' 'LIQ' %}';
url_base = url_base.substr(0, url_base.length - 3);
buttons += '<a href="'+ url_base + account_data['trigramme']+'" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>';
}
if (account_data['id'] == 0) {
var trigramme = triInput.val().toUpperCase();