Fix url pour production
This commit is contained in:
parent
db4ae73dfd
commit
3d2583e2a0
3 changed files with 10 additions and 4 deletions
|
@ -66,8 +66,10 @@ function getErrorsHtml(data) {
|
|||
content += '</ul>';
|
||||
}
|
||||
if ('negative' in data['errors']) {
|
||||
var url_base = "{% url 'kfet.account.update' LIQ}";
|
||||
url_base = base_url(0, url_base.length-8);
|
||||
for (var i=0; i<data['errors']['negative'].length; i++) {
|
||||
content += '<a class="btn btn-primary" href="/k-fet/accounts/'+data['errors']['negative'][i]+'/edit" target="_blank" style="width:100%">Autorisation de négatif requise pour '+data['errors']['negative'][i]+'</a>';
|
||||
content += '<a class="btn btn-primary" href="'+url_base+data['errors']['negative'][i]+'/edit" target="_blank" style="width:100%">Autorisation de négatif requise pour '+data['errors']['negative'][i]+'</a>';
|
||||
}
|
||||
}
|
||||
if ('addcost' in data['errors']) {
|
||||
|
|
|
@ -213,8 +213,10 @@ $(document).ready(function() {
|
|||
content += '</ul>';
|
||||
}
|
||||
if ('negative' in data['errors']) {
|
||||
var url_base = "{% url 'kfet.account.update' LIQ}";
|
||||
url_base = base_url(0, url_base.length-8);
|
||||
for (var i=0; i<data['errors']['negative'].length; i++) {
|
||||
content += '<a class="btn btn-primary" href="/k-fet/accounts/'+data['errors']['negative'][i]+'/edit" target="_blank">Autorisation de négatif requise pour '+data['errors']['negative'][i]+'</a>';
|
||||
content += '<a class="btn btn-primary" href="'+url_base+data['errors']['negative'][i]+'/edit" target="_blank">Autorisation de négatif requise pour '+data['errors']['negative'][i]+'</a>';
|
||||
}
|
||||
}
|
||||
return content;
|
||||
|
|
|
@ -302,8 +302,10 @@ $(document).ready(function() {
|
|||
$('#checkout-last_statement_at').text(at_formated);
|
||||
var buttons = '';
|
||||
if (checkout_data['id'] !== 0) {
|
||||
buttons += '<a class="btn btn-primary" href="/k-fet/checkouts/'+checkout_data['id']+'/statements/add" title="Effectuer un relevé" target="_blank"><span class="glyphicon glyphicon-euro"></span></a>';
|
||||
buttons += '<a class="btn btn-primary" href="/k-fet/checkouts/'+checkout_data['id']+'" title="Modifier" target="_blank"><span class="glyphicon glyphicon-cog"></span></a>';
|
||||
var url_base = "{% url 'kfet.checkoutstatement.create' 1 %}";
|
||||
url_base = url_base.substr(0,url_base.length - 16);
|
||||
buttons += '<a class="btn btn-primary" href="'+url_base+checkout_data['id']+'/statements/add" title="Effectuer un relevé" target="_blank"><span class="glyphicon glyphicon-euro"></span></a>';
|
||||
buttons += '<a class="btn btn-primary" href="'+url_base+checkout_data['id']+'" title="Modifier" target="_blank"><span class="glyphicon glyphicon-cog"></span></a>';
|
||||
}
|
||||
checkout_container.find('.buttons').html(buttons);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue