Browse Source

Move MailChimp form code to separate file

Talha Mansoor 11 years ago
parent
commit
ab45f7a8cd
2 changed files with 22 additions and 22 deletions
  1. 1 22
      templates/article.html
  2. 21 0
      templates/mailchimp.html

+ 1 - 22
templates/article.html

@@ -102,29 +102,8 @@
                 {% endfor %}
             </ul>
             {% endif %}
-
             {% include 'social_links.html' %}
-            {% if MAILCHIMP_FORM_ACTION %}
-            {% if not EMAIL_SUBSCRIPTION_LABEL %}
-            {% set EMAIL_SUBSCRIPTION_LABEL='Email Newsletter' %}
-            {% endif %}
-            {% if not SUBSCRIBE_BUTTON_TITLE %}
-            {% set SUBSCRIBE_BUTTON_TITLE='Subscribe' %}
-            {% endif %}
-            {% if not EMAIL_PLACEHOLDER %}
-            {% set EMAIL_PLACEHOLDER ='email address' %}
-            {% endif %}
-            <!-- Begin MailChimp Signup Form -->
-            <div id="mc_embed_signup">
-                <form action="{{ MAILCHIMP_FORM_ACTION }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
-                    <h4>{{ EMAIL_SUBSCRIPTION_LABEL }}</h4>
-                    <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ EMAIL_FIELD_PLACEHOLDER }}" required>
-                    <div class="clear"><input type="submit" value="{{ SUBSCRIBE_BUTTON_TITLE }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
-                </form>
-            </div>
-
-            <!--End mc_embed_signup-->
-            {% endif %}
+            {% include 'mailchimp.html' %}
         </div>
         </section>
 </div>

+ 21 - 0
templates/mailchimp.html

@@ -0,0 +1,21 @@
+{% if MAILCHIMP_FORM_ACTION %}
+    {% if not EMAIL_SUBSCRIPTION_LABEL %}
+        {% set EMAIL_SUBSCRIPTION_LABEL='Email Newsletter' %}
+    {% endif %}
+    {% if not SUBSCRIBE_BUTTON_TITLE %}
+        {% set SUBSCRIBE_BUTTON_TITLE='Subscribe' %}
+    {% endif %}
+    {% if not EMAIL_PLACEHOLDER %}
+        {% set EMAIL_PLACEHOLDER ='email address' %}
+    {% endif %}
+<!-- Begin MailChimp Signup Form -->
+<div id="mc_embed_signup">
+<form action="{{ MAILCHIMP_FORM_ACTION }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
+<h4>{{ EMAIL_SUBSCRIPTION_LABEL }}</h4>
+<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ EMAIL_FIELD_PLACEHOLDER }}" required>
+<div class="clear"><input type="submit" value="{{ SUBSCRIBE_BUTTON_TITLE }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
+</form>
+</div>
+<!--End mc_embed_signup-->
+{% endif %}
+