Rushabh Mehta | 770e793 | 2013-03-11 18:30:05 +0530 | [diff] [blame] | 1 | <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">© {{ copyright }}</div> |
| 36 | {% endif %} |
| 37 | {% if address %} |
| 38 | {{ address }} |
| 39 | {% endif %} |
| 40 | <p><div class="input-append" style="text-align: center; margin:30px 0px;"> |
| 41 | <input class="span3" id="footer-subscribe-email" type="text" placeholder="Your email address..."> |
| 42 | <button class="btn" type="button" id="footer-subscribe-button">Stay Updated</button> |
| 43 | </div></p> |
| 44 | <script> |
| 45 | $("#footer-subscribe-button").click(function() { |
Rushabh Mehta | 0642083 | 2013-03-12 12:29:10 +0530 | [diff] [blame] | 46 | |
| 47 | $("#footer-subscribe-email").attr('disabled', true); |
| 48 | $("#footer-subscribe-button").html("Sending...") |
| 49 | .attr("disabled", true); |
| 50 | |
Rushabh Mehta | 770e793 | 2013-03-11 18:30:05 +0530 | [diff] [blame] | 51 | 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 Mehta | 770e793 | 2013-03-11 18:30:05 +0530 | [diff] [blame] | 57 | if(!r.exc) { |
Rushabh Mehta | 770e793 | 2013-03-11 18:30:05 +0530 | [diff] [blame] | 58 | $("#footer-subscribe-button").html("Thank You :)") |
| 59 | .addClass("btn-success").attr("disabled", true); |
| 60 | } else { |
Rushabh Mehta | 0642083 | 2013-03-12 12:29:10 +0530 | [diff] [blame] | 61 | $("#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 Mehta | 770e793 | 2013-03-11 18:30:05 +0530 | [diff] [blame] | 64 | } |
| 65 | } |
| 66 | }); |
| 67 | } |
| 68 | }); |
| 69 | </script> |
| 70 | </div> |
| 71 | </footer> |