diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html
index 039cae3a..df7e50b8 100644
--- a/mamweb/templates/base.html
+++ b/mamweb/templates/base.html
@@ -31,6 +31,10 @@
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+ {# Případné skripty widgetů formulářů #}
+ {% if form %}
+ {{form.media}}
+ {% endif %}
{# script specifický pro stránku #}
{% block script %}{% endblock %}
diff --git a/seminar/templates/seminar/profil/edit.html b/seminar/templates/seminar/profil/edit.html
index 803a64af..9f94090e 100644
--- a/seminar/templates/seminar/profil/edit.html
+++ b/seminar/templates/seminar/profil/edit.html
@@ -2,8 +2,6 @@
{% load staticfiles %}
{% block script %}
-
- {{form.media}}
{% endblock %}
diff --git a/seminar/templates/seminar/profil/nahraj_reseni.html b/seminar/templates/seminar/profil/nahraj_reseni.html
index 0b31aa79..92c14d28 100644
--- a/seminar/templates/seminar/profil/nahraj_reseni.html
+++ b/seminar/templates/seminar/profil/nahraj_reseni.html
@@ -1,8 +1,6 @@
{% extends "base.html" %}
{% load staticfiles %}
{% block script %}
-
- {{form.media}}
{% endblock %}
diff --git a/seminar/templates/seminar/profil/prihlaska.html b/seminar/templates/seminar/profil/prihlaska.html
index 22bd3385..6074e24a 100644
--- a/seminar/templates/seminar/profil/prihlaska.html
+++ b/seminar/templates/seminar/profil/prihlaska.html
@@ -2,8 +2,6 @@
{% load staticfiles %}
{% block script %}
-
- {{form.media}}
{% endblock %}