forked from DGNum/gestioCOF
fix url account neg K-Psul
This commit is contained in:
parent
6ba8c9e741
commit
ad661cab09
1 changed files with 5 additions and 2 deletions
|
@ -66,8 +66,11 @@ function getErrorsHtml(data) {
|
|||
content += '</ul>';
|
||||
}
|
||||
if ('negative' in data['errors']) {
|
||||
var url_base = "{% url 'kfet.account.update' LIQ}";
|
||||
url_base = url_base.substr(0, url_base.length - 8);
|
||||
if (window.location.pathname.startsWith('/gestion/')) {
|
||||
var url_base = '/gestion/k-fet/accounts/';
|
||||
} else {
|
||||
var url_base = '/k-fet/accounts/';
|
||||
}
|
||||
for (var i=0; i<data['errors']['negative'].length; i++) {
|
||||
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>';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue