Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pado
Behira Younes
Commits
f3f9462c
Commit
f3f9462c
authored
Oct 21, 2020
by
Ratnadeep Rajendra Kharade
Browse files
allowed calculation once the form is valid
parent
c95ca4ef
Pipeline
#1076
passed with stages
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/index.js
View file @
f3f9462c
...
@@ -43,12 +43,13 @@ function setCharacterLength(characters) {
...
@@ -43,12 +43,13 @@ function setCharacterLength(characters) {
}
}
function
calculateReadingTime
()
{
function
calculateReadingTime
()
{
let
isFormValid
=
validateForm
();
if
(
isFormValid
())
{
let
x
=
document
.
getElementById
(
'
calculate-time-element
'
);
let
x
=
document
.
getElementById
(
'
calculate-time-element
'
);
x
.
style
.
display
=
"
block
"
;
x
.
style
.
display
=
"
block
"
;
}
}
}
function
validateForm
()
{
function
isFormValid
()
{
let
invalidFields
=
0
;
let
invalidFields
=
0
;
if
(
inputObj
.
textChoice
===
'
manual
'
&&
inputObj
.
text
===
''
)
{
if
(
inputObj
.
textChoice
===
'
manual
'
&&
inputObj
.
text
===
''
)
{
invalidFields
++
;
invalidFields
++
;
...
@@ -77,7 +78,9 @@ function validateForm() {
...
@@ -77,7 +78,9 @@ function validateForm() {
}
else
{
}
else
{
document
.
getElementById
(
'
readerCategory-validation
'
).
style
.
display
=
'
none
'
;
document
.
getElementById
(
'
readerCategory-validation
'
).
style
.
display
=
'
none
'
;
}
}
return
invalidFields
<
1
}
}
function
showFeedbackForm
()
{
function
showFeedbackForm
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment