]> git.plutz.net Git - serve0/blob - widgets.sh
frame for app rewrite
[serve0] / widgets.sh
1 #!/bin/sh
2
3 w_search(){
4   printf '
5   [form method=GET action=?
6     [select name=o size=1 
7       [option disabled=disabled Order By]
8       [option value=Name Name]
9       [option value=Date Date]
10       [option value=Length Length]
11     ]
12     [input name=s placeholder=Search value="%s"]
13   ]
14   ' \
15   "$(HTML "$search")"
16 }
17
18 w_prefs(){
19   printf '
20   [form method=POST action=?a=setprefs
21     [hidden "ref" "%s"]
22     [label for=prefs_ps Pagesize]
23     [input type=number name=pagesize value="%s"]
24     [checkbox "fakemp4" "yes" #prefs_fmp4] [label for=prefs_fmp4 Fake .MP4 file ending]
25     [submit "store" "store" Set Cookie]
26   ]
27   ' \
28   "$(HTML "$REQUEST_URI")" "$pagesize"
29 }