Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
c1b2ee50
Commit
c1b2ee50
authored
Jul 17, 2018
by
Julian Rother
Browse files
Added client-side-valiadion for chapter mark suggestions, closes #85
parent
31ba0635
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/lecture.html
View file @
c1b2ee50
...
...
@@ -128,7 +128,7 @@ $(function() {
var
m
=
zeropad
(
Math
.
trunc
((
timestamp
%
3600
)
/
60
),
2
);
var
s
=
zeropad
(
Math
.
trunc
(
timestamp
%
60
),
2
);
var
timeasstring
=
h
+
'
:
'
+
m
+
'
:
'
+
s
;
return
'
<form method="post" data-url="{{ url_for(
'
suggest_chapter
'
, lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" placeholder="00:00
.000
" name="time" type="text" value="
'
+
timeasstring
+
'
"><br><input class="form-control" placeholder="
Kap
itel" name="text" type="text"><br><input type="submit" class="btn btn-default" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>
'
;
return
'
<form
class="needs-validation"
method="post" data-url="{{ url_for(
'
suggest_chapter
'
, lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" placeholder="00:00" name="time" type="text" value="
'
+
timeasstring
+
'
"
pattern="(|[0-9]{1,2}:(|[0-9]{1,2}:))[0-9]{1,2}"
><br><input class="form-control" placeholder="
T
itel" name="text" type="text"
required
><br><input type="submit" class="btn btn-default" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>
'
;
}
})
...
...
Write
Preview
Supports
Markdown
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