JBAS-1326 C/O history TPAC cross-port
authorBill Erickson <berickxx@gmail.com>
Mon, 16 May 2016 14:22:57 +0000 (10:22 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/openils/var/templates_kcls/opac/myopac/circ_history.tt2
KCLS/openils/var/templates_kcls/opac/myopac/prefs_settings.tt2

index 895356b..ee43670 100644 (file)
     </div>
     [% ELSE %]
 
+        <form method="post" id="circ-form"
+            onsubmit="return confirm('[% l("Are you sure you wish to delete the selected item(s)?") %]');">
+        <table cellpadding='0' cellspacing='0' class="item_list_padding">
+            <tr>
+                <td>
+                    <select name="action">
+                        <option value="delete">[% l('Delete Selected Titles') %]</option>
+                    </select>
+                </td>
+                <td style="padding-left:9px;">
+                    <input type="submit"
+                        value="[% l('Go') %]"
+                        alt="[% l('Go') %]" title="[% l('Go') %]"
+                        class="opac-button" />
+                </td>
+                <!--
+                <td style="padding-left:5px;">
+                    <a href="#"><img alt="[% l('Deleting Help') %]"
+                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                </td>
+                -->
+            </tr>
+        </table>
     <div id='checked_main'>
         <table style='border-collapse:collapse;'>
             <thead id="acct_checked_main_header">
                 <tr>
+                    <td align="center">
+                        <input type="checkbox" onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
+                    </td>
                     <td width="25%" style="padding-left:5px;">
                         <span title="Click to sort" class='pointer'>[% l('Title') %]</span>
                     </td>
@@ -71,6 +97,9 @@
                     attrs = {marc_xml => circ.marc_xml};
                     PROCESS get_marc_attrs args=attrs; %]
                     <tr>
+                        <td align="center" style="text-align:center;">
+                          <input type="checkbox" name="circ_id" value="[% circ.circ.id %]" />
+                        </td>
                         <td style="padding-left:5px;padding-bottom:10px;">
                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
                                 name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
             </tbody>
         </table>
     </div>
+    </form>
     [% END %]
 </div>
 [% END %]
index 4fa1e54..396929a 100644 (file)
@@ -7,6 +7,7 @@
 
     <form method='POST'>
 
+        [% IF !ctx.confirm_history_delete %]
         <div style="float:right;width:65px;">
             <div style="position:absolute">
                 <div style="position:relative;top:75px;">
                 </div>
             </div>
         </div>
+        [% END %]
 
         <table class="full-width data_grid" id="acct_search_main">
             <tbody>
 
-                [% IF ctx.updated_user_settings %]
+                [% IF ctx.confirm_history_delete %]
+                <tr><td colspan='2'>
+                  <div id='clear-history-confirm' class='renew-summary'>
+                  [% l('Disabling checkout or holds history will permanently remove all items from your history.') %]
+                  <br/>
+                  [% l('Are you sure you wish to continue?') %]
+                  </div>
+                  <a href="[% mkurl() %]">[% l('Cancel') %]</a>
+                  <input type='hidden' name='history_delete_confirmed' value='1'/>
+                  <input type="submit" value="[% l('Confirm') %]" class="opac-button"/>
+                </td></tr>
+                [% ELSIF ctx.updated_user_settings %]
                 <tr><td colspan='2'>
                     <div class='renew-summary'>
                         [% l('Account Successfully Updated') %]
@@ -26,7 +39,7 @@
                 </td></tr>
                 [% END %]
 
-                <tr >
+                <tr>
                     <td width='20%'>[% l("Search hits per page") %]</td>
                     <td>
                         <div style="position:absolute">
@@ -76,7 +89,8 @@
                     <td>
                         [% setting = 'history.circ.retention_start' %]
                         <input name='[% setting %]' type="checkbox"
-                            [% IF ctx.user_setting_map.$setting; %] checked='checked' [% END %]/>
+                            [% IF ctx.user_setting_map.$setting 
+                              AND !ctx.clear_circ_history %] checked='checked' [% END %]/>
                     </td>
                 </tr>
                 <tr>
@@ -84,7 +98,8 @@
                     <td>
                         [% setting = 'history.hold.retention_start' %]
                         <input name='[% setting %]' type="checkbox"
-                            [% IF ctx.user_setting_map.$setting; %] checked='checked' [% END %]/>
+                            [% IF ctx.user_setting_map.$setting
+                              AND !ctx.clear_hold_history %] checked='checked' [% END %]/>
                     </td>
                 </tr>