From affc122e8e08741ba8a0908baa380590ac23d0af Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Mon, 13 May 2019 11:10:11 +0200
Subject: [PATCH] Stop the no jvascript error to flicker by adding the
 js-hidden class.

---
 opentech/apply/funds/templates/funds/application_base.html  | 2 +-
 opentech/public/forms/templates/public_forms/form_page.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opentech/apply/funds/templates/funds/application_base.html b/opentech/apply/funds/templates/funds/application_base.html
index 45675101c..72493e2cb 100644
--- a/opentech/apply/funds/templates/funds/application_base.html
+++ b/opentech/apply/funds/templates/funds/application_base.html
@@ -26,7 +26,7 @@
         {# the page has no open rounds and we arent on a round page #}
         <h3>{% blocktrans %}Sorry this {{ page|verbose_name }} is not accepting applications at the moment{% endblocktrans %}</h3>
     {% else%}
-        <p class="wrapper--error message-no-js">You must have Javascript enabled to use this contact form.</p>
+        <p class="wrapper--error message-no-js js-hidden">You must have Javascript enabled to use this form.</p>
         <form class="form application-form" action="/test500/" method="POST" enctype="multipart/form-data">
             {{ form.media }}
             {% csrf_token %}
diff --git a/opentech/public/forms/templates/public_forms/form_page.html b/opentech/public/forms/templates/public_forms/form_page.html
index c50641870..4467e849d 100644
--- a/opentech/public/forms/templates/public_forms/form_page.html
+++ b/opentech/public/forms/templates/public_forms/form_page.html
@@ -5,7 +5,7 @@
 <div class="wrapper wrapper--medium wrapper--light-grey-bg wrapper--form">
     <h1>{{ page.title }}</h1>
     {{ page.intro|richtext }}
-    <p class="wrapper--error message-no-js">You must have Javascript enabled to use this contact form.</p>
+    <p class="wrapper--error message-no-js js-hidden">You must have Javascript enabled to use this form.</p>
     <form class="form wagtail-form" action="#" data-pageurl="{% pageurl page %}" method="post" enctype="multipart/form-data">
         {% csrf_token %}
         {{ form.media }}
-- 
GitLab