Allow empty contact forms.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 30 Sep 2019 14:11:55 +0000 (16:11 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 30 Sep 2019 14:11:55 +0000 (16:11 +0200)
src/wolnelektury/templates/forms/includes/built_form.html

index 4a8807f..34d0273 100644 (file)
@@ -12,7 +12,9 @@
     {% render_honeypot_field %}
     <table>
         {{ form_for_form.as_table }}
-        <tr><td></td><td><button>{{ form.button_text }}</button></td></tr>
+        {% if form_for_form.fields %}
+            <tr><td></td><td><button>{{ form.button_text }}</button></td></tr>
+        {% endif %}
     </table>
     </form>