Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Voter cards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Weby
Voter cards
Commits
7454e5bb
Commit
7454e5bb
authored
2 years ago
by
Tomáš Hozman
Browse files
Options
Downloads
Patches
Plain Diff
input validation
parent
f47c4fad
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
content/index.html
+13
-5
13 additions, 5 deletions
content/index.html
content/static/js/main.js
+6
-0
6 additions, 0 deletions
content/static/js/main.js
with
19 additions
and
5 deletions
content/index.html
+
13
−
5
View file @
7454e5bb
...
...
@@ -76,17 +76,19 @@
Vyplň náš jednoduchý formulář, stáhni si ho v PDF a pošli ho datovkou nebo dones osobně na úřad. Neboj se - vážíme si tvého soukromí, nesbíráme žádná osobní data a vše zpracovává výhradně tvůj prohlížeč.
</p>
<
div
id=
"form-wrapper"
>
<
form
id=
"form-wrapper"
>
<div
class=
"input-group input-group-2"
>
<input
type=
"text"
id=
"name"
placeholder=
"Jméno *"
required
>
<input
type=
"text"
id=
"surname"
placeholder=
"Příjmení *"
required
>
</div>
...
...
@@ -98,6 +100,7 @@
type=
"date"
id=
"birth-date"
name=
"birth-date"
required
>
</div>
...
...
@@ -111,6 +114,7 @@
type=
"text"
id=
"street"
placeholder=
"Ulice, popisné a orientační č. *"
required
>
<div
class=
"input-group input-group-2"
>
...
...
@@ -118,12 +122,14 @@
type=
"text"
id=
"city"
placeholder=
"Obec *"
required
>
<input
type=
"text"
id=
"zip"
placeholder=
"PSČ *"
required
>
</div>
...
...
@@ -150,14 +156,16 @@
<option>
2. kolo
</option>
</select>
<button
id=
"create-filled-form"
>
Podepsat
</button>
<input
type=
"submit"
id=
"create-filled-form"
value=
"Podepsat"
>
<small>
<i>
* Povinné
</i>
</small>
</
div
>
</
form
>
</div>
<div
id=
"step2"
>
...
...
This diff is collapsed.
Click to expand it.
content/static/js/main.js
+
6
−
0
View file @
7454e5bb
...
...
@@ -348,6 +348,12 @@ $(window).ready(
$
(
"
#create-filled-form
"
).
on
(
"
click
"
,
async
(
event
)
=>
{
if
(
$
(
"
#form-wrapper
"
)[
0
].
checkValidity
())
{
event
.
preventDefault
();
}
else
{
return
;
}
$
(
"
#form-wrapper input,#form-wrapper select
"
).
attr
(
"
disabled
"
,
true
);
// We already know this, don't waste time looking it up.
// Repeating ourselves once is fine here.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment