diff --git a/kfet/static/kfet/js/kfet.js b/kfet/static/kfet/js/kfet.js
index 1ff3c583..2030304f 100644
--- a/kfet/static/kfet/js/kfet.js
+++ b/kfet/static/kfet/js/kfet.js
@@ -150,6 +150,12 @@ function getErrorsHtml(data) {
content += '
Opération invalide sur le compte ' + data['errors']['account'] + '';
content += '';
}
+ if ('frozen' in data['errors']) {
+ content += 'Général';
+ content += '';
+ content += '- Les comptes suivants sont gelés : ' + data['errors']['frozen'].join(", ") + '
';
+ content += '
';
+ }
return content;
}
@@ -206,6 +212,17 @@ function requestAuth(data, callback, focus_next = null) {
});
}
+function displayErrors(html) {
+ $.alert({
+ title: 'Erreurs',
+ content: html,
+ backgroundDismiss: true,
+ animation: 'top',
+ closeAnimation: 'bottom',
+ keyboardEnabled: true,
+ });
+}
+
/**
* Setup jquery-confirm
diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html
index 03ade3c6..ece98578 100644
--- a/kfet/templates/kfet/kpsul.html
+++ b/kfet/templates/kfet/kpsul.html
@@ -340,21 +340,6 @@ $(document).ready(function() {
$('#id_comment').val('');
}
- // -----
- // Errors ajax
- // -----
-
- function displayErrors(html) {
- $.alert({
- title: 'Erreurs',
- content: html,
- backgroundDismiss: true,
- animation: 'top',
- closeAnimation: 'bottom',
- keyboardEnabled: true,
- });
- }
-
// -----
// Perform operations
// -----
diff --git a/kfet/templates/kfet/transfers_create.html b/kfet/templates/kfet/transfers_create.html
index e4fae405..52505f00 100644
--- a/kfet/templates/kfet/transfers_create.html
+++ b/kfet/templates/kfet/transfers_create.html
@@ -121,6 +121,9 @@ $(document).ready(function () {
case 403:
requestAuth(data, performTransfers);
break;
+ case 400:
+ displayErrors(getErrorsHtml(data));
+ break;
}
});
}