github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vsearch/Form.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import ( 3 "strings" 4 5 "github.com/kyleu/dbaudit/app/controller/cutil" 6 "github.com/kyleu/dbaudit/views/components" 7 ) %} 8 9 {% func Form(act string, q string, placeholder string, currTags []string, ps *cutil.PageState) %} 10 {%- code if placeholder == "" { 11 placeholder = "Search" 12 } -%} 13 <form action="{%s act %}" method="get"> 14 {%- if len(currTags) > 0 -%} 15 <input type="hidden" name="tags" value="{%s strings.Join(currTags, `,`) %}" /> 16 {%- endif -%} 17 <div class="right"> 18 <button class="right" type="submit">{%= components.SVGRef("search", 22, 22, `icon`, ps) %}</button> 19 <input class="right br0" type="text" name="q" value="{%s q %}" placeholder="{%s placeholder %}" /> 20 </div> 21 </form> 22 {% endfunc %}