Commit 7716ebd1 authored by Aria Givi's avatar Aria Givi
Browse files

Ueberprueft ob erforderliche Felder ausgefuellt worden sind

parent 2a13af8d
function checkFormBeforePrinting () {
var requiredElements = document.querySelectorAll("[required]");
var passed = true;
for (i = 0; i < requiredElements.length; i++) {
if(requiredElements[i].value == "") {
passed = false;
requiredElements[i].style.backgroundColor = "#ff9999";
}
else {
requiredElements[i].style.backgroundColor = "#ffffff";
}
}
if(passed) {
window.print();
}
}
\ No newline at end of file
......@@ -105,5 +105,5 @@
<p>{{ trans('beitritt.anweisung.5') }}</p>
</div>
<p>{{ trans('beitritt.anweisung.6') }}</p>
<button type="button" class="btn btn-lg btn-primary noprint" onclick="window.print();">{{ trans('beitritt.anweisung.7') }}</button>
<button type="button" class="btn btn-lg btn-primary noprint" onclick="checkFormBeforePrinting();">{{ trans('beitritt.anweisung.7') }}</button>
@endsection
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment