]> git.plutz.net Git - confetti/commitdiff
improved styling for filter input
authorpaul <paul@plutz.net>
Mon, 7 Nov 2016 19:05:45 +0000 (19:05 +0000)
committerpaul <paul@plutz.net>
Mon, 7 Nov 2016 19:05:45 +0000 (19:05 +0000)
svn path=/trunk/; revision=137

static/cards.css
templates/cards.html.sh

index 9397dc34b8a5ca1cf19d117979d36e2ec447b0ef..5d78a0fd4e1ae975f445c81db1e8d0f77107e88e 100644 (file)
   margin-top: .5em;
 }
 
+.filter fieldset.item { padding-left: 0; }
+.filter fieldset.item legend { display: none; }
+.filter fieldset.item input[type=text] {
+  background-color: #FFF;
+  border: 1px solid #000;
+  margin-top: -1px;
+  padding: .25em .5em;
+}
+.filter fieldset.item input[type=radio] { display: none; }
+.filter fieldset.item input[type=radio] + label {
+  position: relative; z-index: 1;
+  margin: 0; padding: .25em 1em;
+  
+}
+.filter fieldset.item input[type=radio]:checked + label {
+  background-color: #FFF;
+  border: 1px solid #000;
+  border-bottom-color: #FFF;
+}
+
 .newcard {
   display: block;
   border: solid 1px;
index df630c0e0d8ffd89460b0fc9f1c84182585a9be6..2eca4d15451d74fc97d991cedd33ddb7e55ee42c 100755 (executable)
@@ -26,21 +26,35 @@ cat <<EOF
 <form class="filter" action="?action=filter_card" method="POST">
   <h1>$(l10n filter_label)</h1>
   <input type="hidden" name="page" value="cards"/>
-  <input type="text" name="filter" value="${_GET[filter]}" placeholder="$(l10n filter_placeholder)"/>
-  <br />
-  <fieldset>
-  <legend>$(l10n filter_type):</legend>
-    <label><input type="radio" name="filtertype" value="any"       $(check_type any)      >$(l10n filter_all)</label>
-    <label><input type="radio" name="filtertype" value="name"      $(check_type name)     >$(l10n filter_name)</label>
-    <label><input type="radio" name="filtertype" value="street"    $(check_type street)   >$(l10n filter_street)</label>
-    <label><input type="radio" name="filtertype" value="zip"       $(check_type zip)      >$(l10n filter_zip)</label>
-    <label><input type="radio" name="filtertype" value="telephone" $(check_type telephone)>$(l10n filter_phone)</label>
-    <label><input type="radio" name="filtertype" value="birth"     $(check_type birth)    >$(l10n filter_birthyear)</label>
+  <fieldset class="item">
+  <legend>$(l10n filter_item):</legend>
+    <input  id="any" type="radio" name="filtertype" value="any" $(check_type any)>
+    <label for="any" >$(l10n filter_all)</label>
+
+    <input  id="name" type="radio" name="filtertype" value="name" $(check_type name)>
+    <label for="name">$(l10n filter_name)</label>
+
+    <input  id="street" type="radio" name="filtertype" value="street" $(check_type street)>
+    <label for="street">$(l10n filter_street)</label>
+
+    <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)>
+    <label for="telephone">$(l10n filter_phone)</label>
+
+    <input  id="birth" type="radio" name="filtertype" value="birth" $(check_type birth)>
+    <label for="birth">$(l10n filter_birthyear)</label>
+
     ${profile_circus:+
-    <label><input type="radio" name="filtertype" value="course"    $(check_type course)   >$(l10n filter_course)</label>
+    <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)"/>
   </fieldset>
-  <fieldset>
+
+  <fieldset class="order">
     <legend>$(l10n filter_order):</legend>
     <label><input type="radio" name="order" value="firstname" $(check_order firstname)>$(l10n filter_firstname)</label>
     <label><input type="radio" name="order" value="lastname"  $(check_order lastname) >$(l10n filter_lastname)</label>