Skip to content

Commit

Permalink
fix(form): add required attribute to text inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
simrobin authored and ViBiOh committed Dec 6, 2022
1 parent a711ef3 commit b878cce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/ketchup/templates/ketchup.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2 class="header">Create ketchup</h2>

<p class="padding no-margin">
<label for="create-name" class="block">Name:</label>
<input id="create-name" type="text" name="name" placeholder="ViBiOh/ketchup" class="full">
<input id="create-name" type="text" name="name" placeholder="ViBiOh/ketchup" class="full" required>
</p>

<p id="create-part-wrapper" class="padding no-margin hidden">
Expand All @@ -59,12 +59,12 @@ <h2 class="header">Create ketchup</h2>
'^1': latest with fixed major version.
'~1.1': latest with fixed major and minor version.
'^1-0': include beta (works also for '~')." src="{{ url "/svg/question?fill=silver" }}" alt="Question icon"></label>
<input id="create-pattern" type="text" name="pattern" placeholder="stable" class="full">
<input id="create-pattern" type="text" name="pattern" placeholder="stable" class="full" required>
</p>

<p class="padding no-margin">
<label for="create-version" class="block">My version:</label>
<input id="create-version" type="text" name="version" placeholder="1.0.0" class="full">
<input id="create-version" type="text" name="version" placeholder="1.0.0" class="full" required>
</p>

<p class="padding no-margin">
Expand Down Expand Up @@ -151,12 +151,12 @@ <h2 class="header">Edit ketchup</h2>
'^1': latest with fixed major version.
'~1.1': latest with fixed major and minor version.
'^1-0': include beta (works also for '~')." src="{{ url "/svg/question?fill=silver" }}" alt="Question icon"></label>
<input id="edit-pattern-{{ .ID }}" name="pattern" type="text" placeholder="stable" class="full" value="{{ .Pattern }}">
<input id="edit-pattern-{{ .ID }}" name="pattern" type="text" placeholder="stable" class="full" value="{{ .Pattern }}" required>
</p>

<p class="padding no-margin">
<label for="edit-version-{{ .ID }}" class="block">My version:</label>
<input id="edit-version-{{ .ID }}" name="version" type="text" placeholder="1.0.0" class="full" value="{{ .Version }}">
<input id="edit-version-{{ .ID }}" name="version" type="text" placeholder="1.0.0" class="full" value="{{ .Version }}" required>
</p>

<p class="padding no-margin">
Expand Down

0 comments on commit b878cce

Please sign in to comment.