JBAS-2089 Remove keychain and pride cards
authorBill Erickson <berickxx@gmail.com>
Tue, 14 Aug 2018 18:45:09 +0000 (14:45 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Additionally, since there are no longer any keychain cards, hide the
card type selector and display the wallet cards by default

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/openils/var/templates_kcls/opac/register.tt2

index 824ff0a..6ae3e7f 100644 (file)
@@ -38,10 +38,11 @@ card_url = '/images/patron_cards/';
 wallet_cards = [
   'Card_blank', 
   '2016_Dog_Card',
-  'Card_Pride',
+# 'Card_Pride',
   '2016_Sasquatch_Card'
 ];
-keychain_cards = ['Keychain_red'];
+#keychain_cards = ['Keychain_red']; 
+keychain_cards = [];
 
 MACRO input_field(fclass, fname, label, type, css_class, value) BLOCK;
   field_path = fclass _ "." _ fname; 
@@ -327,6 +328,8 @@ END; # input_field()
       <input type="hidden" name="return-to"  value="[% return_to %]"/>
       <input type="hidden" name="kiosk" value="[% kiosk %]"/>
       <ul>
+        <!-- if there are no keychain cards, hide the card type selector -->
+        [% IF keychain_cards.size > 0 %]
         <li>
           <label>Choose a card size....</label>
           <span class="patron-reg-required">*</span>
@@ -345,8 +348,15 @@ END; # input_field()
             </ul>
           </div>
         </li>
-        <li id='wallet-cards' style='display:none'>
+        [% END %]
+        <!-- if there are no keychain cards, show the wallet cards by default -->
+        <li id='wallet-cards' 
+          [% IF keychain_cards.size > 0 %]style='display:none'[% END %]>
+          [% IF keychain_cards.size > 0 %]
           <label>Wallet Options</label>
+          [% ELSE %]
+          <label>Choose a card:</label><br/><br/>
+          [% END %]
           <div class="grid">
             [% FOR ctype IN wallet_cards %]
             <div class="grid-cell">