]> git.phdru.name Git - m_librarian.git/blob - m_librarian/web/views/search_authors_form.tmpl
Feat(web): Preserve values in form
[m_librarian.git] / m_librarian / web / views / search_authors_form.tmpl
1 #encoding utf-8
2 #from bottle import html_escape
3 #def $search_type_checked($value)
4 #if $getVar('search_type', '') == $value
5 checked#slurp
6 #end if
7 #end def
8 #def $case_sensitive_checked
9 #if $getVar('case_sensitive', None)
10 checked#slurp
11 #end if
12 #end def
13 <form action="/search_authors/" method="POST">
14   <input name="search_authors" value="$html_escape($getVar('search_authors', ''))" type="text" style="width: 80%">
15   <br>
16   <input name="search_type" value="start" $search_type_checked('start') type="radio">
17   Подстрока в начале
18   <input name="search_type" value="substring" $search_type_checked('substring') type="radio">
19   Подстрока
20   <input name="search_type" value="full" $search_type_checked('full') type="radio">
21   Точное совпадение
22   <br>
23   <input name="case_sensitive" type="checkbox" $case_sensitive_checked>
24   Различать прописные/строчные
25   <br>
26   <input name="submit" type="submit">
27 </form>