changelog-webapp: All text fields required
This CL makes all text fields required.
BUG=b/160901711
TEST=run local
Change-Id: Ie3b3ddeaf8d7b01d4013dd31e16f797835ae59a2
diff --git a/src/cmd/changelog-webapp/static/templates/changelog.html b/src/cmd/changelog-webapp/static/templates/changelog.html
index 55b3e21..e5a3c3d 100644
--- a/src/cmd/changelog-webapp/static/templates/changelog.html
+++ b/src/cmd/changelog-webapp/static/templates/changelog.html
@@ -20,9 +20,9 @@
<div class="text">
<label>From </label>
{{if (ne .Source "")}}
- <input type="text" class="source" name="source" placeholder="COS build number" value={{.Source}} autocomplete="off">
+ <input type="text" class="source" name="source" placeholder="COS build number" value={{.Source}} autocomplete="off" required>
{{else}}
- <input type="text" class="source" name="source" placeholder="COS build number" autocomplete="off">
+ <input type="text" class="source" name="source" placeholder="COS build number" autocomplete="off" required>
{{end}}
<label> to </label>
{{if (ne .Target "")}}
diff --git a/src/cmd/changelog-webapp/static/templates/locateBuild.html b/src/cmd/changelog-webapp/static/templates/locateBuild.html
index c2843f6..ca09a73 100644
--- a/src/cmd/changelog-webapp/static/templates/locateBuild.html
+++ b/src/cmd/changelog-webapp/static/templates/locateBuild.html
@@ -19,9 +19,9 @@
<form class="changelog-form" action="/locatebuild">
<div class="text">
{{if (ne .CL "")}}
- <input type="text" class="cl-input" name="cl" placeholder="CL-Number or Commit-SHA" value={{.CL}} autocomplete="off">
+ <input type="text" class="cl-input" name="cl" placeholder="CL-Number or Commit-SHA" value={{.CL}} autocomplete="off" required>
{{else}}
- <input type="text" class="cl-input" name="cl" placeholder="CL-Number or Commit-SHA" autocomplete="off">
+ <input type="text" class="cl-input" name="cl" placeholder="CL-Number or Commit-SHA" autocomplete="off" required>
{{end}}
<input class="submit" type="submit" value="Submit"><br>
</div>