Bugzilla – Attachment 162111 Details for
Bug 36084
Pass CSRF token to SVC scripts (1/2)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36084: Add a Dialog class
Bug-36084-Add-a-Dialog-class.patch (text/plain), 1.33 KB, created by
Jonathan Druart
on 2024-02-13 14:25:13 UTC
(
hide
)
Description:
Bug 36084: Add a Dialog class
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-02-13 14:25:13 UTC
Size:
1.33 KB
patch
obsolete
>From 92a681aa1f00ffcedc0034c372f5c1797db30229 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 13 Feb 2024 15:11:59 +0100 >Subject: [PATCH] Bug 36084: Add a Dialog class > >To display potential errors. >--- > .../intranet-tmpl/prog/js/fetch/http-client.js | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/http-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/http-client.js >index 225a5e6c521..1b3d081f1a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/http-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/http-client.js >@@ -1,4 +1,15 @@ >-//import { setError, submitting, submitted } from "../messages"; >+class Dialog { >+ constructor(options = {}){ >+ } >+ >+ setMessage(message){ >+ $("#messages").append('<div class="dialog message">%s</div>'.format(message)) >+ } >+ >+ setError(error){ >+ $("#messages").append('<div class="dialog alert">%s</div>'.format(error)) >+ } >+} > > class HttpClient { > constructor(options = {}) { >@@ -45,7 +56,7 @@ class HttpClient { > }) > .catch(err => { > error = err; >- //setError(err); >+ new Dialog().setError(err); > console.error(err); > }) > .then(() => { >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36084
:
162108
|
162109
|
162110
|
162111
|
162112
|
162133
|
162147
|
162150
|
162712