-
Notifications
You must be signed in to change notification settings - Fork 191
/
Copy pathindex.html.erb
90 lines (78 loc) · 2.84 KB
/
index.html.erb
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<% if ENV["GA_PROPERTY_ID"] %>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '<%= ENV["GA_PROPERTY_ID"] %>', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<% end %>
<div class="container" style="text-align: center; max-width: 350px; padding-top: 20px;">
<% if @metadata[:icon_url] %>
<%= image_tag @metadata[:icon_url], class: "appIcon", style: "margin-bottom: 30px;" %>
<% else %>
<div style="margin-bottom: 20px"></div>
<% end %>
<% unless @message %>
<h4 class="" style="margin-bottom: 40px;"><%= @metadata[:title] %></h4>
<%= form_tag("submit", method: "post", style: "text-align: left", onsubmit: "didSubmit()") do %>
<%= label_tag(:first_name, t(:first_name_label)) %>
<%= text_field_tag :first_name, '', class: "form-control", placeholder: t(:first_name_placeholder) %><br />
<%= label_tag(:last_name, t(:last_name_label)) %>
<%= text_field_tag :last_name, '', class: "form-control", placeholder: t(:last_name_placeholder) %><br />
<%= label_tag(:email, t(:email_label), class: "required") %>
<%= email_field_tag :email, @email, class: "form-control", placeholder: t(:email_placeholder) %><br />
<% if ENV["ITC_TOKEN"] %>
<% if params[:token] %>
<%= hidden_field_tag :token, '', value: params[:token] %>
<% else %>
<%= label_tag(:token, t(:password_label)) %>
<%= password_field_tag :token, '', class: "form-control", placeholder: t(:password_placeholder) %><br />
<% end %>
<% end %>
<br />
<%= submit_tag t(:get_beta_access), class: 'btn btn-lg btn-primary btn-block', id: "submit" %>
<% end %>
<% else %>
<p class="alert alert-<%= @type %>">
<%= @message %>
</p>
<% end %>
<p class="footer">
<% if @imprint_url %>
<%= link_to t(:imprint), @imprint_url, target: "_blank" %> |
<% end %>
Powered by <a href="https://fastlane.tools" target="_blank">fastlane</a>
</p>
</div>
<script type="text/javascript">
function didSubmit() {
$("#submit").val("<%= t(:loading) %>...")
$("#submit").prop('disabled', true)
}
</script>
<style type="text/css">
.appIcon {
-webkit-border-radius: 22.544%;
-moz-border-radius: 22.544%;
-ms-border-radius: 22.544%;
border-radius: 22.544%;
width: 256px;
}
#submit {
margin-bottom: 20px;
}
.footer {
color: #888;
}
@media screen and (min-width: 800px) {
.footer {
position: absolute;
bottom: 10px;
right: 25px;
}
}
</style>