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

(-)a/C4/Form/MessagingPreferences.pm (+1 lines)
Lines 122-127 sub set_form_values { Link Here
122
    my $messaging_options = C4::Members::Messaging::GetMessagingOptions();
122
    my $messaging_options = C4::Members::Messaging::GetMessagingOptions();
123
    PREF: foreach my $option ( @$messaging_options ) {
123
    PREF: foreach my $option ( @$messaging_options ) {
124
        my $pref = C4::Members::Messaging::GetMessagingPreferences( { %{ $target_params }, message_name => $option->{'message_name'} } );
124
        my $pref = C4::Members::Messaging::GetMessagingPreferences( { %{ $target_params }, message_name => $option->{'message_name'} } );
125
        $option->{ $option->{'message_name'} } = 1;
125
        # make a hashref of the days, selecting one.
126
        # make a hashref of the days, selecting one.
126
        if ( $option->{'takes_days'} ) {
127
        if ( $option->{'takes_days'} ) {
127
            my $days_in_advance = $pref->{'days_in_advance'} ? $pref->{'days_in_advance'} : 0;
128
            my $days_in_advance = $pref->{'days_in_advance'} ? $pref->{'days_in_advance'} : 0;
(-)a/admin/categorie.pl (-3 / +5 lines)
Lines 240-248 sub _get_brief_messaging_prefs { Link Here
240
        my $pref = C4::Members::Messaging::GetMessagingPreferences( { categorycode => $categorycode,
240
        my $pref = C4::Members::Messaging::GetMessagingPreferences( { categorycode => $categorycode,
241
                                                                    message_name       => $option->{'message_name'} } );
241
                                                                    message_name       => $option->{'message_name'} } );
242
        next unless  $pref->{'transports'};
242
        next unless  $pref->{'transports'};
243
        my $brief_pref = { message_attribute_id => $option->{'message_attribute_id'},
243
        my $brief_pref = {
244
                           message_name => $option->{'message_name'},
244
            message_attribute_id    => $option->{'message_attribute_id'},
245
                         };
245
            message_name            => $option->{'message_name'},
246
            $option->{'message_name'} => 1
247
        };
246
        foreach my $transport ( @{$pref->{'transports'}} ) {
248
        foreach my $transport ( @{$pref->{'transports'}} ) {
247
            push @{ $brief_pref->{'transports'} }, { transport => $transport };
249
            push @{ $brief_pref->{'transports'} }, { transport => $transport };
248
        }
250
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (-3 / +9 lines)
Lines 27-33 Link Here
27
    </tr>
27
    </tr>
28
    <!-- TMPL_LOOP name="messaging_preferences" -->
28
    <!-- TMPL_LOOP name="messaging_preferences" -->
29
    <tr>
29
    <tr>
30
      <td><!-- TMPL_VAR NAME="message_name" --></td>
30
      <td><!-- TMPL_IF NAME="Item DUE" -->Item DUE
31
          <!-- TMPL_ELSIF NAME="Advance Notice" -->Advance Notice
32
          <!-- TMPL_ELSIF NAME="Upcoming Events" -->Upcoming Events
33
          <!-- TMPL_ELSIF NAME="Hold Filled" -->Hold Filled
34
          <!-- TMPL_ELSIF NAME="Item Check-in" -->Item Check-in
35
          <!-- TMPL_ELSIF NAME="Item Checkout" -->Item Checkout
36
          <!-- TMPL_ELSE -->Unknown <!-- /TMPL_IF --></td>
31
      <!-- TMPL_IF NAME="takes_days" -->
37
      <!-- TMPL_IF NAME="takes_days" -->
32
      <td>
38
      <td>
33
          <!-- TMPL_IF NAME="messaging_form_inactive" -->
39
          <!-- TMPL_IF NAME="messaging_form_inactive" -->
Lines 45-51 Link Here
45
      <!-- TMPL_ELSE -->
51
      <!-- TMPL_ELSE -->
46
      <td>-</td>
52
      <td>-</td>
47
      <!-- /TMPL_IF -->
53
      <!-- /TMPL_IF -->
48
      <!-- TMPL_IF NAME="transport_sms" -->
54
<!--      <!-- TMPL_IF NAME="transport_sms" -->
49
      <!-- TMPL_IF NAME="SMSSendDriver" --><td>
55
      <!-- TMPL_IF NAME="SMSSendDriver" --><td>
50
          <!-- TMPL_IF NAME="messaging_form_inactive" -->
56
          <!-- TMPL_IF NAME="messaging_form_inactive" -->
51
                 <input type="checkbox"
57
                 <input type="checkbox"
Lines 61-67 Link Here
61
      </td><!-- /TMPL_IF -->
67
      </td><!-- /TMPL_IF -->
62
      <!-- TMPL_ELSE -->
68
      <!-- TMPL_ELSE -->
63
      <td>-</td>
69
      <td>-</td>
64
      <!-- /TMPL_IF -->
70
      <!-- /TMPL_IF --> -->
65
71
66
      <!-- TMPL_IF NAME="transport_email" -->
72
      <!-- TMPL_IF NAME="transport_email" -->
67
      <td>
73
      <td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl (-1 / +7 lines)
Lines 323-329 Confirm Deletion of Category <!-- TMPL_VAR NAME="categorycode" escape="html" --> Link Here
323
                        <td>
323
                        <td>
324
                            <!-- TMPL_IF NAME="messaging_prefs" -->
324
                            <!-- TMPL_IF NAME="messaging_prefs" -->
325
                                <!-- TMPL_LOOP NAME="messaging_prefs" -->
325
                                <!-- TMPL_LOOP NAME="messaging_prefs" -->
326
                                    <!-- TMPL_VAR NAME="message_name" --> :
326
                                    <!-- TMPL_IF NAME="Item DUE" -->Item DUE
327
                                    <!-- TMPL_ELSIF NAME="Advance Notice" -->Advance Notice
328
                                    <!-- TMPL_ELSIF NAME="Upcoming Events" -->Upcoming Events
329
                                    <!-- TMPL_ELSIF NAME="Hold Filled" -->Hold Filled
330
                                    <!-- TMPL_ELSIF NAME="Item Check-in" -->Item Check-in
331
                                    <!-- TMPL_ELSIF NAME="Item Checkout" -->Item Checkout
332
                                    <!-- TMPL_ELSE -->Unknown <!-- /TMPL_IF --> :
327
                                    <!-- TMPL_LOOP NAME="transports" -->
333
                                    <!-- TMPL_LOOP NAME="transports" -->
328
                                        <!-- TMPL_VAR NAME="transport" -->
334
                                        <!-- TMPL_VAR NAME="transport" -->
329
                                    <!-- /TMPL_LOOP -->
335
                                    <!-- /TMPL_LOOP -->
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl (-4 / +9 lines)
Lines 39-45 Link Here
39
    <tr><th>&nbsp;</th><th>Days in advance</th><!-- TMPL_IF NAME="SMSSendDriver" --><th>SMS</th><!-- /TMPL_IF --><th>Email</th><th>Digests only?</th><!-- <th>RSS</th> --><th>Do not notify</th></tr>
39
    <tr><th>&nbsp;</th><th>Days in advance</th><!-- TMPL_IF NAME="SMSSendDriver" --><th>SMS</th><!-- /TMPL_IF --><th>Email</th><th>Digests only?</th><!-- <th>RSS</th> --><th>Do not notify</th></tr>
40
    <!-- TMPL_LOOP name="messaging_preferences" -->
40
    <!-- TMPL_LOOP name="messaging_preferences" -->
41
    <tr>
41
    <tr>
42
      <td><!-- TMPL_VAR NAME="message_name" --></td>
42
      <td><!-- TMPL_IF NAME="Item DUE" -->Item DUE
43
          <!-- TMPL_ELSIF NAME="Advance Notice" -->Advance Notice
44
          <!-- TMPL_ELSIF NAME="Upcoming Events" -->Upcoming Events
45
          <!-- TMPL_ELSIF NAME="Hold Filled" -->Hold Filled
46
          <!-- TMPL_ELSIF NAME="Item Check-in" -->Item Check-in
47
          <!-- TMPL_ELSIF NAME="Item Checkout" -->Item Checkout
48
          <!-- TMPL_ELSE -->Unknown <!-- /TMPL_IF --></td>
43
      <!-- TMPL_IF NAME="takes_days" -->
49
      <!-- TMPL_IF NAME="takes_days" -->
44
      <td><select name="<!-- TMPL_VAR NAME="message_attribute_id" -->-DAYS">
50
      <td><select name="<!-- TMPL_VAR NAME="message_attribute_id" -->-DAYS">
45
          <!-- TMPL_LOOP name="select_days" -->
51
          <!-- TMPL_LOOP name="select_days" -->
Lines 52-65 Link Here
52
      <!-- TMPL_ELSE -->
58
      <!-- TMPL_ELSE -->
53
      <td>-</td>
59
      <td>-</td>
54
      <!-- /TMPL_IF -->
60
      <!-- /TMPL_IF -->
55
      <!-- TMPL_IF NAME="transport_sms" -->
61
<!--      <!-- TMPL_IF NAME="transport_sms" -->
56
      <!-- TMPL_IF NAME="SMSSendDriver" --><td><input type="checkbox"
62
      <!-- TMPL_IF NAME="SMSSendDriver" --><td><input type="checkbox"
57
                 id="sms<!-- TMPL_VAR NAME="message_attribute_id" -->"
63
                 id="sms<!-- TMPL_VAR NAME="message_attribute_id" -->"
58
                 name="<!-- TMPL_VAR NAME="message_attribute_id" -->"
64
                 name="<!-- TMPL_VAR NAME="message_attribute_id" -->"
59
                 value="sms" <!-- TMPL_VAR NAME="transport_sms"   --> onclick = "document.opacmessaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" /></td><!-- /TMPL_IF -->
65
                 value="sms" <!-- TMPL_VAR NAME="transport_sms"   --> onclick = "document.opacmessaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" /></td><!-- /TMPL_IF -->
60
      <!-- TMPL_ELSE -->
66
      <!-- TMPL_ELSE -->
61
      <td>-</td>
67
      <td>-</td>
62
      <!-- /TMPL_IF -->
68
      <!-- /TMPL_IF --> -->
63
69
64
      <!-- TMPL_IF NAME="transport_email" -->
70
      <!-- TMPL_IF NAME="transport_email" -->
65
      <td><input type="checkbox"
71
      <td><input type="checkbox"
66
- 

Return to bug 5889