Local fix for OPAC SMS Carrier problem
authorTerran McCanna <tmccanna@georgialibraries.org>
Wed, 12 Jan 2022 21:18:23 +0000 (16:18 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 20:08:49 +0000 (15:08 -0500)
This updates some OPAC fixes that didn't make it into the PINES
version.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/holds/edit.tt2
Open-ILS/src/templates-bootstrap/opac/parts/sms_carrier_selector.tt2

index c1a2444..d7e9c0d 100755 (executable)
@@ -1,6 +1,7 @@
 [%  PROCESS "opac/parts/header.tt2";
     PROCESS "opac/parts/misc_util.tt2";
     PROCESS "opac/parts/hold_status.tt2";
+       PROCESS "opac/parts/hold_notify.tt2";
     PROCESS "opac/parts/myopac/column_sort_support.tt2";
     WRAPPER "opac/parts/myopac/base.tt2";
     myopac_page = "holds";
@@ -41,7 +42,7 @@
 
           </div>
             </div>
-            <div class="col-6">
+            <div class="col-8">
              [% IF offset != 0 %]<a href='[% mkurl('holds', {limit => limit,offset => (offset - limit)}) %]'
               ><span class="np_nav_link classic_link btn btn-action">&#9668;[% l('Previous') %]</span></a> [% END %]
 
@@ -88,6 +89,7 @@
                 <th>[% l('Pickup Location') %]</th>
                 <th>[% l('Cancel if not filled by') %]</th>
                 <th>[% l('Status') %]</th>
+                               <th>[% l('Notify Method') %]</th>
                 <th>[% l('Notes') %]</th>
                 <th>[% l('Edit') %]</th>
             </tr>
                             [% PROCESS get_hold_status hold=hold; %]
                         </div>
                     </td>
+                                       <td>
+                    <span class="sr-only">Notify Method</span>
+                        <div>
+                            [% PROCESS get_hold_notify h=ahr; %]
+                        </div>
+                    </td>
                     <td class="hold_notes">
                     <span class="sr-only">Notes</span>
                     [%- FOREACH pubnote IN ahr.notes;
index 8991cba..6b79378 100755 (executable)
         </div>
 
         <div class="row">
-            <div class="col-12">
+            <div class="col-12 mb-3">
             <strong>[% l('Status') %]</strong>: [% hold.human_status %]
             </div>
             <div class="col-12">
              <input type="hidden" name="action" value="edit" />
                             <input type="hidden" name="hold_id"
                                 value="[% ahr.id %]" />
-                            [% l('Pickup library') %]
+                            <div class="form-group">
+                            <label for="pickup_lib">[% l('Pickup library') %]</library>
 
                             [% INCLUDE build_org_selector
-                                name='pickup_lib' value=ahr.pickup_lib
+                                name='pickup_lib' id='pickup_lib' value=ahr.pickup_lib
                                 can_have_vols_only=1 hold_pickup_lib=1 %]
+                            </div>
             </div>
-            <div class="col-12">
+            <div class="col-sm-6">
             [% IF hold.hold.status < 3 OR hold.hold.status == 7 %]
                     [%# The following actions cannot be performed on holds that
                         have already been captured... %]
 
-                            [% l('Cancel unless filled by') %]
-
+                            <label for="expire_time">[% l('Cancel unless filled by') %]</label>
                             <div class="input-group date" data-provide="datepicker">
-                                <input type="text" class="form-control" name="expire_time"  value="[% expire_time | html %]" data-date-format="mm/dd/yyyy">
+                                <input type="text" class="form-control" id="expire_time" name="expire_time"
+                                    value="[% expire_time | html %]" data-date-format="mm/dd/yyyy">
                                 <div class="input-group-addon">
                                     <span class="glyphicon glyphicon-th"></span>
                                 </div>
                             </div>
 
+                            <div class="form-group mt-2">
+                                <label for="frozen">[% l('Active?') %]</label>
+                                <select class="form-control" name="frozen" id="frozen">
+                                    <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
+                                        [% l('Yes, this hold is active now') %]
+                                    </option>
+                                    <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
+                                        [% l('No, this hold is suspended') %]
+                                    </option>
+                                </select>
+                            </div>
 
-                            [% l('Active?') %]
-
-                            <select class="form-control" name="frozen">
-                                <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
-                                    [% l('Yes, this hold is active now') %]
-                                </option>
-                                <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
-                                    [% l('No, this hold is suspended') %]
-                                </option>
-                            </select>
-
-                            [% l('If suspended, activate on') %]
-
-                         <div class="input-group date" data-provide="datepicker">
+                            <label for="datepicker">[% l('If suspended, activate on') %]</label>
+                            <div class="input-group date" data-provide="datepicker">
                                 <input type="text" class="form-control" name="thaw_date" id="datepicker" value="[% thaw_date | html %]" data-date-format="mm/dd/yyyy">
                                 <div class="input-group-addon">
                                     <span class="glyphicon glyphicon-th"></span>
index 6d73370..30662e6 100755 (executable)
     END;
 %]
 [% IF NOT sms_carrier_hide_label; '<label for="sms_carrier">' _ l('Mobile carrier:') _ '</label>'; END; %]
-<select name="sms_carrier" id="sms_carrier" class="form-control" style="width:25em;" [% IF sms_carrier_hide_label; 'aria-label="' _ l('Mobile carrier:') _ '"'; END; %]>
+<select onchange="record_change(event)" name="sms_carrier" id="sms_carrier" [% IF sms_carrier_hide_label; 'aria-label="' _ l('Mobile carrier') _ '"'; END; %]>
     <option value="">[% l('Please select your mobile carrier') %]</option>
     [% FOR carrier IN carriers.sort('name','region') -%]
     <option value='[% carrier.id | html %]'[%
-        default_carrier == carrier.id ? ' selected="selected"' : ''
+        default_carrier == carrier.id || ahr.sms_carrier == carrier.id ? ' selected="selected"' : ''
     %]>[% carrier.name | html %] ([% carrier.region | html %])</option>
     [% END -%]
 </select>
-
+[% IF NOT sms_carrier_hide_warning; l('Note: carrier charges may apply'); END; %]