A form.html => form.html +16 -0
@@ 0,0 1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta encoding=utf-8 />
+ <title>Test form</title>
+</head>
+<body>
+ <form>
+ <label><input type="checkbox" name="tos" checked value="yes" title="You must agree to the terms & conditions!" />I agree to the terms & conditions</label>
+ <label><input type="radio" name="char" value="kaley" />Kaley Fawn</label>
+ <label><input type="radio" name="char" value="horatio" />Prof Graw Horatio</label>
+ <label><input type="radio" name="char" value="udo" />Udo Malaaki</label>
+ <label><input type="radio" name="char" value="elgar" />Magus Elgar</label>
+ </form>
+</body>
+</html>
M src/Text/HTML/Form/WebApp.hs => src/Text/HTML/Form/WebApp.hs +22 -0
@@ 35,6 35,23 @@ renderInput form ix input@Input { multiple = True } [p] qs
renderInput form ix input [p] qs
| '=':v' <- Txt.unpack p = renderInput form ix input [] $
set (inputName input) (Txt.pack $ unEscapeString v') qs
+ | ':':v' <- Txt.unpack p = renderInput form ix input [] $
+ set (inputName input)
+ (Txt.pack (get (inputName input) qs ++ v')) qs
+ | "-" <- Txt.unpack p, v'@(_:_) <- get (inputName input) qs =
+ renderInput form ix input [] $ set (inputName input)
+ (Txt.pack $ Prelude.init v') qs
+ | "-" <- Txt.unpack p = renderInput form ix input [] qs
+renderInput form ix input [x, p] qs
+ | '=':v' <- Txt.unpack p = renderInput form ix input [x] $
+ set (inputName input) (Txt.pack $ unEscapeString v') qs
+ | ':':v' <- Txt.unpack p = renderInput form ix input [x] $
+ set (inputName input)
+ (Txt.pack (get (inputName input) qs ++ v')) qs
+ | "-" <- Txt.unpack p, v'@(_:_) <- get (inputName input) qs =
+ renderInput form ix input [x] $ set (inputName input)
+ (Txt.pack $ Prelude.init v') qs
+ | "-" <- Txt.unpack p = renderInput form ix input [x] qs
renderInput form ix input@Input {inputType="checkbox", inputName=k', value=v'} [] qs
| (utf8 k', Just $ utf8 v') `Prelude.elem` qs =
template "checkbox.html" form ix input $ unset k' v' qs
@@ 72,3 89,8 @@ set k' v' qs = (utf8 k', Just $ utf8 v'):[q | q@(k, _) <- qs, k /= utf8 k']
unset :: Text -> Text -> [(ByteString, Maybe ByteString)]
-> [(ByteString, Maybe ByteString)]
unset k' v' qs = [q | q@(k, v) <- qs, not (k == utf8 k' && v == Just (utf8 v'))]
+get :: Text -> [(ByteString, Maybe ByteString)] -> String
+get k' qs
+ | Just (Just ret) <- utf8 k' `lookup` qs =
+ Txt.unpack $ Txt.decodeUtf8 ret
+ | otherwise = ""
A starbuzz.html => starbuzz.html +32 -0
@@ 0,0 1,32 @@
+<form action="http://www.starbuzzcoffee.com/processorder.php" method="POST">
+ <p><label>Choose your beans: <select name="beans">
+ <option value="House Blend">House Blend</option>
+ <option value="Bolivia">Shade Grown Bolivia Supremo</option>
+ <option value="Guatemala">Organic Guatemala</option>
+ <option value="Kenya">Kenya</option>
+ </label></p>
+ <p><label>Type: <br />
+ <label><input type="radio" name="beantype" value="whole" /> Whole bean</label>
+ <br />
+ <label><input type="radio" name="beantype" value="ground" checked /> Ground</label>
+ </p>
+ <p>Extras: <br />
+ <label><input type="checkbox" name="extras[]" value="giftwrap" /> Gift wrap</label>
+ <br />
+ <label><input type="checkbox" name="extras[]" value="catalog" checked /> Include
+ catalog with order</label>
+ </p>
+ <p>Ship to: <br />
+ <label>Name: <input type="text" name="name" /></label><br />
+ <label>Address: <input type="text" name="address" /></label><br />
+ <label>City: <input type="text" name="city" /></label><br />
+ <label>State: <input type="text" name="state" /></label><br />
+ <label>Zip: <input type="text" name="zip" /></label><br />
+ </p>
+ <p>Customer Comments: <br />
+ <textarea name="comments" rows="10" cols="48"></textarea>
+ </p>
+ <p>
+ <input type="submit" value="Order Now" />
+ </p>
+</form>
M tpl/base.html => tpl/base.html +1 -1
@@ 46,7 46,7 @@
{% for opt in grp.opts %}
{% if opt.disabled %}<dd>{{ opt.label }}</dd>
{% else %}<dd>
- <a href="={{ opt.value|xURI }}" title="{{ opt.value }}">
+ <a href="={{ opt.value|xURI }}{{Q}}" title="{{ opt.value }}">
{{ opt.label }}</a>
</dd>{% endif %}
{% endfor %}
A tpl/latin1-accent-lower.html => tpl/latin1-accent-lower.html +55 -0
@@ 0,0 1,55 @@
+{% extends "base.html" %}
+
+{%- block control -%}<section>
+ <p><a href="..">abc</a> | <a href="../latin1-upper/{{Q}}">ABC</a> |
+ <a href="../latin1-symbol/{{Q}}">!@#</a> | <strong>àêï</strong> |
+ <a href="../latin1-accent/{{Q}}">ÀÊÏ</a></p>
+ <table>
+ <tr>
+ <td><a href=":{{'à'|xURI}}{{Q}}">à</a></td>
+ <td><a href=":{{'á'|xURI}}{{Q}}">á</a></td>
+ <td><a href=":{{'â'|xURI}}{{Q}}">â</a></td>
+ <td><a href=":{{'ä'|xURI}}{{Q}}">ä</a></td>
+ <td><a href=":{{'ã'|xURI}}{{Q}}">ã</a></td>
+ <td><a href=":{{'å'|xURI}}{{Q}}">å</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'è'|xURI}}{{Q}}">è</a></td>
+ <td><a href=":{{'é'|xURI}}{{Q}}">é</a></td>
+ <td><a href=":{{'ê'|xURI}}{{Q}}">ê</a></td>
+ <td><a href=":{{'ë'|xURI}}{{Q}}">ë</a></td>
+ <td><a href=":{{'ç'|xURI}}{{Q}}">ç</a></td>
+ <td><a href=":{{'æ'|xURI}}{{Q}}">æ</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'ì'|xURI}}{{Q}}">ì</a></td>
+ <td><a href=":{{'í'|xURI}}{{Q}}">í</a></td>
+ <td><a href=":{{'î'|xURI}}{{Q}}">î</a></td>
+ <td><a href=":{{'ï'|xURI}}{{Q}}">ï</a></td>
+ <td><a href=":{{'ð'|xURI}}{{Q}}">ð</a></td>
+ <td><a href=":{{'ñ'|xURI}}{{Q}}">ñ</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'ò'|xURI}}{{Q}}">ò</a></td>
+ <td><a href=":{{'ó'|xURI}}{{Q}}">ó</a></td>
+ <td><a href=":{{'ô'|xURI}}{{Q}}">ô</a></td>
+ <td><a href=":{{'ö'|xURI}}{{Q}}">ö</a></td>
+ <td><a href=":{{'õ'|xURI}}{{Q}}">õ</a></td>
+ <td><a href=":{{'ø'|xURI}}{{Q}}">ø</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'ù'|xURI}}{{Q}}">ù</a></td>
+ <td><a href=":{{'ú'|xURI}}{{Q}}">ú</a></td>
+ <td><a href=":{{'û'|xURI}}{{Q}}">û</a></td>
+ <td><a href=":{{'ü'|xURI}}{{Q}}">ü</a></td>
+ <td><a href=":{{'ý'|xURI}}{{Q}}">ý</a></td>
+ <td><a href=":{{'ÿ'|xURI}}{{Q}}">ÿ</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'þ'|xURI}}{{Q}}">þ</a></td>
+ <td><a href=":%20{{Q}}">SPACE</a></td>
+ <td colspan="2"><a href="-{{Q}}">DEL</a></td>
+ <td colspan="2"><a href="={{Q}}">CLEAR</a></td>
+ </tr>
+ </table>
+</section>{%- endblock -%}
A tpl/latin1-accent.html => tpl/latin1-accent.html +56 -0
@@ 0,0 1,56 @@
+{% extends "base.html" %}
+
+{%- block control -%}<section>
+ <p><a href="..">abc</a> | <a href="../latin1-upper/{{Q}}">ABC</a> |
+ <a href="../latin1-symbol/{{Q}}">!@#</a> |
+ <a href="../latin1-accent-lower/{{Q}}">àêï</a> |
+ <strong>ÀÊÏ</strong></p>
+ <table>
+ <tr>
+ <td><a href=":{{'À'|xURI}}{{Q}}">À</a></td>
+ <td><a href=":{{'Á'|xURI}}{{Q}}">Á</a></td>
+ <td><a href=":{{'Â'|xURI}}{{Q}}">Â</a></td>
+ <td><a href=":{{'Ä'|xURI}}{{Q}}">Ä</a></td>
+ <td><a href=":{{'Ã'|xURI}}{{Q}}">Ã</a></td>
+ <td><a href=":{{'Å'|xURI}}{{Q}}">Å</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'È'|xURI}}{{Q}}">È</a></td>
+ <td><a href=":{{'É'|xURI}}{{Q}}">É</a></td>
+ <td><a href=":{{'Ê'|xURI}}{{Q}}">Ê</a></td>
+ <td><a href=":{{'Ë'|xURI}}{{Q}}">Ë</a></td>
+ <td><a href=":{{'Ç'|xURI}}{{Q}}">Ç</a></td>
+ <td><a href=":{{'Æ'|xURI}}{{Q}}">Æ</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'Ì'|xURI}}{{Q}}">Ì</a></td>
+ <td><a href=":{{'Í'|xURI}}{{Q}}">Í</a></td>
+ <td><a href=":{{'Î'|xURI}}{{Q}}">Î</a></td>
+ <td><a href=":{{'Ï'|xURI}}{{Q}}">Ï</a></td>
+ <td><a href=":{{'Ð'|xURI}}{{Q}}">Ð</a></td>
+ <td><a href=":{{'Ñ'|xURI}}{{Q}}">Ñ</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'Ò'|xURI}}{{Q}}">Ò</a></td>
+ <td><a href=":{{'Ó'|xURI}}{{Q}}">Ó</a></td>
+ <td><a href=":{{'Ô'|xURI}}{{Q}}">Ô</a></td>
+ <td><a href=":{{'Ö'|xURI}}{{Q}}">Ö</a></td>
+ <td><a href=":{{'Õ'|xURI}}{{Q}}">Õ</a></td>
+ <td><a href=":{{'Ø'|xURI}}{{Q}}">Ø</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'Ù'|xURI}}{{Q}}">Ù</a></td>
+ <td><a href=":{{'Ú'|xURI}}{{Q}}">Ú</a></td>
+ <td><a href=":{{'Û'|xURI}}{{Q}}">Û</a></td>
+ <td><a href=":{{'Ü'|xURI}}{{Q}}">Ü</a></td>
+ <td><a href=":{{'Ý'|xURI}}{{Q}}">Ý</a></td>
+ <td><a href=":{{'ß'|xURI}}{{Q}}">ß</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'Þ'|xURI}}{{Q}}">Þ</a></td>
+ <td><a href=":%20{{Q}}">SPACE</a></td>
+ <td colspan="2"><a href="-{{Q}}">DEL</a></td>
+ <td colspan="2"><a href="={{Q}}">CLEAR</a></td>
+ </tr>
+ </table>
+</section>{%- endblock -%}
A tpl/latin1-symbol.html => tpl/latin1-symbol.html +96 -0
@@ 0,0 1,96 @@
+{% extends "base.html" %}
+
+{%- block control -%}<section>
+ <p><a href="..{{Q}}">abc</a> | <a href="../latin1-upper/{{Q}}">ABC</a> |
+ <strong>!@#</strong> | <a href="../latin1-accent-lower/{{Q}}">àêï</a> |
+ <a href="../latin1-accent/{{Q}}">ÀÊÏ</a></p>
+ <table>
+ <tr>
+ <td><a href=":{{'?'|xURI}}{{Q}}">?</a></td>
+ <td><a href=":,{{Q}}">,</a></td>
+ <td><a href=":.{{Q}}">.</a></td>
+ <td><a href="::{{Q}}">:</a></td>
+ <td><a href=":;{{Q}}">;</a></td>
+ <td><a href=":{{'('|xURI}}{{Q}}">(</a></td>
+ <td><a href=":{{')'|xURI}}{{Q}}">)</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'/'|xURI}}{{Q}}">/</a></td>
+ <td><a href=":{{'='|xURI}}{{Q}}">=</a></td>
+ <td><a href=':"{{Q}}'>"</a></td>
+ <td><a href=":'{{Q}}">'</a></td>
+ <td><a href=":{{'!'|xURI}}{{Q}}">!</a></td>
+ <td><a href=":{{'['|xURI}}{{Q}}">[</a></td>
+ <td><a href=":{{']'|xURI}}{{Q}}">]</a></td>
+ </tr>
+ <tr>
+ <td><a href=":\{{Q}}">\</a></td>
+ <td><a href=":{{'~'|xURI}}{{Q}}">~</a></td>
+ <td><a href=":{{'`'|xURI}}{{Q}}">`</a></td>
+ <td><a href=":{{'|'|xURI}}{{Q}}">|</a></td>
+ <td><a href=":{{'@'|xURI}}{{Q}}">@</a></td>
+ <td><a href=":{{'{'|xURI}}{{Q}}">{</a></td>
+ <td><a href=":{{'}'|xURI}}{{Q}}">}</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'¸'|xURI}}{{Q}}">¸</a></td>
+ <td><a href=":{{'%'|xURI}}{{Q}}">%</a></td>
+ <td><a href=":{{'^'|xURI}}{{Q}}">^</a></td>
+ <td><a href=":{{'&'|xURI}}{{Q}}">&</a></td>
+ <td><a href=":{{'*'|xURI}}{{Q}}">*</a></td>
+ <td><a href=":{{'<'|xURI}}{{Q}}"><</a></td>
+ <td><a href=":{{'>'|xURI}}{{Q}}">></a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'¶'|xURI}}{{Q}}">¶</a></td>
+ <td><a href=":{{'#'|xURI}}{{Q}}">#</a></td>
+ <td><a href=":{{'$'|xURI}}{{Q}}">$</a></td>
+ <td><a href=":{{'-'|xURI}}{{Q}}">-</a></td>
+ <td><a href=":{{'_'|xURI}}{{Q}}">_</a></td>
+ <td><a href=":{{'´'|xURI}}{{Q}}">´</a></td>
+ <td><a href=":{{'·'|xURI}}{{Q}}">·</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'×'|xURI}}{{Q}}">×</a></td>
+ <td><a href=":{{'¢'|xURI}}{{Q}}">¢</a></td>
+ <td><a href=":{{'£'|xURI}}{{Q}}">£</a></td>
+ <td><a href=":{{'¤'|xURI}}{{Q}}">¤</a></td>
+ <td><a href=":{{'¥'|xURI}}{{Q}}">¥</a></td>
+ <td><a href=":{{'«'|xURI}}{{Q}}">«</a></td>
+ <td><a href=":{{'»'|xURI}}{{Q}}">»</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'÷'|xURI}}{{Q}}">÷</a></td>
+ <td><a href=":{{'§'|xURI}}{{Q}}">§</a></td>
+ <td><a href=":{{'¨'|xURI}}{{Q}}">¨</a></td>
+ <td><a href=":{{'©'|xURI}}{{Q}}">©</a></td>
+ <td><a href=":{{'ª'|xURI}}{{Q}}">ª</a></td>
+ <td><a href=":{{'¡'|xURI}}{{Q}}">¡</a></td>
+ <td><a href=":{{'¦'|xURI}}{{Q}}">¦</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'µ'|xURI}}{{Q}}">µ</a></td>
+ <td><a href=":{{'¬'|xURI}}{{Q}}">¬</a></td>
+ <td><a href=":{{'¯'|xURI}}{{Q}}">¯</a></td>
+ <td><a href=":{{'®'|xURI}}{{Q}}">®</a></td>
+ <td><a href=":{{'°'|xURI}}{{Q}}">°</a></td>
+ <td><a href=":{{'±'|xURI}}{{Q}}">±</a></td>
+ <td><a href=":{{'¿'|xURI}}{{Q}}">¿</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'º'|xURI}}{{Q}}">º</a></td>
+ <td><a href=":{{'¹'|xURI}}{{Q}}">¹</a></td>
+ <td><a href=":{{'²'|xURI}}{{Q}}">²</a></td>
+ <td><a href=":{{'³'|xURI}}{{Q}}">³</a></td>
+ <td><a href=":{{'¼'|xURI}}{{Q}}">¼</a></td>
+ <td><a href=":{{'½'|xURI}}{{Q}}">½</a></td>
+ <td><a href=":{{'¾'|xURI}}{{Q}}">¾</a></td>
+ </tr>
+ <tr>
+ <td><a href=":{{'+'|xURI}}{{Q}}">+</a></td>
+ <td colspan="2"><a href=":%20{{Q}}">SPACE</a></td>
+ <td colspan="2"><a href="-{{Q}}">DEL</a></td>
+ <td colspan="2"><a href="={{Q}}">CLEAR</a></td>
+ </tr>
+ </table>
+</section>{%- endblock -%}
A tpl/latin1-upper.html => tpl/latin1-upper.html +63 -0
@@ 0,0 1,63 @@
+{% extends "base.html" %}
+
+{%- block control -%}<section>
+ <p><a href="..{{Q}}">abc</a> | <strong>ABC</strong> |
+ <a href="../latin1-symbol/{{Q}}">!@#</a> |
+ <a href="../latin1-accent-lower/{{Q}}">àêï</a> |
+ <a href="../latin1-accent/{{Q}}">ÀÊÏ</a></p>
+ <table>
+ <tr>
+ <td><a href=":A{{Q}}">A</a></td>
+ <td><a href=":B{{Q}}">B</a></td>
+ <td><a href=":C{{Q}}">C</a></td>
+ <td><a href=":D{{Q}}">D</a></td>
+ <td><a href=":E{{Q}}">E</a></td>
+ <td><a href=":F{{Q}}">F</a></td>
+ </tr>
+ <tr>
+ <td><a href=":G{{Q}}">G</a></td>
+ <td><a href=":H{{Q}}">H</a></td>
+ <td><a href=":I{{Q}}">I</a></td>
+ <td><a href=":J{{Q}}">J</a></td>
+ <td><a href=":K{{Q}}">K</a></td>
+ <td><a href=":L{{Q}}">L</a></td>
+ </tr>
+ <tr>
+ <td><a href=":M{{Q}}">M</a></td>
+ <td><a href=":N{{Q}}">N</a></td>
+ <td><a href=":O{{Q}}">O</a></td>
+ <td><a href=":P{{Q}}">P</a></td>
+ <td><a href=":Q{{Q}}">Q</a></td>
+ <td><a href=":R{{Q}}">R</a></td>
+ </tr>
+ <tr>
+ <td><a href=":S{{Q}}">S</a></td>
+ <td><a href=":T{{Q}}">T</a></td>
+ <td><a href=":U{{Q}}">U</a></td>
+ <td><a href=":V{{Q}}">V</a></td>
+ <td><a href=":W{{Q}}">W</a></td>
+ <td><a href=":X{{Q}}">X</a></td>
+ </tr>
+ <tr>
+ <td><a href=":Y{{Q}}">Y</a></td>
+ <td><a href=":Z{{Q}}">Z</a></td>
+ <td><a href=":1{{Q}}">1</a></td>
+ <td><a href=":2{{Q}}">2</a></td>
+ <td><a href=":3{{Q}}">3</a></td>
+ <td><a href=":4{{Q}}">4</a></td>
+ </tr>
+ <tr>
+ <td><a href=":5{{Q}}">5</a></td>
+ <td><a href=":6{{Q}}">6</a></td>
+ <td><a href=":7{{Q}}">7</a></td>
+ <td><a href=":8{{Q}}">8</a></td>
+ <td><a href=":9{{Q}}">9</a></td>
+ <td><a href=":0{{Q}}">0</a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href=":%20{{Q}}">SPACE</a></td>
+ <td colspan="2"><a href="-{{Q}}">DEL</a></td>
+ <td colspan="2"><a href="={{Q}}">CLEAR</a></td>
+ </tr>
+ </table>
+</section>{%- endblock -%}
A tpl/latin1.html => tpl/latin1.html +63 -0
@@ 0,0 1,63 @@
+{% extends "base.html" %}
+
+{%- block control -%}<section>
+ <p><strong>abc</strong> | <a href="latin1-upper/{{Q}}">ABC</a> |
+ <a href="latin1-symbol/{{Q}}">!@#</a> |
+ <a href="latin1-accent-lower/{{Q}}">àêï</a> |
+ <a href="latin1-accent/{{Q}}">ÀÊÏ</a></p>
+ <table>
+ <tr>
+ <td><a href=":a{{Q}}">a</a></td>
+ <td><a href=":b{{Q}}">b</a></td>
+ <td><a href=":c{{Q}}">c</a></td>
+ <td><a href=":d{{Q}}">d</a></td>
+ <td><a href=":e{{Q}}">e</a></td>
+ <td><a href=":f{{Q}}">f</a></td>
+ </tr>
+ <tr>
+ <td><a href=":g{{Q}}">g</a></td>
+ <td><a href=":h{{Q}}">h</a></td>
+ <td><a href=":i{{Q}}">i</a></td>
+ <td><a href=":j{{Q}}">j</a></td>
+ <td><a href=":k{{Q}}">k</a></td>
+ <td><a href=":l{{Q}}">l</a></td>
+ </tr>
+ <tr>
+ <td><a href=":m{{Q}}">m</a></td>
+ <td><a href=":n{{Q}}">n</a></td>
+ <td><a href=":o{{Q}}">o</a></td>
+ <td><a href=":p{{Q}}">p</a></td>
+ <td><a href=":q{{Q}}">q</a></td>
+ <td><a href=":r{{Q}}">r</a></td>
+ </tr>
+ <tr>
+ <td><a href=":s{{Q}}">s</a></td>
+ <td><a href=":t{{Q}}">t</a></td>
+ <td><a href=":u{{Q}}">u</a></td>
+ <td><a href=":v{{Q}}">v</a></td>
+ <td><a href=":w{{Q}}">w</a></td>
+ <td><a href=":x{{Q}}">x</a></td>
+ </tr>
+ <tr>
+ <td><a href=":y{{Q}}">y</a></td>
+ <td><a href=":z{{Q}}">z</a></td>
+ <td><a href=":1{{Q}}">1</a></td>
+ <td><a href=":2{{Q}}">2</a></td>
+ <td><a href=":3{{Q}}">3</a></td>
+ <td><a href=":4{{Q}}">4</a></td>
+ </tr>
+ <tr>
+ <td><a href=":5{{Q}}">5</a></td>
+ <td><a href=":6{{Q}}">6</a></td>
+ <td><a href=":7{{Q}}">7</a></td>
+ <td><a href=":8{{Q}}">8</a></td>
+ <td><a href=":9{{Q}}">9</a></td>
+ <td><a href=":0{{Q}}">0</a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href=":%20{{Q}}">SPACE</a></td>
+ <td colspan="2"><a href="-{{Q}}">DEL</a></td>
+ <td colspan="2"><a href="={{Q}}">CLEAR</a></td>
+ </tr>
+ </table>
+</section>{%- endblock -%}
A tpl/select.html => tpl/select.html +32 -0
@@ 0,0 1,32 @@
+{% extends "base.html" %}
+
+{%- block main -%}<section>
+ <h2>{{ input.label }}</h2>
+ {{ input.description }}
+ <hr />
+ <nav><dl>{% for grp in input.list %}
+ {% if grp.label == "" %}{% for opt in grp.opts %}
+ {% if opt.disabled %}
+ <dt>{{ opt.label }}</dt>
+ {% else %}
+ <dt {% if opt.selected %}class="checked"{% endif %}>
+ {% if opt.selected %}✓{% endif %}
+ <a href="={{opt.value|xURI}}{{Q}}" title="{{opt.value}}">{{opt.label}}</a>
+ </dt>
+ {% endif %}
+ {% endfor %}{% else %}
+ <dt>{{ opt.label }}</dt>
+ {% for opt in grp.opts %}
+ {% if opt.disabled %}
+ <dd>{{ opt.label }}</dd>
+ {% else %}
+ <dd {% if opt.selected %}class="checked"{% endif %}>
+ {% if opt.selected %}✓{% endif %}
+ <a href="={{opt.value|xURI}}{{Q}}" title="{{opt.value}}">
+ {{opt.label}}</a>
+ </dd>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}</dl></nav>
+</section>{%- endblock -%}