Bugzilla – Attachment 160704 Details for
Bug 35329
Move patron searches to a modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35329: Move patron search to modal - erm
Bug-35329-Move-patron-search-to-modal---erm.patch (text/plain), 3.71 KB, created by
Jonathan Druart
on 2024-01-09 14:54:26 UTC
(
hide
)
Description:
Bug 35329: Move patron search to modal - erm
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-01-09 14:54:26 UTC
Size:
3.71 KB
patch
obsolete
>From 8741d1f20d3fdfb61e1aa82d2f8bbf8cf5fb7152 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Jan 2024 14:17:40 +0100 >Subject: [PATCH] Bug 35329: Move patron search to modal - erm > >Test plan: >Edit an agreement or a license >Add new user and click "Select user" to open the modal >Test with different user for the same agreement/license >--- > .../intranet-tmpl/prog/en/modules/erm/erm.tt | 5 ++++ > .../prog/js/vue/components/ERM/UserRoles.vue | 23 ++++++++----------- > 2 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt >index 5ff4bd56e6e..76746b5cd8b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt >@@ -5,6 +5,7 @@ > [% USE TablesSettings %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] >+[% PROCESS 'patron-search.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% FILTER collapse %] > [% t("E-resource management") | html %] › >@@ -48,6 +49,10 @@ > </script> > > [% Asset.js("js/vue/dist/erm.js") | $raw %] >+ [% INCLUDE 'select2.inc' %] >+ [% SET columns = ['cardnumber','name','category','branch','action'] %] >+ [% PROCESS patron_search_modal columns => columns, modal_title => t("Select user") %] >+ [% PROCESS patron_search_js columns => columns, filter => erm_users, actions => ["select"], preview_on_name_click => 1 %] > > [% END %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UserRoles.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UserRoles.vue >index b01bf183e23..dfb27d41a05 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UserRoles.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UserRoles.vue >@@ -22,10 +22,11 @@ > {{ user_role.patron_str }} > </span> > (<a >- href="#" >+ href="#patron_search_modal" > @click="selectUser(counter)" > class="btn btn-default" >- >{{ $__("Select user") }}</a >+ data-toggle="modal" >+ ><i class="fa fa-plus"></i> {{ $__("Select user") }}</a > >) > <span class="required">{{ $__("Required") }}</span> > </li> >@@ -91,23 +92,17 @@ export default { > this.user_roles.splice(counter, 1) > }, > selectUser(counter) { >- let select_user_window = window.open( >- "/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=select&filter=erm_users", >- "PatronPopup", >- "width=740,height=450,location=yes,toolbar=no," + >- "scrollbars=yes,resize=yes" >- ) > // This is a bit dirty, the "select user" window should be rewritten and be a Vue component > // but that's not for now... >- select_user_window.addEventListener( >- "beforeunload", >- this.newUserSelected, >- false >+ $(document).on( >+ "hidden.bs.modal", >+ "#patron_search_modal", >+ this.newUserSelected > ) >- select_user_window.counter = counter >+ this.selected_user_counter = counter > }, > newUserSelected(e) { >- let c = e.currentTarget.counter >+ let c = this.selected_user_counter > let selected_patron_id = > document.getElementById("selected_patron_id").value > let patron >-- >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 35329
:
160698
|
160699
|
160700
|
160701
|
160702
|
160703
|
160704
|
160705
|
160706
|
160728
|
160729
|
160733
|
160734
|
160735
|
160736
|
160737
|
160738
|
160739
|
160740
|
160741
|
160742
|
160743
|
160759
|
160760
|
160761
|
160762
|
160763
|
160768
|
160769
|
160770
|
160771
|
160773
|
160774
|
160940
|
160941
|
160943
|
160944
|
160945
|
160946
|
160947
|
160948
|
160949
|
160950
|
160951
|
160952
|
160953
|
160954
|
160955
|
160956
|
160957
|
160958
|
160959
|
161165
|
161166
|
161183
|
161184
|
161185
|
161186
|
161187
|
161188
|
161189
|
161190
|
161191
|
161192
|
161193
|
161194
|
161195
|
161196
|
161197
|
161198
|
161199
|
161259
|
161260
|
161274
|
161275
|
161276
|
161277
|
161278
|
161279
|
161280
|
161281
|
161282
|
161283
|
161284
|
161285
|
161286
|
161287
|
161288
|
161289
|
161290
|
161291
|
161292
|
161293
|
161294
|
161295
|
161398
|
161399
|
161400
|
161401
|
161402
|
161403
|
161404
|
161405
|
161406
|
161407
|
161408
|
161409
|
161410
|
161411
|
161412
|
161413
|
161414
|
161415
|
161416
|
161417
|
162436
|
162437
|
162438
|
162439
|
162440
|
162441
|
162442
|
162443
|
162444
|
162445
|
162446
|
162447
|
162448
|
162449
|
162450
|
162451
|
162452
|
162453
|
162454
|
162455
|
162456
|
162457
|
162670
|
162671
|
162713
|
162714