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

(-)a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js (-18 lines)
Lines 1-21 Link Here
1
$(document).ready(function(){
1
$(document).ready(function(){
2
    $(".none").click(function(){
3
        if($(this).prop("checked")){
4
            var rowid = $(this).attr("id");
5
            var newid = Number(rowid.replace("none",""));
6
            $("#sms"+newid).prop("checked", false);
7
            $("#email"+newid).prop("checked", false);
8
            $("#phone"+newid).prop("checked", false);
9
            $("#digest"+newid).prop("checked", false);
10
            $("#rss"+newid).prop("checked", false);
11
        }
12
    });
13
    $(".active_notify").on("change",function(){
14
        var attr_id = $(this).data("attr-id");
15
        if( $(this).prop("checked") ){
16
            $("#none" + attr_id ).prop("checked", false);
17
        }
18
    });
19
    $("#info_digests").tooltip();
2
    $("#info_digests").tooltip();
20
3
21
    var message_prefs_dirty = false;
4
    var message_prefs_dirty = false;
Lines 36-42 $(document).ready(function(){ Link Here
36
                    return;
19
                    return;
37
                }
20
                }
38
            }
21
            }
39
            $(".none").prop("checked", false); // When loading default prefs the "Do not notify" boxes should be cleared
40
            var jqxhr = $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode, function(data) {
22
            var jqxhr = $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode, function(data) {
41
                $.each(data.messaging_preferences, function(i, item) {
23
                $.each(data.messaging_preferences, function(i, item) {
42
                    var attrid = item.message_attribute_id;
24
                    var attrid = item.message_attribute_id;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-5 / +2 lines)
Lines 40-46 Link Here
40
                                        [% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]
40
                                        [% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]
41
                                        <th>Email</th>
41
                                        <th>Email</th>
42
                                        <th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="fa fa-info-circle"></i></th>
42
                                        <th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="fa fa-info-circle"></i></th>
43
                                        <!-- <th>RSS</th> --><th>Do not notify</th>
44
                                    </tr>
43
                                    </tr>
45
                                </thead>
44
                                </thead>
46
                                <tbody>
45
                                <tbody>
Lines 70-78 Link Here
70
                                            [% IF ( messaging_preference.transport_sms ) %]
69
                                            [% IF ( messaging_preference.transport_sms ) %]
71
                                                <td>
70
                                                <td>
72
                                                    [% IF ( messaging_preference.transports_sms ) %]
71
                                                    [% IF ( messaging_preference.transports_sms ) %]
73
                                                      <input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
72
                                                      <input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" checked="checked" />
74
                                                    [% ELSE %]
73
                                                    [% ELSE %]
75
                                                        <input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
74
                                                        <input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" />
76
                                                    [% END %]
75
                                                    [% END %]
77
                                                </td>
76
                                                </td>
78
                                            [% ELSE %]
77
                                            [% ELSE %]
Lines 123-129 Link Here
123
                                        <td>-</td>
122
                                        <td>-</td>
124
                                        [% END %]
123
                                        [% END %]
125
124
126
                                        <td><input type="checkbox" class="none" id="none[% messaging_preference.message_attribute_id | html %]" /></td>
127
                                    </tr>
125
                                    </tr>
128
                                [% END # / FOREACH messaging_preferences%]
126
                                [% END # / FOREACH messaging_preferences%]
129
                            </tbody>
127
                            </tbody>
130
- 

Return to bug 22744