Skip to content

Commit 463b9ab

Browse files
authored
Merge pull request #426 from datacamp/leadform
DataCamp Lead Form
2 parents 63e72ba + a8fc6c5 commit 463b9ab

File tree

13 files changed

+202
-76
lines changed

13 files changed

+202
-76
lines changed

assets/images/groups/airbnb.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/groups/deloitte.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/groups/intel.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/groups/nielsen.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/groups/paypal.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/groups/uber.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/js/_leadform.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(function($) {
2+
$('.js-demo-form').on('submit', function(e) {
3+
e.preventDefault();
4+
$.ajax({
5+
method: "POST",
6+
url: "https://hooks.zapier.com/hooks/catch/2383820/wv86oo/",
7+
data: $('.js-demo-form').serializeArray()
8+
}).done(function(msg) {
9+
$('.js-demo-form').html("<div class='demo-form__success'><h3>Thanks!</h3><p>We'll be in touch.</p></div>");
10+
window.snowplow('trackStructEvent', 'form', 'submit', 'rdocs_demo_form', '', 0.0);
11+
});
12+
});
13+
14+
$(document).ready(function() {
15+
$('.js-phone-label-question-mark').tooltip();
16+
})
17+
})($jq)

views/layout.ejs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</div>
5151
<% if(!inCampus) { %>
5252
<%- partial ('./shared/_dc_footer.ejs') %>
53-
<%- partial ('./shared/_dc_modal.ejs') %>
53+
<%- partial('./shared/_leadform.ejs') %>
5454
<% } %>
5555

5656
<!--TEMPLATES-->
@@ -93,6 +93,7 @@
9393
<script src="/js/dependencies/highlight.pack.js"></script>
9494
<script src="/js/dependencies/highlightjs-line-numbers.js"></script>
9595
<script src="/js/dependencies/rstudio_navigator.js"></script>
96+
<script src="/js/_leadform.js"></script>
9697
<script src="/js/helpers/boot.js"></script>
9798
<script src="/js/helpers/downloadStats.js"></script>
9899
<script src="/js/helpers/list-table-filtering.js"></script>

views/shared/_dc_footer.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<span class="dc-footer--text">
44
Learn R at work
55
</span>
6-
<a class="dc-footer--link btn btn-primary" href="https://www.datacamp.com/groups/business">Try it free</a>
6+
<a class="dc-footer--link btn btn-primary" href="#demo-modal" rel="modal:open">Request a demo</a>
77
<span class="dc-footer--cross"><i class="fa fa-times" aria-hidden="true"></i></span>
88
</div>
99
<% }%>

0 commit comments

Comments
 (0)