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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue (-2 / +7 lines)
Lines 21-27 Link Here
21
                <i class="fa fa-fw fa-check"></i>
21
                <i class="fa fa-fw fa-check"></i>
22
                <span v-html="confirmation.accept_label"></span>
22
                <span v-html="confirmation.accept_label"></span>
23
            </button>
23
            </button>
24
            <button id="close_modal" class="deny" @click="removeMessages">
24
            <button
25
                id="close_modal"
26
                class="deny"
27
                @click="removeConfirmationMessages"
28
            >
25
                <i class="fa fa-fw fa-remove"></i>
29
                <i class="fa fa-fw fa-remove"></i>
26
                <span v-html="confirmation.cancel_label"></span>
30
                <span v-html="confirmation.cancel_label"></span>
27
            </button>
31
            </button>
Lines 52-58 export default { Link Here
52
            is_submitting,
56
            is_submitting,
53
            is_loading,
57
            is_loading,
54
        } = storeToRefs(mainStore)
58
        } = storeToRefs(mainStore)
55
        const { removeMessages } = mainStore
59
        const { removeMessages, removeConfirmationMessages } = mainStore
56
        return {
60
        return {
57
            message,
61
            message,
58
            error,
62
            error,
Lines 62-67 export default { Link Here
62
            is_submitting,
66
            is_submitting,
63
            is_loading,
67
            is_loading,
64
            removeMessages,
68
            removeMessages,
69
            removeConfirmationMessages,
65
        }
70
        }
66
    },
71
    },
67
}
72
}
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js (-5 / +5 lines)
Lines 39-50 export const useMainStore = defineStore("main", { Link Here
39
            if(accept_callback) {
39
            if(accept_callback) {
40
                this._accept_callback = async () => {
40
                this._accept_callback = async () => {
41
                    await accept_callback()
41
                    await accept_callback()
42
                    this.removeMessages()
42
                    this.removeConfirmationMessage()
43
                }
43
                }
44
            }
44
            }
45
            this._error = null;
46
            this._warning = null;
47
            this._message = null;
48
            this._confirmation = confirmation;
45
            this._confirmation = confirmation;
49
            this.displayed_already = displayed; /* Is displayed on the current view */
46
            this.displayed_already = displayed; /* Is displayed on the current view */
50
        },
47
        },
Lines 58-63 export const useMainStore = defineStore("main", { Link Here
58
            }
55
            }
59
            this.displayed_already = true;
56
            this.displayed_already = true;
60
        },
57
        },
58
        removeConfirmationMessages(){
59
            this._confirmation = null;
60
            this._accept_callback = null;
61
        },
61
        submitting(){
62
        submitting(){
62
            this._is_submitting = true;
63
            this._is_submitting = true;
63
        },
64
        },
64
- 

Return to bug 32991