chiark / gitweb /
Use form-based buttons instead of hyperlinks
authorRichard Kettlewell <rjk@greenend.org.uk>
Thu, 5 Jun 2008 14:38:44 +0000 (15:38 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Thu, 5 Jun 2008 14:38:44 +0000 (15:38 +0100)
templates/disorder.css
templates/macros.tmpl
templates/playing.tmpl

index e76d2882159f0167a4c8d558361f486ee6e92b87..b460aaed19102698257c11aa56892698f533378c 100644 (file)
@@ -181,19 +181,12 @@ div.filesdirectories p.all {
 
 /* buttons *******************************************************************/
 
-button {
-  border: 0px;
-  background-color: transparent;
-  padding: 0px;
-  cursor: pointer
-  font-family: helvetica,sans-serif;
-  font-weight: normal;
-  font-variant: normal;
-  font-size: 12pt;
+form.button {
+  display: inline
 }
 
 /* Buttons and links that look like buttons share the same formatting */
-span.buttonouter, a.button {
+a.button {
   padding-top: 2px;
   border-width: 3px;
   border-color: #fefefe;       /* Off-white */
@@ -256,6 +249,10 @@ form.search {
   padding: 0.2em
 }
 
+form.search p {
+  display: inline
+}
+
 /* menu bar *******************************************************************/
 
 div.top {
index 5d33446c739945810a6080dc7a99330d37153472..3132e570eaf9167051768e9c6b4be46e26dbf520 100644 (file)
@@ -287,13 +287,16 @@ and then redefines macros as desired.
 @#  @long is the text to put in the caption
 @#  @action is the target action
 @define {actbutton} {text long action}
-        {<a class=button
-              href="@url?action=@action@back"
-              title="@long">@text</a>}
+        {<form method=GET class=button action="@url">
+           <input type=hidden name=action value="@action">
+           <input type=submit name=submit value="@text" title="@long">
+@formback@#
+         </form>}
+@# TODO @back support
 
-@# Expands to &back=manage or to nothing depending on context;
-@# see playing.tmpl.
+@# Used for inserting back= elements
 @define {back} {} {}
+@define {formback} {} {}
 
 Local variables:
 mode:sgml
index a7bb804cd4900f83c3b012e2c88be8066d265623..147333cdf5f2b84919f3faeb683787f24a622ec5 100644 (file)
@@ -52,9 +52,10 @@ USA
                 {@yes}
                 {@no}}
 
-  @# Expand to &back=manage or to nothing
-  @define {back} {}
-         {@ifmanage{&amp;back=manage}{}}
+  @ifmanage{
+    @define {back} {} {&amp;back=manage}
+    @define {formback} {} {<input type=hidden name=back value=manage>}
+  }{}
 }@#
 <html>
  <head>