blob: 746b6e911495b0d3c693e0728bb015cf4698c653 [file] [log] [blame]
Rushabh Mehta770e7932013-03-11 18:30:05 +05301<footer class="container"><div class="web-footer">
2 {% if facebook_share or google_plus_one or twitter_share or linked_in_share %}
3 <div class="social-icons" style="">
4 <span style="font-size: 11px;">{{ share_text or "Share this page on: "}}</span>
5 {% if google_plus_one %}
6 <a href="https://plus.google.com/share?url={{ url }}"
7 target="_blank"><i class="icon-google-plus"></i></a>
8 {% endif %}
9 {% if twitter_share %}
10 <a href="https://twitter.com/intent/tweet?url={{ url }}&text={{ encoded_title }}"
11 target="_blank" ><i class="icon-twitter"></i></a>
12 {% endif %}
13 {% if facebook_share %}
14 <a href="https://www.facebook.com/sharer.php?u={{ url }}&t={{ encoded_title }}&via={{ twitter_share_via }}"
15 target="_blank"><i class="icon-facebook"></i></a>
16 {% endif %}
17 {% if linked_in_share %}
18 <a href="http://www.linkedin.com/shareArticle?mini=true&url={{ url }}&title={{ encoded_title }}"
19 target="_blank"><i class="icon-linkedin"></i></a>
20 {% endif %}
21 </div>
22 {% endif %}
23 <p style="float: right; clear: right;">
24 <a style="font-size: 90%; color: #888;" href="attributions">ERPNext Powered</a>
25 </p>
26 <div class="web-footer-menu">
27 <ul>
28 {% for item in footer_items %}
29 <li><a href="{{ item.url }}" {{ item.target }}
30 data-label="{{ item.label }}">{{ item.label }}</a></li>
31 {% endfor %}
32 </ul>
33 </div>
34 {% if copyright %}
35 <div class="web-footer-copyright">&copy; {{ copyright }}</div>
36 {% endif %}
37 {% if address %}
38 {{ address }}
39 {% endif %}
40 <p><div class="input-append" style="text-align: center; margin:30px 0px;">
Rushabh Mehta4a2f0f82013-05-22 11:57:05 +053041 <input class="col col-lg-3" id="footer-subscribe-email" type="text" placeholder="Your email address...">
Rushabh Mehta770e7932013-03-11 18:30:05 +053042 <button class="btn" type="button" id="footer-subscribe-button">Stay Updated</button>
43 </div></p>
44 <script>
45 $("#footer-subscribe-button").click(function() {
Rushabh Mehta06420832013-03-12 12:29:10 +053046
47 $("#footer-subscribe-email").attr('disabled', true);
48 $("#footer-subscribe-button").html("Sending...")
49 .attr("disabled", true);
50
Rushabh Mehta770e7932013-03-11 18:30:05 +053051 if($("#footer-subscribe-email").val()) {
52 erpnext.send_message({
53 subject:"Subscribe me",
54 sender: $("#footer-subscribe-email").val(),
55 message: "Subscribe to newsletter (via website footer).",
56 callback: function(r) {
Rushabh Mehta770e7932013-03-11 18:30:05 +053057 if(!r.exc) {
Rushabh Mehta770e7932013-03-11 18:30:05 +053058 $("#footer-subscribe-button").html("Thank You :)")
59 .addClass("btn-success").attr("disabled", true);
60 } else {
Rushabh Mehta06420832013-03-12 12:29:10 +053061 $("#footer-subscribe-button").html("Error :( Not a valid id?")
62 .addClass("btn-danger").attr("disabled", false);
63 $("#footer-subscribe-email").val("").attr('disabled', false);
Rushabh Mehta770e7932013-03-11 18:30:05 +053064 }
65 }
66 });
67 }
68 });
69 </script>
70 </div>
71</footer>