-
Notifications
You must be signed in to change notification settings - Fork 60
/
joinslack.html
65 lines (58 loc) · 2.28 KB
/
joinslack.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
layout: default
title: Join Our Slack Team
extra_js:
- validator.min.js
---
<div class="container">
<div class="row">
<div class="col-sm-12 alert alert-success alert-dismissible hidden" role="alert">
<button type="button" class="close" data-dismiss="alert" title="dismiss"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<strong>Success!</strong> You should receive an invite shortly.
</div>
<div class="col-sm-12 starter-template">
<h1>Join Our Slack Team</h1>
</div>
<div class="col-sm-8 col-sm-offset-2">
<p>Hi there! Use this form to request an invite to our <a href="https://codefordc.slack.com">Slack team</a>. Slack is a discussion and collaboration tool that we use to keep the conversation moving between meetups.</p>
</div>
<div class="col-sm-8 col-sm-offset-2">
<form id="requestinvite" role="form">
<div class="form-group">
<label for="email" class="sr-only">Email Address</label>
<input type="email" name="email" class="form-control" id="email" placeholder="Email Address">
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary" id="submitrequest">Submit</button>
</div>
</form>
</div>
</div>
</div>
{% include _global_js.html %}
<script type="text/javascript">
$(document).ready(function(){
// Form validation
$("#requestinvite").validator();
// Send message to Slack
$("#requestinvite").submit(function (event) {
event.preventDefault();
var payload = JSON.stringify({
"email": $("#email").val()
});
$("#submitrequest").html("<i class='fa fa-spinner fa-spin'>");
$.ajax({
url: "https://slackfordc.herokuapp.com/invite",
type: "POST",
data: payload,
contentType: "application/json",
success: function(){
$("#email").val("");
$(".alert").removeClass("hidden");
$("#submitrequest").text("Submit");
$("html, body").animate({scrollTop: 0}, "slow");
}
});
});
});
</script>