Bugzilla – Attachment 49497 Details for
Bug 3669
Create a template for circ/add_message.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3669: Moving 'Add a new message' into a pop up box and adding to patron toolbar
Bug-3669-Moving-Add-a-new-message-into-a-pop-up-bo.patch (text/plain), 6.94 KB, created by
Aleisha Amohia
on 2016-03-24 00:32:30 UTC
(
hide
)
Description:
Bug 3669: Moving 'Add a new message' into a pop up box and adding to patron toolbar
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-03-24 00:32:30 UTC
Size:
6.94 KB
patch
obsolete
>From 430eddf4f1635c38d31c92700453e06c306e2f4e Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Thu, 24 Mar 2016 00:28:42 +0000 >Subject: [PATCH] Bug 3669: Moving 'Add a new message' into a pop up box and > adding to patron toolbar > >This patch moves all the code into an include which can be accessed from the 'Add a new message' link or the patron toolbar. > >To test: >1) Go to a patron circ page (circ/circulation.pl?borrowernumber=X) >2) Click 'Add a new message' under Messages >3) Confirm this brings up the modal to add a message. Confirm clicking Save saves your message. If it is an OPAC message (for the user), confirm it shows as expected on the OPAC. >4) Click Cancel. Confirm this closes the modal. >5) Click 'Add message' button in toolbar. Complete steps 3 and 4. > >Sponsored-by: Catalyst IT >--- > .../prog/en/includes/member-add-message.inc | 33 +++++++++++++ > .../prog/en/includes/members-toolbar.inc | 2 + > .../prog/en/modules/circ/circulation.tt | 51 +++++--------------- > 3 files changed, 48 insertions(+), 38 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc >new file mode 100644 >index 0000000..7c7be9c >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc >@@ -0,0 +1,33 @@ >+[% USE Koha %] >+ >+<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f"> >+<fieldset id="borrower_messages" class="brief"> >+<legend>Leave a message</legend> >+ <ol> >+ <li> >+ <label for="message_type">Add a message for:</label> >+ <select name="message_type" id="message_type"> >+ <option value="L">Staff - Internal note</option> >+ <option value="B">OPAC - [% firstname %] [% surname %]</option> >+ </select> >+ </li> >+ [% IF ( canned_bor_notes_loop ) %] >+ <li> >+ <label for="type">Predefined notes: </label> >+ <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;"> >+ <option value="">Select note</option> >+ [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %] >+ <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option> >+ [% END %] >+ </select> >+ </li> >+ [% END %] >+ <li> >+ <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea> >+ </li> >+ </ol> >+ >+ <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >+ <input type="hidden" name="branchcode" value="[% branch %]" /> >+</fieldset> >+ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index 9ecce10..b05c37b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -170,6 +170,8 @@ function searchToHold(){ > <a id="searchtohold" class="btn btn-small" href="#"><i class="fa fa-search"></i> Search to hold</a> > [% END %] > >+ <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal" class="btn btn-small"><i class="fa fa-comment-o"></i> Add message</a> >+ > <div class="btn-group"> > <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button> > <ul class="dropdown-menu"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index eaae5d7..b6099fe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -45,7 +45,6 @@ var relatives_borrowernumbers = new Array(); > relatives_borrowernumbers.push("[% b %]"); > [% END %] > >-var MSG_ADD_MESSAGE = _("Add a new message"); > var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > > columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %] >@@ -154,43 +153,6 @@ $(document).ready(function() { > [% END %] > > <!-- INITIAL BLOC : PARAMETERS & BORROWER INFO --> >-<div style="display: none;" id="add_message_form"> >-<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f"> >-<fieldset id="borrower_messages" class="brief"> >-<legend>Leave a message</legend> >- <ol> >- <li> >- <label for="message_type">Add a message for:</label> >- <select name="message_type" id="message_type"> >- <option value="L">Staff - Internal note</option> >- <option value="B">OPAC - [% firstname %] [% surname %]</option> >- </select> >- </li> >- [% IF ( canned_bor_notes_loop ) %] >- <li> >- <label for="type">Predefined notes: </label> >- <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;"> >- <option value="">Select note</option> >- [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %] >- <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option> >- [% END %] >- </select> >- </li> >- [% END %] >- <li> >- <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea> >- </li> >- </ol> >- <fieldset class="action"> >- <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a> >- </fieldset> >- >- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >- <input type="hidden" name="branchcode" value="[% branch %]" /> >-</fieldset> >-</form> >-</div> >- > [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %] > > [% IF additional_materials %] >@@ -860,6 +822,19 @@ No patron matched <span class="ex">[% message %]</span> > [% END %]</li> > [% END %] > </ul> >+ <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal">Add a new message</a> >+ >+ <!-- Modal --> >+ <div id="add_message_form" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true"> >+ <div class="modal-body"> >+ [% INCLUDE 'member-add-message.inc' %] >+ </div> >+ <div class="modal-footer"> >+ <fieldset class="action"> >+ <input type="submit" value="Save" /> </form><a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a> >+ </fieldset> >+ </div> >+ </div> > </div> > > <!-- /If flagged -->[% END %] >-- >1.7.10.4
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 3669
:
49497
|
49610
|
49714
|
49716
|
49833
|
50044
|
50047
|
50100
|
50976
|
51353
|
51374
|
52277
|
52641
|
52642
|
52796