static/shared/header: perform search in currently selected mode

Added a hidden input element to pass the current search
mode to additional queries made from the search results
page.

Change-Id: Ia9dc1bb209d85a8e8ad1ba531b12ccdb64037ab6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347554
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/static/shared/header/header.tmpl b/static/shared/header/header.tmpl
index 83dc942..e4b9d8d 100644
--- a/static/shared/header/header.tmpl
+++ b/static/shared/header/header.tmpl
@@ -88,6 +88,7 @@
         autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false"
         {{- if .Experiments.IsActive "symbol-search" -}} placeholder="Search packages or symbols"
         {{- else -}} placeholder="Search for a package"{{- end -}} value="{{.Query}}" />
+    <input name="m" value="{{.SearchMode}}" hidden>
     <button class="go-Button go-Button--inverted" aria-label="Submit search">
       <img
         class="go-Icon"