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

(-)a/circ/add_message.pl (-2 / +2 lines)
Lines 51-55 Koha::Patron::Message->new( Link Here
51
    }
51
    }
52
)->store;
52
)->store;
53
53
54
print $input->redirect(
54
my $url = $input->referer();
55
    "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber");
55
print $input->redirect($url);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc (+32 lines)
Line 0 Link Here
1
[% USE Koha %]
2
3
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
4
<fieldset id="borrower_messages" class="brief">
5
<legend>Leave a message</legend>
6
        <ol>
7
    <li>
8
            <label for="message_type">Add a message for:</label>
9
          <select name="message_type" id="message_type">
10
            <option value="L">Staff - Internal note</option>
11
            <option value="B">OPAC - [% firstname %] [% surname %]</option>
12
        </select>
13
    </li>
14
    [% IF ( canned_bor_notes_loop ) %]
15
        <li>
16
                <label for="type">Predefined notes: </label>
17
                <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
18
                    <option value="">Select note</option>
19
                    [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
20
                    <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
21
                    [% END %]
22
                </select>
23
        </li>
24
    [% END %]
25
    <li>
26
        <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
27
    </li>
28
        </ol>
29
30
        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
31
        <input type="hidden" name="branchcode" value="[% branch %]" />
32
</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (+14 lines)
Lines 170-175 function searchToHold(){ Link Here
170
        <a id="searchtohold" class="btn btn-small" href="#"><i class="fa fa-search"></i> Search to hold</a>
170
        <a id="searchtohold" class="btn btn-small" href="#"><i class="fa fa-search"></i> Search to hold</a>
171
    [% END %]
171
    [% END %]
172
172
173
    <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal" class="btn btn-small"><i class="fa fa-comment-o"></i> Add message</a>
174
173
         <div class="btn-group">
175
         <div class="btn-group">
174
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
176
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
175
            <ul class="dropdown-menu">
177
            <ul class="dropdown-menu">
Lines 209-211 function searchToHold(){ Link Here
209
            </ul>
211
            </ul>
210
    </div>
212
    </div>
211
</div>
213
</div>
214
215
<!-- Modal -->
216
<div id="add_message_form" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true">
217
    <div class="modal-body">
218
        [% INCLUDE 'member-add-message.inc' %]
219
    </div>
220
    <div class="modal-footer">
221
        <fieldset class="action">
222
            <input type="submit" value="Save" /> </form><a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
223
        </fieldset>
224
    </div>
225
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-39 / +13 lines)
Lines 45-51 var relatives_borrowernumbers = new Array(); Link Here
45
    relatives_borrowernumbers.push("[% b %]");
45
    relatives_borrowernumbers.push("[% b %]");
46
[% END %]
46
[% END %]
47
47
48
var MSG_ADD_MESSAGE = _("Add a new message");
49
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
48
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
50
49
51
columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
50
columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
Lines 154-196 $(document).ready(function() { Link Here
154
[% END %]
153
[% END %]
155
154
156
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
155
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
157
<div style="display: none;" id="add_message_form">
158
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
159
<fieldset id="borrower_messages" class="brief">
160
<legend>Leave a message</legend>
161
	<ol>
162
    <li>
163
            <label for="message_type">Add a message for:</label>
164
          <select name="message_type" id="message_type">
165
            <option value="L">Staff - Internal note</option>
166
            <option value="B">OPAC - [% firstname %] [% surname %]</option>
167
        </select>
168
    </li>
169
    [% IF ( canned_bor_notes_loop ) %]
170
        <li>
171
                <label for="type">Predefined notes: </label>
172
                <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
173
                    <option value="">Select note</option>
174
                    [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
175
                    <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
176
                    [% END %]
177
                </select>
178
        </li>
179
    [% END %]
180
    <li>
181
        <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
182
    </li>
183
	</ol>
184
    <fieldset class="action">
185
        <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
186
    </fieldset>
187
188
        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
189
        <input type="hidden" name="branchcode" value="[% branch %]" />
190
</fieldset>
191
</form>
192
</div>
193
194
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
156
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
195
157
196
[% IF additional_materials %]
158
[% IF additional_materials %]
Lines 854-859 No patron matched <span class="ex">[% message %]</span> Link Here
854
                [% END %]</li>
816
                [% END %]</li>
855
            [% END %]
817
            [% END %]
856
        </ul>
818
        </ul>
819
        <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal">Add a new message</a>
820
821
          <!-- Modal -->
822
          <div id="add_message_form" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true">
823
              <div class="modal-body">
824
                  [% INCLUDE 'member-add-message.inc' %]
825
              </div>
826
              <div class="modal-footer">
827
                  <fieldset class="action">
828
                      <input type="submit" value="Save" /> </form><a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
829
                  </fieldset>
830
              </div>
831
          </div>
857
    </div>
832
    </div>
858
833
859
</div>
834
</div>
860
- 

Return to bug 3669