Skip to content
Snippets Groups Projects
Commit c1b2ee50 authored by Julian Rother's avatar Julian Rother
Browse files

Added client-side-valiadion for chapter mark suggestions, closes #85

parent 31ba0635
No related branches found
No related tags found
No related merge requests found
......@@ -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="Kapitel" 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="Titel" name="text" type="text" required><br><input type="submit" class="btn btn-default" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>';
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment