]> git.plutz.net Git - confetti/blobdiff - templates/cards.html.sh
introduce combined filter engine
[confetti] / templates / cards.html.sh
index 2eca4d15451d74fc97d991cedd33ddb7e55ee42c..377ccf8ebe478e39e3083e699cfed30dcc6014a8 100755 (executable)
@@ -16,7 +16,8 @@
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
 check_type(){
-  [ "${_GET[filtertype]}" = "$1" ] && echo 'checked="checked"'
+  #[ "${_GET[filtertype]}" = "$1" ] && echo 'checked="checked"'
+  [ "${_GET[filter]%%:*}" = "$1" ] && echo 'checked="checked"'
 }
 check_order(){
   [ "${_GET[order]}" = "$1" ] && echo 'checked="checked"'
@@ -40,18 +41,20 @@ cat <<EOF
     <input  id="zip" type="radio" name="filtertype" value="zip" $(check_type zip)>
     <label for="zip">$(l10n filter_zip)</label>
 
-    <input  id="telephone" type="radio" name="filtertype" value="telephone" $(check_type telephone)>
+    <input  id="telephone" type="radio" name="filtertype" value="TEL" $(check_type TEL)>
     <label for="telephone">$(l10n filter_phone)</label>
 
-    <input  id="birth" type="radio" name="filtertype" value="birth" $(check_type birth)>
+    <input  id="birth" type="radio" name="filtertype" value="BDAY" $(check_type BDAY)>
     <label for="birth">$(l10n filter_birthyear)</label>
 
+<!--
     ${profile_circus:+
     <input  id="course" type="radio" name="filtertype" value="course" $(check_type course)>
     <label for="course">$(l10n filter_course)</label>
     }
+-->
 
-    <input type="text" name="filter" value="${_GET[filter]}" placeholder="$(l10n filter_placeholder)"/>
+    <input type="text" name="filter" value="${_GET[filter]#*:}" placeholder="$(l10n filter_placeholder)"/>
   </fieldset>
 
   <fieldset class="order">