View | Details | Raw Unified | Return to bug 36084
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/fetch/http-client.js (-3 / +13 lines)
Lines 1-4 Link Here
1
//import { setError, submitting, submitted } from "../messages";
1
class Dialog {
2
    constructor(options = {}){
3
    }
4
5
    setMessage(message){
6
        $("#messages").append('<div class="dialog message">%s</div>'.format(message))
7
    }
8
9
    setError(error){
10
        $("#messages").append('<div class="dialog alert">%s</div>'.format(error))
11
    }
12
}
2
13
3
class HttpClient {
14
class HttpClient {
4
    constructor(options = {}) {
15
    constructor(options = {}) {
Lines 45-51 class HttpClient { Link Here
45
            })
56
            })
46
            .catch(err => {
57
            .catch(err => {
47
                error = err;
58
                error = err;
48
                //setError(err);
59
                new Dialog().setError(err);
49
                console.error(err);
60
                console.error(err);
50
            })
61
            })
51
            .then(() => {
62
            .then(() => {
52
- 

Return to bug 36084