new landing pages for signup and download pages
This commit is contained in:
parent
c2a3cd3cc1
commit
6e51f57bff
|
|
@ -70,8 +70,7 @@
|
|||
|
||||
var selectOthers = $(context._.template($('#client-download-select-others').html(), options, { variable: 'data' }));
|
||||
|
||||
var systemRequirements = $(context._.template($('#client-download-system-requirements').html(), options, { variable: 'data' }));
|
||||
|
||||
|
||||
// isolate active images for selectOthers
|
||||
$('div.hidden-images img[data-purpose=' + platformName1 + ']', selectOthers).remove().appendTo($('a[data-order=1]', selectOthers));
|
||||
$('div.hidden-images img[data-purpose=' + platformName2 + ']', selectOthers).remove().appendTo($('a[data-order=2]', selectOthers));
|
||||
|
|
@ -107,7 +106,10 @@
|
|||
// update the 'download other platforms' buttons
|
||||
$('body.web .downloads-container').empty().append(selectOthers);
|
||||
// update system requirements
|
||||
$('body.web .system-requirements').empty().append(systemRequirements);
|
||||
if($('#client-download-system-requirements').length){
|
||||
var systemRequirements = $(context._.template($('#client-download-system-requirements').html(), options, { variable: 'data' }));
|
||||
$('body.web .system-requirements').empty().append(systemRequirements);
|
||||
}
|
||||
$('body.web .system-requirements ul').hide();
|
||||
$('body.web .system-requirements ul.' + platformName + '-requirements').show();
|
||||
$('body.web .system-requirements').show();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ class UsersController < ApplicationController
|
|||
before_filter :is_native_client
|
||||
before_filter :ip_blacklist, :only => [:create]
|
||||
|
||||
|
||||
rescue_from 'JamRuby::PermissionError' do |exception|
|
||||
@exception = exception
|
||||
render :file => 'public/403.html', :status => 403, :layout => false
|
||||
|
|
@ -97,7 +96,7 @@ class UsersController < ApplicationController
|
|||
|
||||
@affiliate_partner = load_affiliate_partner(params)
|
||||
|
||||
@signup_postback = load_postback(@invited_user, @fb_signup, @affiliate_partner)
|
||||
@signup_postback = load_postback(@invited_user, @fb_signup, @affiliate_partner, request.path)
|
||||
|
||||
load_location(request.remote_ip)
|
||||
|
||||
|
|
@ -114,12 +113,11 @@ class UsersController < ApplicationController
|
|||
@user.gender = @fb_signup.gender
|
||||
end
|
||||
|
||||
#render :layout => 'web'
|
||||
render :layout => 'jk2021'
|
||||
#render :layout => 'jk2021'
|
||||
_render('new')
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
if current_user
|
||||
redirect_to client_url
|
||||
return
|
||||
|
|
@ -158,7 +156,7 @@ class UsersController < ApplicationController
|
|||
|
||||
@invited_user = load_invited_user(params)
|
||||
@affiliate_partner = load_affiliate_partner(params)
|
||||
@signup_postback = load_postback(@invited_user, @fb_signup, @affiliate_partner)
|
||||
@signup_postback = load_postback(@invited_user, @fb_signup, @affiliate_partner, request.path)
|
||||
|
||||
|
||||
instruments = fixup_instruments(params[:jam_ruby_user][:instruments])
|
||||
|
|
@ -201,7 +199,8 @@ class UsersController < ApplicationController
|
|||
gon.signup_errors = true
|
||||
gon.musician_instruments = instruments
|
||||
gon.plan_code = desired_plan_code
|
||||
render "new", :layout => 'jk2021'
|
||||
#render "new", :layout => 'jk2021'
|
||||
_render('new')
|
||||
else
|
||||
sign_in @user
|
||||
|
||||
|
|
@ -225,7 +224,8 @@ class UsersController < ApplicationController
|
|||
def downloads
|
||||
@no_user_dropdown = true
|
||||
@page_context = 'standalone'
|
||||
render :layout => "jk2021"
|
||||
#render :layout => "jk2021"
|
||||
_render('downloads')
|
||||
end
|
||||
|
||||
# DO NOT USE CURRENT_USER IN THIS ROUTINE UNLESS REDIRECTING. IT'S CACHED FOR THE WHOLE SITE
|
||||
|
|
@ -439,6 +439,16 @@ JS
|
|||
|
||||
private
|
||||
|
||||
def _render(action)
|
||||
layout_template = case action
|
||||
when 'new'
|
||||
request.path == '/landing/general/signup' ? ['jk2021', 'new2021'] : ['web', 'new']
|
||||
when 'downloads'
|
||||
request.path == '/landing/general/downloads' ? ['jk2021', 'downloads2021'] : ['web', 'downloads']
|
||||
end
|
||||
render layout_template[1], :layout => layout_template[0]
|
||||
end
|
||||
|
||||
def is_native_client
|
||||
@nativeClient = is_native_client?
|
||||
end
|
||||
|
|
@ -526,15 +536,15 @@ JS
|
|||
@cities = @location[:state].nil? ? [] : MaxMindManager.cities(@location[:country], @location[:state])
|
||||
end
|
||||
|
||||
def load_postback(invited_user, fb_signup, affiliate_partner)
|
||||
def load_postback(invited_user, fb_signup, affiliate_partner, request_path)
|
||||
query = {}
|
||||
query[:invitation_code] = invited_user.invitation_code if invited_user
|
||||
query[:facebook_signup] = fb_signup.lookup_id if fb_signup
|
||||
query[:affiliate_partner_id] = affiliate_partner.id if affiliate_partner
|
||||
if query.length > 0
|
||||
signup_path + "?" + query.to_query
|
||||
request_path + "?" + query.to_query
|
||||
else
|
||||
signup_path
|
||||
request_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
<% provide(:page_name, 'register') %>
|
||||
<% provide(:title, 'Register') %>
|
||||
<% provide(:description, 'Sign up for your JamKazam account to play music with others online in real time and network with musicians.') %>
|
||||
<% provide(:hero_title, 'JamKazam has spent the last 6 years building the best platform in the world to let musicians play together live and in sync over the Internet.') %>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8 col-sm-12">
|
||||
<strong>Today tens of thousands of musicians use JamKazam to:</strong>
|
||||
<ul>
|
||||
<li>Rehearse with their bands from home</li>
|
||||
<li>Join open sessions to meet & play with new friends</li>
|
||||
<li>Co-write music live & interactively vs. trading files</li>
|
||||
<li>Record session performances</li>
|
||||
<li>Live broadcast session performances thru YouTube & Facebook</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p style="font-size:16px">Check out some examples of groups playing together on JamKazam:</p>
|
||||
<iframe width="625" height="400" src="https://www.youtube.com/embed/euxDykIqUdo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-sm-12">
|
||||
|
||||
<p>Sign up for a free account now and get <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122535-what-are-jamkazam-s-free-vs-premium-features-">Gold premium subscription</a> features FREE for 30 days! After 30 days you can continue playing on our free plan or select a premium plan – whatever is right for you. When you sign up, we’ll send you an email with instructions on how to set up and play on the platform.</p>
|
||||
|
||||
<%= errors_for @user %>
|
||||
<%= form_for(@user, :url => @signup_postback, :method => :post, html: { id: 'signup' }) do |f| %>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<%= f.label :first_name, "First Name:" %>
|
||||
<%= f.text_field :first_name %>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<%= f.label :last_name, "Last Name:" %>
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<%= f.label :email, "Email Address:" %>
|
||||
<%= f.text_field :email %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12">
|
||||
<%= f.label :password, "Choose a Password:" %>
|
||||
<%= f.password_field :password %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12">
|
||||
<%= f.label :password_confirmation, "Verify Password:" %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<%= f.check_box :terms_of_service %> <label for="user_terms_of_service" style="font-size: 90%">I agree to the JamKazam <%= link_to "terms of service", corp_terms_path, :rel => "external" %></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12 recaptcha">
|
||||
<% if Rails.application.config.recaptcha_enable %>
|
||||
<div id="recaptcha_select" name="recaptcha_response_field" class="g-recaptcha" data-sitekey="<%=Rails.application.config.recaptcha_public_key%>" data-callback="recaptcha_success" data-expired-callback="recaptcha_expired">
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12"><br />
|
||||
<button id="create-account-submit" onClick="$document.forms['signup'].submit()" style="width:100%">Sign Up for JamKazam</button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= content_for(:scripts) do %>
|
||||
<script type="text/javascript">
|
||||
//window.signup.handle_location_changes()
|
||||
|
||||
// window.signup.handle_register_as_changes()
|
||||
|
||||
function recaptcha_success(response) {
|
||||
//$("#create-account-submit").removeClass("disabled")
|
||||
$("#create-account-submit").prop("disabled", false)
|
||||
}
|
||||
|
||||
function recaptcha_expired(response) {
|
||||
//$("#create-account-submit").addClass("disabled")
|
||||
$("#create-account-submit").prop("disabled", true)
|
||||
}
|
||||
|
||||
function get_first_error(field) {
|
||||
if (errors[field] && errors[field].length > 0) {
|
||||
return errors[field][0]
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// populate musician instruments from previous submit, if applicable
|
||||
// if (window.gon && gon.musician_instruments) {
|
||||
// $(gon.musician_instruments).each(function (index, value) {
|
||||
// $('#' + value.instrument_id.replace(" ", "") + "_checkbox").attr("checked", true);
|
||||
// $('#' + value.instrument_id.replace(" ", "") + "_proficiency").val(value.proficiency_level.toString())
|
||||
// })
|
||||
// }
|
||||
// if(window.gon) {
|
||||
// var $radios = $('input:radio[name="jam_ruby_user[desired_plan_code]"]');
|
||||
// if(gon.plan_code) {
|
||||
// $radios.filter(gon.plan_code, true)
|
||||
// }
|
||||
// else {
|
||||
// $radios.filter('[value="<%= @plan_code %>"]').prop('checked', true)
|
||||
// }
|
||||
// }
|
||||
|
||||
// show signup errors, if any
|
||||
if (window.gon && gon.signup_errors) {
|
||||
var errors =
|
||||
<%= @user.errors.to_json.html_safe %>
|
||||
|
||||
var email = get_first_error("email")
|
||||
var first_name = get_first_error("first_name")
|
||||
var last_name = get_first_error("last_name")
|
||||
var musician_instruments = get_first_error("musician_instruments")
|
||||
var password = get_first_error("password")
|
||||
var password_confirmation = get_first_error("password_confirmation")
|
||||
var terms_of_service = get_first_error("terms_of_service")
|
||||
var country = get_first_error("country")
|
||||
var state = get_first_error("state")
|
||||
var city = get_first_error("city")
|
||||
var recaptcha = get_first_error("recaptcha")
|
||||
|
||||
|
||||
if (email) {
|
||||
var emailInput = $('#jam_ruby_user_email');
|
||||
emailInput.closest('div.field').addClass('error')
|
||||
emailInput.after("<div class='error-text'>" + email + "</div>")
|
||||
}
|
||||
|
||||
if (first_name) {
|
||||
var firstNameInput = $('#jam_ruby_user_first_name');
|
||||
firstNameInput.closest('div.field').addClass('error')
|
||||
firstNameInput.after("<div class='error-text'>" + first_name + "</div>")
|
||||
}
|
||||
|
||||
if (last_name) {
|
||||
var lastNameInput = $('#jam_ruby_user_last_name');
|
||||
lastNameInput.closest('div.field').addClass('error')
|
||||
lastNameInput.after("<div class='error-text'>" + last_name + "</div>")
|
||||
}
|
||||
|
||||
if (country) {
|
||||
var countryInput = $('#country_select');
|
||||
countryInput.closest('div.field').addClass('error')
|
||||
countryInput.after("<div class='error-text'>" + country + "</div>")
|
||||
}
|
||||
|
||||
if (state) {
|
||||
var stateInput = $('#region_select');
|
||||
stateInput.closest('div.field').addClass('error')
|
||||
stateInput.after("<div class='error-text'>" + state + "</div>")
|
||||
}
|
||||
|
||||
if (city) {
|
||||
var cityInput = $('#city_select');
|
||||
cityInput.closest('div.field').addClass('error')
|
||||
cityInput.after("<div class='error-text'>" + city + "</div>")
|
||||
}
|
||||
|
||||
if (recaptcha) {
|
||||
var recaptchaInput = $('#recaptcha_select');
|
||||
recaptchaInput.closest('div.field').addClass('error')
|
||||
recaptchaInput.after("<div class='error-text'>" + recaptcha + "</div>")
|
||||
}
|
||||
|
||||
if (musician_instruments) {
|
||||
var musicianInstrumentsInput = $('#instrument_selector');
|
||||
musicianInstrumentsInput.closest('div.ftue-instrumentlist-wrapper').addClass('error')
|
||||
musicianInstrumentsInput.closest('div.ftue-instrumentlist').after("<div class='error-text'>" + musician_instruments + "</div>")
|
||||
}
|
||||
|
||||
if (password) {
|
||||
var passwordInput = $('#jam_ruby_user_password');
|
||||
passwordInput.closest('div.field').addClass('error')
|
||||
passwordInput.after("<div class='error-text'>" + password + "</div>")
|
||||
}
|
||||
|
||||
if (password_confirmation) {
|
||||
var passwordConfirmationInput = $('#jam_ruby_user_password_confirmation');
|
||||
passwordConfirmationInput.closest('div.field').addClass('error')
|
||||
passwordConfirmationInput.after("<div class='error-text'>" + password_confirmation + "</div>")
|
||||
}
|
||||
|
||||
if (terms_of_service) {
|
||||
var termsOfServiceInput = $('#jam_ruby_user_terms_of_service');
|
||||
termsOfServiceInput.closest('small').addClass('error')
|
||||
termsOfServiceInput.after("<div class='error-text'>" + terms_of_service + "</div>")
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
@ -1,44 +1,48 @@
|
|||
|
||||
script type="text/template" id="client-download-blurb-contents"
|
||||
.downloads.text-center
|
||||
.downloads
|
||||
|
||||
a href="{{data.uri}}" class="current-os-download" data-platform="{{data.platform}}"
|
||||
|
||||
.downloads-container
|
||||
|
||||
h5 SYSTEM REQUIREMENTS:
|
||||
| {% if(data.platform == "Win32") { %}
|
||||
ul.windows-requirements
|
||||
li Windows 7, 8, or 10 - 64-bit (32-bit not supported)
|
||||
li Dual core processor or higher
|
||||
li 75MB hard disk space for app
|
||||
li External audio interface recommended (but you can start with built-in mic and & headphone jack)
|
||||
li USB 2.0, USB 3.0, Thunderbolt, or Firewire (not USB 1.1) for external audio interfaces
|
||||
li Ethernet port for real-time online sessions (WiFi not recommended)
|
||||
li Broadband Internet service with 1Mbps uplink bandwidth for real-time online sessions
|
||||
| {% } else if(data.platform == "MacOSX") { %}
|
||||
ul.mac-requirements
|
||||
li Mac OS X 10.8 or higher, 64-bit
|
||||
li Dual-core processor or higher
|
||||
li 75MB hard disk space for app
|
||||
li External audio interface recommended (but you can start with built-in mic and & headphone jack)
|
||||
li USB 2.0, USB 3.0, Thunderbolt, or Firewire (not USB 1.1) for external audio interfaces
|
||||
li Ethernet port for real-time online sessions (WiFi not recommended)
|
||||
li Broadband Internet service with 1Mbps uplink bandwidth for real-time online sessions
|
||||
| {% } else { %}
|
||||
ul.linux-requirements
|
||||
li Linux is not yet supported
|
||||
| {% } %}
|
||||
|
||||
|
||||
|
||||
.hidden.hidden-images
|
||||
= image_tag("content/button_download_mac.png", :alt => "download mac", :size => "348x92", "data-purpose" => "mac")
|
||||
= image_tag("content/button_download_windows.png", :alt => "download windows", :size => "348x92", "data-purpose" => "windows")
|
||||
= image_tag("content/button_download_linux.png", :alt => "download linux", :size => "348x92", "data-purpose" => "linux")
|
||||
|
||||
script type="text/template" id="client-download-select-others"
|
||||
.download-box.text-center
|
||||
.download-box
|
||||
.download-others
|
||||
| Need a different version?
|
||||
br
|
||||
a.choose-other-platform href="#" data-order="1" data-platform="{{data.platform1}}"
|
||||
| Click here to get JamKazam for {{data.platformDisplay1}}
|
||||
|
||||
script type="text/template" id="client-download-system-requirements"
|
||||
p
|
||||
em System Requirements:
|
||||
| {% if(data.platform == "Win32") { %}
|
||||
ul.windows-requirements
|
||||
li Windows 7, 8, or 10 - 64-bit (32-bit not supported)
|
||||
li Dual core processor or higher
|
||||
li 75MB hard disk space for app
|
||||
li External audio interface recommended (but you can start with built-in mic and & headphone jack)
|
||||
li USB 2.0, USB 3.0, Thunderbolt, or Firewire (not USB 1.1) for external audio interfaces
|
||||
li Ethernet port for real-time online sessions (WiFi not recommended)
|
||||
li Broadband Internet service with 1Mbps uplink bandwidth for real-time online sessions
|
||||
| {% } else if(data.platform == "MacOSX") { %}
|
||||
ul.mac-requirements
|
||||
li Mac OS X 10.8 or higher, 64-bit
|
||||
li Dual-core processor or higher
|
||||
li 75MB hard disk space for app
|
||||
li External audio interface recommended (but you can start with built-in mic and & headphone jack)
|
||||
li USB 2.0, USB 3.0, Thunderbolt, or Firewire (not USB 1.1) for external audio interfaces
|
||||
li Ethernet port for real-time online sessions (WiFi not recommended)
|
||||
li Broadband Internet service with 1Mbps uplink bandwidth for real-time online sessions
|
||||
| {% } else { %}
|
||||
ul.linux-requirements
|
||||
li Linux is not yet supported
|
||||
| {% } %}
|
||||
| Need a different version?
|
||||
br
|
||||
| Click here for to get JamKazam
|
||||
br
|
||||
| for {{data.platformDisplay1}} ' ''
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
script type="text/template" id="client-download-blurb-contents"
|
||||
.downloads.text-center
|
||||
|
||||
a href="{{data.uri}}" class="current-os-download" data-platform="{{data.platform}}"
|
||||
|
||||
.hidden.hidden-images
|
||||
= image_tag("content/button_download_mac.png", :alt => "download mac", :size => "348x92", "data-purpose" => "mac")
|
||||
= image_tag("content/button_download_windows.png", :alt => "download windows", :size => "348x92", "data-purpose" => "windows")
|
||||
= image_tag("content/button_download_linux.png", :alt => "download linux", :size => "348x92", "data-purpose" => "linux")
|
||||
|
||||
script type="text/template" id="client-download-select-others"
|
||||
.download-box.text-center
|
||||
.download-others
|
||||
| Need a different version?
|
||||
br
|
||||
a.choose-other-platform href="#" data-order="1" data-platform="{{data.platform1}}"
|
||||
| Click here to get JamKazam for {{data.platformDisplay1}}
|
||||
|
||||
script type="text/template" id="client-download-system-requirements"
|
||||
p
|
||||
em System Requirements:
|
||||
| {% if(data.platform == "Win32") { %}
|
||||
ul.windows-requirements
|
||||
li Windows 7, 8, or 10 - 64-bit (32-bit not supported)
|
||||
li Dual core processor or higher
|
||||
li 75MB hard disk space for app
|
||||
li External audio interface recommended (but you can start with built-in mic and & headphone jack)
|
||||
li USB 2.0, USB 3.0, Thunderbolt, or Firewire (not USB 1.1) for external audio interfaces
|
||||
li Ethernet port for real-time online sessions (WiFi not recommended)
|
||||
li Broadband Internet service with 1Mbps uplink bandwidth for real-time online sessions
|
||||
| {% } else if(data.platform == "MacOSX") { %}
|
||||
ul.mac-requirements
|
||||
li Mac OS X 10.8 or higher, 64-bit
|
||||
li Dual-core processor or higher
|
||||
li 75MB hard disk space for app
|
||||
li External audio interface recommended (but you can start with built-in mic and & headphone jack)
|
||||
li USB 2.0, USB 3.0, Thunderbolt, or Firewire (not USB 1.1) for external audio interfaces
|
||||
li Ethernet port for real-time online sessions (WiFi not recommended)
|
||||
li Broadband Internet service with 1Mbps uplink bandwidth for real-time online sessions
|
||||
| {% } else { %}
|
||||
ul.linux-requirements
|
||||
li Linux is not yet supported
|
||||
| {% } %}
|
||||
|
|
@ -1,19 +1,64 @@
|
|||
// used by congrats_musician, and downloads
|
||||
- provide(:page_name, "downloads #{@page_context}")
|
||||
- provide(:hero_title, 'Signup successful! Now download the JamKazam application.')
|
||||
|
||||
.row
|
||||
.col-md-7.col-sm-12
|
||||
p.click-to-download You need the JamKazam Mac or Windows app to play in online sessions on the JamKazam platform. Click the button below to download the app.
|
||||
br
|
||||
.downloads-blurb
|
||||
br
|
||||
.downloads-container
|
||||
|
||||
.col-md-1.col-sm-0
|
||||
.col-md-4.col-sm-12
|
||||
.system-requirements
|
||||
.w100.download-container
|
||||
.download-app
|
||||
.spinner-large
|
||||
|
||||
= render "users/download_templates"
|
||||
h2.create-account-header
|
||||
.badge-number 3
|
||||
| Download the free JamKazam app
|
||||
|
||||
.download-content
|
||||
.download-entreaty
|
||||
|
||||
p You need the JamKazam application to:
|
||||
ul
|
||||
li Play music with others in real time on the JamKazam platform
|
||||
li Make audio recordings and share them via Facebook or URL
|
||||
li Make video recordings and share them via YouTube or URL
|
||||
li Live broadcast your sessions to family, friends, and fans
|
||||
li Play and control your JamTracks multi-track recordings
|
||||
|
||||
p.click-to-download Click the button below to download the JamKazam application installer.
|
||||
.downloads-blurb
|
||||
|
||||
.jamtracks
|
||||
|
||||
h2.shop-jamtracks
|
||||
.badge-number 4
|
||||
| Get your free JamTrack
|
||||
span.special-value
|
||||
| ($2.99 value)
|
||||
|
||||
|
||||
.jamtrack-content
|
||||
.jamtrack-entreaty
|
||||
|
||||
p JamTracks are multi-track pro recordings you can use to:
|
||||
ul
|
||||
li Solo any part to hear and learn it
|
||||
li Mute the part you want to play, and play along with the rest
|
||||
li Make audio recordings and share them via Facebook or URL
|
||||
li Make video recordings and share them via YouTube or URL
|
||||
li Go online to play real time sessions, with others playing parts
|
||||
p
|
||||
| Watch the video below to learn more. Then click the button to shop
|
||||
| for your first JamTrack - free! Add it to your shopping cart, and we'll
|
||||
| make it free during the checkout process. Free offer good for 1 week only!
|
||||
.video-container
|
||||
- if !Rails.env.test?
|
||||
iframe src="//www.youtube.com/embed/askHvcCoNfw" frameborder="0" allowfullscreen="allowfullscreen"
|
||||
|
||||
a.go-jamtrack-shopping href="/client#/jamtrack/search" rel="external"
|
||||
| Shop for free
|
||||
br
|
||||
| JamTrack now!
|
||||
|
||||
br clear="all"
|
||||
|
||||
|
||||
|
||||
= render "users/download_templates"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
// used by congrats_musician, and downloads
|
||||
- provide(:page_name, "downloads #{@page_context}")
|
||||
- provide(:hero_title, 'Signup successful! Now download the JamKazam application.')
|
||||
|
||||
.row
|
||||
.col-md-7.col-sm-12
|
||||
p.click-to-download You need the JamKazam Mac or Windows app to play in online sessions on the JamKazam platform. Click the button below to download the app.
|
||||
br
|
||||
.downloads-blurb
|
||||
br
|
||||
.downloads-container
|
||||
|
||||
.col-md-1.col-sm-0
|
||||
.col-md-4.col-sm-12
|
||||
.system-requirements
|
||||
|
||||
= render "users/download_templates2021"
|
||||
|
||||
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
// used by congrats_musician, and downloads
|
||||
- provide(:page_name, "downloads #{@page_context}")
|
||||
|
||||
.w100.download-container
|
||||
.download-app
|
||||
.spinner-large
|
||||
|
||||
h2.create-account-header
|
||||
.badge-number 3
|
||||
| Download the free JamKazam app
|
||||
|
||||
.download-content
|
||||
.download-entreaty
|
||||
|
||||
p You need the JamKazam application to:
|
||||
ul
|
||||
li Play music with others in real time on the JamKazam platform
|
||||
li Make audio recordings and share them via Facebook or URL
|
||||
li Make video recordings and share them via YouTube or URL
|
||||
li Live broadcast your sessions to family, friends, and fans
|
||||
li Play and control your JamTracks multi-track recordings
|
||||
|
||||
p.click-to-download Click the button below to download the JamKazam application installer.
|
||||
.downloads-blurb
|
||||
|
||||
.jamtracks
|
||||
|
||||
h2.shop-jamtracks
|
||||
.badge-number 4
|
||||
| Get your free JamTrack
|
||||
span.special-value
|
||||
| ($2.99 value)
|
||||
|
||||
|
||||
.jamtrack-content
|
||||
.jamtrack-entreaty
|
||||
|
||||
p JamTracks are multi-track pro recordings you can use to:
|
||||
ul
|
||||
li Solo any part to hear and learn it
|
||||
li Mute the part you want to play, and play along with the rest
|
||||
li Make audio recordings and share them via Facebook or URL
|
||||
li Make video recordings and share them via YouTube or URL
|
||||
li Go online to play real time sessions, with others playing parts
|
||||
p
|
||||
| Watch the video below to learn more. Then click the button to shop
|
||||
| for your first JamTrack - free! Add it to your shopping cart, and we'll
|
||||
| make it free during the checkout process. Free offer good for 1 week only!
|
||||
.video-container
|
||||
- if !Rails.env.test?
|
||||
iframe src="//www.youtube.com/embed/askHvcCoNfw" frameborder="0" allowfullscreen="allowfullscreen"
|
||||
|
||||
a.go-jamtrack-shopping href="/client#/jamtrack/search" rel="external"
|
||||
| Shop for free
|
||||
br
|
||||
| JamTrack now!
|
||||
|
||||
br clear="all"
|
||||
|
||||
|
||||
|
||||
= render "users/download_templates"
|
||||
|
||||
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
<%= render "users/downloads" %>
|
||||
|
||||
<%= content_for :scripts do %>
|
||||
<script type="text/javascript">
|
||||
$(function() { window.JK.Downloads.listClients(false) } );
|
||||
</script>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function() { window.JK.Downloads.listClients(false) } );
|
||||
</script>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<% provide(:title, 'Downloads') %>
|
||||
<% provide(:description, 'Download the JamKazam app for Windows or Mac to play music online with others.') %>
|
||||
|
||||
<%= render "users/downloads2021" %>
|
||||
|
||||
<%= content_for :scripts do %>
|
||||
<script type="text/javascript">
|
||||
$(function() { window.JK.Downloads.listClients(false) } );
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
@ -1,99 +1,129 @@
|
|||
<% provide(:page_name, 'register') %>
|
||||
<% provide(:title, 'Register') %>
|
||||
<% provide(:description, 'Sign up for your JamKazam account to play music with others online in real time and network with musicians.') %>
|
||||
<% provide(:hero_title, 'JamKazam has spent the last 6 years building the best platform in the world to let musicians play together live and in sync over the Internet.') %>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8 col-sm-12">
|
||||
<strong>Today tens of thousands of musicians use JamKazam to:</strong>
|
||||
<ul>
|
||||
<li>Rehearse with their bands from home</li>
|
||||
<li>Join open sessions to meet & play with new friends</li>
|
||||
<li>Co-write music live & interactively vs. trading files</li>
|
||||
<li>Record session performances</li>
|
||||
<li>Live broadcast session performances thru YouTube & Facebook</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p style="font-size:16px">Check out some examples of groups playing together on JamKazam:</p>
|
||||
<iframe width="625" height="400" src="https://www.youtube.com/embed/euxDykIqUdo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
</div>
|
||||
<div class="content-wrapper register-page">
|
||||
|
||||
<%= form_for(@user, :url => @signup_postback, :method => :post) do |f| %>
|
||||
|
||||
<div class="left-side">
|
||||
|
||||
<h2 class="create-account-header"><div class="badge-number">1</div>Create your free JamKazam account</h2>
|
||||
|
||||
|
||||
<div class="col-md-4 col-sm-12">
|
||||
|
||||
<p>Sign up for a free account now and get <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122535-what-are-jamkazam-s-free-vs-premium-features-">Gold premium subscription</a> features FREE for 30 days! After 30 days you can continue playing on our free plan or select a premium plan – whatever is right for you. When you sign up, we’ll send you an email with instructions on how to set up and play on the platform.</p>
|
||||
|
||||
<%= errors_for @user %>
|
||||
<%= form_for(@user, :url => @signup_postback, :method => :post, html: { id: 'signup' }) do |f| %>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<%= f.label :first_name, "First Name:" %>
|
||||
<%= f.text_field :first_name %>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<%= f.label :last_name, "Last Name:" %>
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<%= f.label :email, "Email Address:" %>
|
||||
<%= f.text_field :email %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12">
|
||||
<%= f.label :password, "Choose a Password:" %>
|
||||
<%= f.password_field :password %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12">
|
||||
<%= f.label :password_confirmation, "Verify Password:" %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<%= f.check_box :terms_of_service %> <label for="user_terms_of_service" style="font-size: 90%">I agree to the JamKazam <%= link_to "terms of service", corp_terms_path, :rel => "external" %></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12 recaptcha">
|
||||
<% if Rails.application.config.recaptcha_enable %>
|
||||
<div class="register-container">
|
||||
<div class="register-as">
|
||||
Register as a:
|
||||
<%= f.radio_button :musician, true, :class => "register-as register-musician" %>
|
||||
Musician
|
||||
|
||||
<%= f.radio_button :musician, false, :class => "register-as register-fan" %>
|
||||
Fan
|
||||
</div>
|
||||
|
||||
<div class="field first_name">
|
||||
<%= f.label :first_name, "First Name:" %>
|
||||
<%= f.text_field :first_name %>
|
||||
</div>
|
||||
|
||||
<div class="field last_name">
|
||||
<%= f.label :last_name, "Last Name:" %>
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field email">
|
||||
<%= f.label :email, "Email Address:" %>
|
||||
<%= f.text_field :email %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field password">
|
||||
<%= f.label :password, "Choose a Password:" %>
|
||||
<%= f.password_field :password %>
|
||||
</div>
|
||||
|
||||
<div class="field password_confirmation">
|
||||
<%= f.label :password_confirmation, "Verify Password:" %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field terms_of_service">
|
||||
<small>
|
||||
<%= f.check_box :terms_of_service %>
|
||||
<span>I have read and agree to the JamKazam <%= link_to "terms of service", corp_terms_path, :rel => "external" %>
|
||||
.</span>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="field recaptcha">
|
||||
<% if Rails.application.config.recaptcha_enable %>
|
||||
<div id="recaptcha_select" name="recaptcha_response_field" class="g-recaptcha" data-sitekey="<%=Rails.application.config.recaptcha_public_key%>" data-callback="recaptcha_success" data-expired-callback="recaptcha_expired">
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12"><br />
|
||||
<button id="create-account-submit" onClick="$document.forms['signup'].submit()" style="width:100%">Sign Up for JamKazam</button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-side">
|
||||
<h2 class="subscription-type-header"><div class="badge-number">2</div>Select your subscription plan</h2>
|
||||
|
||||
<div class="subscription-options">
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, '', :checked => true %>
|
||||
<label for="male">Free Plan ($0.00/month)</label>
|
||||
</div>
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, 'jamsubsilver'%>
|
||||
<label for="male">Silver Plan ($4.99/month)</label>
|
||||
</div>
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, 'jamsubgold' %>
|
||||
<label for="male">Gold Plan ($9.99/month)</label>
|
||||
</div>
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, 'jamsubplatinum'%>
|
||||
<label for="male">Platinum Plan ($19.99/month)</label>
|
||||
</div>
|
||||
|
||||
<div class="comparison-block">
|
||||
<a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122535-what-are-jamkazam-s-free-vs-premium-features-" target="_blank">compare plans</a>
|
||||
<div class="pricing-info">New users have access to the Gold plan free for the first 30 days. The plan you select will take effect after the first 30-day trial period. Taxes apply to all non-free plans.</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "CREATE ACCOUNT", class: "button-orange disabled", id:"create-account-submit"%>
|
||||
<%= link_to "CANCEL", root_path, :class=>'button-grey' %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- end inner -->
|
||||
|
||||
<!-- end overlay content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<%= content_for(:scripts) do %>
|
||||
<script type="text/javascript">
|
||||
//window.signup.handle_location_changes()
|
||||
window.signup.handle_location_changes()
|
||||
|
||||
// window.signup.handle_register_as_changes()
|
||||
window.signup.handle_register_as_changes()
|
||||
|
||||
function recaptcha_success(response) {
|
||||
//$("#create-account-submit").removeClass("disabled")
|
||||
$("#create-account-submit").prop("disabled", false)
|
||||
$("#create-account-submit").removeClass("disabled")
|
||||
}
|
||||
|
||||
function recaptcha_expired(response) {
|
||||
//$("#create-account-submit").addClass("disabled")
|
||||
$("#create-account-submit").prop("disabled", true)
|
||||
$("#create-account-submit").addClass("disabled")
|
||||
}
|
||||
|
||||
function get_first_error(field) {
|
||||
|
|
@ -106,21 +136,21 @@
|
|||
}
|
||||
|
||||
// populate musician instruments from previous submit, if applicable
|
||||
// if (window.gon && gon.musician_instruments) {
|
||||
// $(gon.musician_instruments).each(function (index, value) {
|
||||
// $('#' + value.instrument_id.replace(" ", "") + "_checkbox").attr("checked", true);
|
||||
// $('#' + value.instrument_id.replace(" ", "") + "_proficiency").val(value.proficiency_level.toString())
|
||||
// })
|
||||
// }
|
||||
// if(window.gon) {
|
||||
// var $radios = $('input:radio[name="jam_ruby_user[desired_plan_code]"]');
|
||||
// if(gon.plan_code) {
|
||||
// $radios.filter(gon.plan_code, true)
|
||||
// }
|
||||
// else {
|
||||
// $radios.filter('[value="<%= @plan_code %>"]').prop('checked', true)
|
||||
// }
|
||||
// }
|
||||
if (window.gon && gon.musician_instruments) {
|
||||
$(gon.musician_instruments).each(function (index, value) {
|
||||
$('#' + value.instrument_id.replace(" ", "") + "_checkbox").attr("checked", true);
|
||||
$('#' + value.instrument_id.replace(" ", "") + "_proficiency").val(value.proficiency_level.toString())
|
||||
})
|
||||
}
|
||||
if(window.gon) {
|
||||
var $radios = $('input:radio[name="jam_ruby_user[desired_plan_code]"]');
|
||||
if(gon.plan_code) {
|
||||
$radios.filter(gon.plan_code, true)
|
||||
}
|
||||
else {
|
||||
$radios.filter('[value="<%= @plan_code %>"]').prop('checked', true)
|
||||
}
|
||||
}
|
||||
|
||||
// show signup errors, if any
|
||||
if (window.gon && gon.signup_errors) {
|
||||
|
|
@ -203,9 +233,9 @@
|
|||
if (terms_of_service) {
|
||||
var termsOfServiceInput = $('#jam_ruby_user_terms_of_service');
|
||||
termsOfServiceInput.closest('small').addClass('error')
|
||||
termsOfServiceInput.after("<div class='error-text'>" + terms_of_service + "</div>")
|
||||
// termsOfServiceInput.closest('small').after("<div class='error-text'>" + terms_of_service + "</div>")
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<% end %>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
<% provide(:page_name, 'register') %>
|
||||
<% provide(:title, 'Register') %>
|
||||
<% provide(:description, 'Sign up for your JamKazam account to play music with others online in real time and network with musicians.') %>
|
||||
<% provide(:hero_title, 'JamKazam has spent the last 6 years building the best platform in the world to let musicians play together live and in sync over the Internet.') %>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8 col-sm-12">
|
||||
<strong>Today tens of thousands of musicians use JamKazam to:</strong>
|
||||
<ul>
|
||||
<li>Rehearse with their bands from home</li>
|
||||
<li>Join open sessions to meet & play with new friends</li>
|
||||
<li>Co-write music live & interactively vs. trading files</li>
|
||||
<li>Record session performances</li>
|
||||
<li>Live broadcast session performances thru YouTube & Facebook</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p style="font-size:16px">Check out some examples of groups playing together on JamKazam:</p>
|
||||
<iframe width="625" height="400" src="https://www.youtube.com/embed/euxDykIqUdo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-sm-12">
|
||||
|
||||
<p>Sign up for a free account now and get <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122535-what-are-jamkazam-s-free-vs-premium-features-">Gold premium subscription</a> features FREE for 30 days! After 30 days you can continue playing on our free plan or select a premium plan – whatever is right for you. When you sign up, we’ll send you an email with instructions on how to set up and play on the platform.</p>
|
||||
|
||||
<%= errors_for @user %>
|
||||
<%= form_for(@user, :url => @signup_postback, :method => :post, html: { id: 'signup' }) do |f| %>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<%= f.label :first_name, "First Name:" %>
|
||||
<%= f.text_field :first_name %>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<%= f.label :last_name, "Last Name:" %>
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<%= f.label :email, "Email Address:" %>
|
||||
<%= f.text_field :email %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12">
|
||||
<%= f.label :password, "Choose a Password:" %>
|
||||
<%= f.password_field :password %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12">
|
||||
<%= f.label :password_confirmation, "Verify Password:" %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<%= f.check_box :terms_of_service %> <label for="user_terms_of_service" style="font-size: 90%">I agree to the JamKazam <%= link_to "terms of service", corp_terms_path, :rel => "external" %></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12 recaptcha">
|
||||
<% if Rails.application.config.recaptcha_enable %>
|
||||
<div id="recaptcha_select" name="recaptcha_response_field" class="g-recaptcha" data-sitekey="<%=Rails.application.config.recaptcha_public_key%>" data-callback="recaptcha_success" data-expired-callback="recaptcha_expired">
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12"><br />
|
||||
<button id="create-account-submit" onClick="$document.forms['signup'].submit()" style="width:100%">Sign Up for JamKazam</button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= content_for(:scripts) do %>
|
||||
<script type="text/javascript">
|
||||
//window.signup.handle_location_changes()
|
||||
|
||||
// window.signup.handle_register_as_changes()
|
||||
|
||||
function recaptcha_success(response) {
|
||||
//$("#create-account-submit").removeClass("disabled")
|
||||
$("#create-account-submit").prop("disabled", false)
|
||||
}
|
||||
|
||||
function recaptcha_expired(response) {
|
||||
//$("#create-account-submit").addClass("disabled")
|
||||
$("#create-account-submit").prop("disabled", true)
|
||||
}
|
||||
|
||||
function get_first_error(field) {
|
||||
if (errors[field] && errors[field].length > 0) {
|
||||
return errors[field][0]
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// populate musician instruments from previous submit, if applicable
|
||||
// if (window.gon && gon.musician_instruments) {
|
||||
// $(gon.musician_instruments).each(function (index, value) {
|
||||
// $('#' + value.instrument_id.replace(" ", "") + "_checkbox").attr("checked", true);
|
||||
// $('#' + value.instrument_id.replace(" ", "") + "_proficiency").val(value.proficiency_level.toString())
|
||||
// })
|
||||
// }
|
||||
// if(window.gon) {
|
||||
// var $radios = $('input:radio[name="jam_ruby_user[desired_plan_code]"]');
|
||||
// if(gon.plan_code) {
|
||||
// $radios.filter(gon.plan_code, true)
|
||||
// }
|
||||
// else {
|
||||
// $radios.filter('[value="<%= @plan_code %>"]').prop('checked', true)
|
||||
// }
|
||||
// }
|
||||
|
||||
// show signup errors, if any
|
||||
if (window.gon && gon.signup_errors) {
|
||||
var errors =
|
||||
<%= @user.errors.to_json.html_safe %>
|
||||
|
||||
var email = get_first_error("email")
|
||||
var first_name = get_first_error("first_name")
|
||||
var last_name = get_first_error("last_name")
|
||||
var musician_instruments = get_first_error("musician_instruments")
|
||||
var password = get_first_error("password")
|
||||
var password_confirmation = get_first_error("password_confirmation")
|
||||
var terms_of_service = get_first_error("terms_of_service")
|
||||
var country = get_first_error("country")
|
||||
var state = get_first_error("state")
|
||||
var city = get_first_error("city")
|
||||
var recaptcha = get_first_error("recaptcha")
|
||||
|
||||
|
||||
if (email) {
|
||||
var emailInput = $('#jam_ruby_user_email');
|
||||
emailInput.closest('div.field').addClass('error')
|
||||
emailInput.after("<div class='error-text'>" + email + "</div>")
|
||||
}
|
||||
|
||||
if (first_name) {
|
||||
var firstNameInput = $('#jam_ruby_user_first_name');
|
||||
firstNameInput.closest('div.field').addClass('error')
|
||||
firstNameInput.after("<div class='error-text'>" + first_name + "</div>")
|
||||
}
|
||||
|
||||
if (last_name) {
|
||||
var lastNameInput = $('#jam_ruby_user_last_name');
|
||||
lastNameInput.closest('div.field').addClass('error')
|
||||
lastNameInput.after("<div class='error-text'>" + last_name + "</div>")
|
||||
}
|
||||
|
||||
if (country) {
|
||||
var countryInput = $('#country_select');
|
||||
countryInput.closest('div.field').addClass('error')
|
||||
countryInput.after("<div class='error-text'>" + country + "</div>")
|
||||
}
|
||||
|
||||
if (state) {
|
||||
var stateInput = $('#region_select');
|
||||
stateInput.closest('div.field').addClass('error')
|
||||
stateInput.after("<div class='error-text'>" + state + "</div>")
|
||||
}
|
||||
|
||||
if (city) {
|
||||
var cityInput = $('#city_select');
|
||||
cityInput.closest('div.field').addClass('error')
|
||||
cityInput.after("<div class='error-text'>" + city + "</div>")
|
||||
}
|
||||
|
||||
if (recaptcha) {
|
||||
var recaptchaInput = $('#recaptcha_select');
|
||||
recaptchaInput.closest('div.field').addClass('error')
|
||||
recaptchaInput.after("<div class='error-text'>" + recaptcha + "</div>")
|
||||
}
|
||||
|
||||
if (musician_instruments) {
|
||||
var musicianInstrumentsInput = $('#instrument_selector');
|
||||
musicianInstrumentsInput.closest('div.ftue-instrumentlist-wrapper').addClass('error')
|
||||
musicianInstrumentsInput.closest('div.ftue-instrumentlist').after("<div class='error-text'>" + musician_instruments + "</div>")
|
||||
}
|
||||
|
||||
if (password) {
|
||||
var passwordInput = $('#jam_ruby_user_password');
|
||||
passwordInput.closest('div.field').addClass('error')
|
||||
passwordInput.after("<div class='error-text'>" + password + "</div>")
|
||||
}
|
||||
|
||||
if (password_confirmation) {
|
||||
var passwordConfirmationInput = $('#jam_ruby_user_password_confirmation');
|
||||
passwordConfirmationInput.closest('div.field').addClass('error')
|
||||
passwordConfirmationInput.after("<div class='error-text'>" + password_confirmation + "</div>")
|
||||
}
|
||||
|
||||
if (terms_of_service) {
|
||||
var termsOfServiceInput = $('#jam_ruby_user_terms_of_service');
|
||||
termsOfServiceInput.closest('small').addClass('error')
|
||||
termsOfServiceInput.after("<div class='error-text'>" + terms_of_service + "</div>")
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<% provide(:title, 'Downloads') %>
|
||||
<% provide(:description, 'Download the JamKazam app for Windows or Mac to play music online with others.') %>
|
||||
|
||||
<%= render "users/downloads" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() { window.JK.Downloads.listClients(false) } );
|
||||
</script>
|
||||
|
|
@ -1,241 +0,0 @@
|
|||
<% provide(:page_name, 'register') %>
|
||||
<% provide(:title, 'Register') %>
|
||||
<% provide(:description, 'Sign up for your JamKazam account to play music with others online in real time and network with musicians.') %>
|
||||
|
||||
<div class="content-wrapper register-page">
|
||||
|
||||
<%= form_for(@user, :url => @signup_postback, :method => :post) do |f| %>
|
||||
|
||||
<div class="left-side">
|
||||
|
||||
<h2 class="create-account-header"><div class="badge-number">1</div>Create your free JamKazam account</h2>
|
||||
|
||||
|
||||
<div class="register-container">
|
||||
<div class="register-as">
|
||||
Register as a:
|
||||
<%= f.radio_button :musician, true, :class => "register-as register-musician" %>
|
||||
Musician
|
||||
|
||||
<%= f.radio_button :musician, false, :class => "register-as register-fan" %>
|
||||
Fan
|
||||
</div>
|
||||
|
||||
<div class="field first_name">
|
||||
<%= f.label :first_name, "First Name:" %>
|
||||
<%= f.text_field :first_name %>
|
||||
</div>
|
||||
|
||||
<div class="field last_name">
|
||||
<%= f.label :last_name, "Last Name:" %>
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field email">
|
||||
<%= f.label :email, "Email Address:" %>
|
||||
<%= f.text_field :email %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field password">
|
||||
<%= f.label :password, "Choose a Password:" %>
|
||||
<%= f.password_field :password %>
|
||||
</div>
|
||||
|
||||
<div class="field password_confirmation">
|
||||
<%= f.label :password_confirmation, "Verify Password:" %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field terms_of_service">
|
||||
<small>
|
||||
<%= f.check_box :terms_of_service %>
|
||||
<span>I have read and agree to the JamKazam <%= link_to "terms of service", corp_terms_path, :rel => "external" %>
|
||||
.</span>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="field recaptcha">
|
||||
<% if Rails.application.config.recaptcha_enable %>
|
||||
<div id="recaptcha_select" name="recaptcha_response_field" class="g-recaptcha" data-sitekey="<%=Rails.application.config.recaptcha_public_key%>" data-callback="recaptcha_success" data-expired-callback="recaptcha_expired">
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-side">
|
||||
<h2 class="subscription-type-header"><div class="badge-number">2</div>Select your subscription plan</h2>
|
||||
|
||||
<div class="subscription-options">
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, '', :checked => true %>
|
||||
<label for="male">Free Plan ($0.00/month)</label>
|
||||
</div>
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, 'jamsubsilver'%>
|
||||
<label for="male">Silver Plan ($4.99/month)</label>
|
||||
</div>
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, 'jamsubgold' %>
|
||||
<label for="male">Gold Plan ($9.99/month)</label>
|
||||
</div>
|
||||
<div class="radio-field">
|
||||
<%= f.radio_button :desired_plan_code, 'jamsubplatinum'%>
|
||||
<label for="male">Platinum Plan ($19.99/month)</label>
|
||||
</div>
|
||||
|
||||
<div class="comparison-block">
|
||||
<a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122535-what-are-jamkazam-s-free-vs-premium-features-" target="_blank">compare plans</a>
|
||||
<div class="pricing-info">New users have access to the Gold plan free for the first 30 days. The plan you select will take effect after the first 30-day trial period. Taxes apply to all non-free plans.</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "CREATE ACCOUNT", class: "button-orange disabled", id:"create-account-submit"%>
|
||||
<%= link_to "CANCEL", root_path, :class=>'button-grey' %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- end inner -->
|
||||
|
||||
<!-- end overlay content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
window.signup.handle_location_changes()
|
||||
|
||||
window.signup.handle_register_as_changes()
|
||||
|
||||
function recaptcha_success(response) {
|
||||
$("#create-account-submit").removeClass("disabled")
|
||||
}
|
||||
|
||||
function recaptcha_expired(response) {
|
||||
$("#create-account-submit").addClass("disabled")
|
||||
}
|
||||
|
||||
function get_first_error(field) {
|
||||
if (errors[field] && errors[field].length > 0) {
|
||||
return errors[field][0]
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// populate musician instruments from previous submit, if applicable
|
||||
if (window.gon && gon.musician_instruments) {
|
||||
$(gon.musician_instruments).each(function (index, value) {
|
||||
$('#' + value.instrument_id.replace(" ", "") + "_checkbox").attr("checked", true);
|
||||
$('#' + value.instrument_id.replace(" ", "") + "_proficiency").val(value.proficiency_level.toString())
|
||||
})
|
||||
}
|
||||
if(window.gon) {
|
||||
var $radios = $('input:radio[name="jam_ruby_user[desired_plan_code]"]');
|
||||
if(gon.plan_code) {
|
||||
$radios.filter(gon.plan_code, true)
|
||||
}
|
||||
else {
|
||||
$radios.filter('[value="<%= @plan_code %>"]').prop('checked', true)
|
||||
}
|
||||
}
|
||||
|
||||
// show signup errors, if any
|
||||
if (window.gon && gon.signup_errors) {
|
||||
var errors =
|
||||
<%= @user.errors.to_json.html_safe %>
|
||||
|
||||
var email = get_first_error("email")
|
||||
var first_name = get_first_error("first_name")
|
||||
var last_name = get_first_error("last_name")
|
||||
var musician_instruments = get_first_error("musician_instruments")
|
||||
var password = get_first_error("password")
|
||||
var password_confirmation = get_first_error("password_confirmation")
|
||||
var terms_of_service = get_first_error("terms_of_service")
|
||||
var country = get_first_error("country")
|
||||
var state = get_first_error("state")
|
||||
var city = get_first_error("city")
|
||||
var recaptcha = get_first_error("recaptcha")
|
||||
|
||||
|
||||
if (email) {
|
||||
var emailInput = $('#jam_ruby_user_email');
|
||||
emailInput.closest('div.field').addClass('error')
|
||||
emailInput.after("<div class='error-text'>" + email + "</div>")
|
||||
}
|
||||
|
||||
if (first_name) {
|
||||
var firstNameInput = $('#jam_ruby_user_first_name');
|
||||
firstNameInput.closest('div.field').addClass('error')
|
||||
firstNameInput.after("<div class='error-text'>" + first_name + "</div>")
|
||||
}
|
||||
|
||||
if (last_name) {
|
||||
var lastNameInput = $('#jam_ruby_user_last_name');
|
||||
lastNameInput.closest('div.field').addClass('error')
|
||||
lastNameInput.after("<div class='error-text'>" + last_name + "</div>")
|
||||
}
|
||||
|
||||
if (country) {
|
||||
var countryInput = $('#country_select');
|
||||
countryInput.closest('div.field').addClass('error')
|
||||
countryInput.after("<div class='error-text'>" + country + "</div>")
|
||||
}
|
||||
|
||||
if (state) {
|
||||
var stateInput = $('#region_select');
|
||||
stateInput.closest('div.field').addClass('error')
|
||||
stateInput.after("<div class='error-text'>" + state + "</div>")
|
||||
}
|
||||
|
||||
if (city) {
|
||||
var cityInput = $('#city_select');
|
||||
cityInput.closest('div.field').addClass('error')
|
||||
cityInput.after("<div class='error-text'>" + city + "</div>")
|
||||
}
|
||||
|
||||
if (recaptcha) {
|
||||
var recaptchaInput = $('#recaptcha_select');
|
||||
recaptchaInput.closest('div.field').addClass('error')
|
||||
recaptchaInput.after("<div class='error-text'>" + recaptcha + "</div>")
|
||||
}
|
||||
|
||||
if (musician_instruments) {
|
||||
var musicianInstrumentsInput = $('#instrument_selector');
|
||||
musicianInstrumentsInput.closest('div.ftue-instrumentlist-wrapper').addClass('error')
|
||||
musicianInstrumentsInput.closest('div.ftue-instrumentlist').after("<div class='error-text'>" + musician_instruments + "</div>")
|
||||
}
|
||||
|
||||
if (password) {
|
||||
var passwordInput = $('#jam_ruby_user_password');
|
||||
passwordInput.closest('div.field').addClass('error')
|
||||
passwordInput.after("<div class='error-text'>" + password + "</div>")
|
||||
}
|
||||
|
||||
if (password_confirmation) {
|
||||
var passwordConfirmationInput = $('#jam_ruby_user_password_confirmation');
|
||||
passwordConfirmationInput.closest('div.field').addClass('error')
|
||||
passwordConfirmationInput.after("<div class='error-text'>" + password_confirmation + "</div>")
|
||||
}
|
||||
|
||||
if (terms_of_service) {
|
||||
var termsOfServiceInput = $('#jam_ruby_user_terms_of_service');
|
||||
termsOfServiceInput.closest('small').addClass('error')
|
||||
// termsOfServiceInput.closest('small').after("<div class='error-text'>" + terms_of_service + "</div>")
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -70,6 +70,10 @@ Rails.application.routes.draw do
|
|||
#get '/landing/jamclass/education', to: 'landings#jam_class_education', as: 'jam_class_education'
|
||||
#get '/landing/jamclass/retailers', to: 'landings#jam_class_retailers', as: 'jam_class_retailers'
|
||||
|
||||
get '/landing/general/signup', to: "users#new"
|
||||
post '/landing/general/signup', to: "users#create"
|
||||
get '/landing/general/downloads', to: "users#downloads"
|
||||
|
||||
get '/affiliateProgram', to: 'landings#affiliate_program', as: 'affiliate_program'
|
||||
|
||||
get '/affiliate/links/:id', to: 'affiliates#links', as: 'affilate_links'
|
||||
|
|
|
|||
|
|
@ -23,12 +23,11 @@ describe "Download", :js => true, :type => :feature, :capybara_feature => true
|
|||
end
|
||||
|
||||
|
||||
describe "downloads-page" do
|
||||
|
||||
shared_examples :dowload_client do
|
||||
# there is also a generic download pages
|
||||
before(:each) do
|
||||
sign_in_poltergeist user
|
||||
visit '/downloads'
|
||||
#sign_in_poltergeist user
|
||||
visit path
|
||||
|
||||
# put the user on Windows to start
|
||||
detected_os = find("a.current-os-download")['data-platform']
|
||||
|
|
@ -51,7 +50,45 @@ describe "Download", :js => true, :type => :feature, :capybara_feature => true
|
|||
find(".download-others a[data-platform='#{remaining_platform}']").click
|
||||
find("a.current-os-download")['data-platform'].should == remaining_platform
|
||||
end
|
||||
end
|
||||
|
||||
describe "goto downloads-page without signin" do
|
||||
|
||||
describe :default_downloads_page do
|
||||
it_behaves_like :dowload_client do
|
||||
let(:path){ "/downloads" }
|
||||
end
|
||||
it "renders web layout" do
|
||||
visit "/downloads"
|
||||
end
|
||||
end
|
||||
|
||||
describe :landing_downloads_page do
|
||||
it_behaves_like :dowload_client do
|
||||
let(:path){ "/landing/general/downloads" }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# describe "signin and goto downloads-page" do
|
||||
# before(:each) do
|
||||
# sign_in_poltergeist user
|
||||
# end
|
||||
|
||||
# describe :default_downloads_page do
|
||||
# it_behaves_like :dowload_client do
|
||||
# let(:path){ "/downloads" }
|
||||
# end
|
||||
# end
|
||||
|
||||
# describe :landing_downloads_page do
|
||||
# it_behaves_like :dowload_client do
|
||||
# let(:path){ "/landing/general/downloads" }
|
||||
# end
|
||||
# end
|
||||
|
||||
# end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,252 +19,440 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
|
|||
MaxMindManager.create_phony_database
|
||||
end
|
||||
|
||||
describe "with origin", focus: true do
|
||||
|
||||
# Successful signup with no invitation tells you to go sign up
|
||||
it {
|
||||
visit "/signup?utm_source=abc&utm_medium=ads&utm_campaign=campaign1"
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "withorigin1@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
should have_title("JamKazam | Congratulations")
|
||||
should have_content("Your account is ready.")
|
||||
user = User.find_by_email('withorigin1@jamkazam.com')
|
||||
user.musician_instruments.length.should == 1
|
||||
location = GeoIpLocations.lookup('127.0.0.1')
|
||||
user.country.should == location[:country]
|
||||
user.state.should == location[:state]
|
||||
user.city.should == location[:city]
|
||||
# an email is sent on no-invite signup
|
||||
user.origin_utm_source.should eql 'abc'
|
||||
user.origin_utm_campaign.should eql 'campaign1'
|
||||
user.origin_utm_medium.should eql 'ads'
|
||||
user.origin_referrer.should be_nil
|
||||
}
|
||||
end
|
||||
|
||||
describe "signup page" do
|
||||
before { visit signup_path }
|
||||
|
||||
it "should initialize successfully" do
|
||||
should have_selector('div.main', text: 'JamKazam has spent the last 6 years building the best platform in the world to let musicians play together live and in sync over the Internet.')
|
||||
end
|
||||
|
||||
describe "with valid musician information" do
|
||||
before do
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser1@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
shared_examples_for :signup_with_origin do
|
||||
|
||||
describe "with origin" do
|
||||
|
||||
before(:each) do
|
||||
User.delete_all
|
||||
end
|
||||
|
||||
# Successful signup with no invitation tells you to go sign up
|
||||
it {
|
||||
should have_title("JamKazam | Congratulations")
|
||||
should have_content("Your account is ready.")
|
||||
user = User.find_by_email('newuser1@jamkazam.com')
|
||||
user.musician?.should == true
|
||||
user.musician_instruments.length.should == 1
|
||||
location = GeoIpLocations.lookup('127.0.0.1')
|
||||
user.country.should == location[:country]
|
||||
user.state.should == location[:state]
|
||||
user.city.should == location[:city]
|
||||
# an email is sent on no-invite signup
|
||||
UserMailer.deliveries.length.should == 2
|
||||
UserMailer.deliveries[0].html_part.body.include?("To confirm this email address")== 1
|
||||
}
|
||||
|
||||
describe "user can confirm email and receive welcome email" do
|
||||
|
||||
before(:each) do
|
||||
UserMailer.deliveries.clear
|
||||
visit signup_confirm_path(User.find_by_email('newuser1@jamkazam.com').signup_token)
|
||||
end
|
||||
|
||||
it {
|
||||
should have_title("Signup Confirmation")
|
||||
should have_selector('h1', text: "Email Confirmed")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
describe "with service invite" do
|
||||
before do
|
||||
@invited_user = FactoryGirl.create(:invited_user, :email => "noone@jamkazam.com", :sender => FactoryGirl.create(:user))
|
||||
visit "#{signup_path}?invitation_code=#{@invited_user.invitation_code}"
|
||||
find('#jam_ruby_user_first_name')
|
||||
sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
UserMailer.deliveries.clear
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser2@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
end
|
||||
|
||||
# Successful sign-in goes to the client
|
||||
it {
|
||||
should have_title("JamKazam")
|
||||
should have_selector('.flash-content', text: "Soon you can play with #{@invited_user.sender.name}")
|
||||
UserMailer.deliveries.length.should == 2
|
||||
uri = URI.parse(current_url)
|
||||
"#{uri.path}?#{uri.query}".should == congratulations_musician_path(:friend => @invited_user.sender.name)
|
||||
}
|
||||
end
|
||||
|
||||
describe "with user invite and autofriend" do
|
||||
before do
|
||||
@user = FactoryGirl.create(:user)
|
||||
@invited_user = FactoryGirl.create(:invited_user, :sender => @user, :autofriend => true, :email => "noone@jamkazam.com")
|
||||
visit "#{signup_path}?invitation_code=#{@invited_user.invitation_code}"
|
||||
find('#jam_ruby_user_first_name')
|
||||
sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
#visit "/signup?utm_source=abc&utm_medium=ads&utm_campaign=campaign1"
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser3@jamkazam.com"
|
||||
fill_in "jam_ruby_user[email]", with: "withorigin1@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
end
|
||||
|
||||
# Successful sign-in goes to the client
|
||||
it {
|
||||
should have_title("JamKazam")
|
||||
should have_selector('.flash-content', text: "Soon you can play with #{@invited_user.sender.name}")
|
||||
@user.friends?(User.find_by_email("newuser3@jamkazam.com"))
|
||||
User.find_by_email("newuser3@jamkazam.com").friends?(@user)
|
||||
uri = URI.parse(current_url)
|
||||
"#{uri.path}?#{uri.query}".should == congratulations_musician_path(:friend => @invited_user.sender.name)
|
||||
#click_button "CREATE ACCOUNT"
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
should have_title("JamKazam | Congratulations")
|
||||
should have_content("Your account is ready.")
|
||||
user = User.find_by_email('withorigin1@jamkazam.com')
|
||||
user.musician_instruments.length.should == 1
|
||||
location = GeoIpLocations.lookup('127.0.0.1')
|
||||
user.country.should == location[:country]
|
||||
user.state.should == location[:state]
|
||||
user.city.should == location[:city]
|
||||
# an email is sent on no-invite signup
|
||||
user.origin_utm_source.should eql 'abc'
|
||||
user.origin_utm_campaign.should eql 'campaign1'
|
||||
user.origin_utm_medium.should eql 'ads'
|
||||
user.origin_referrer.should be_nil
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples :page_load_success do
|
||||
it "should initialize successfully" do
|
||||
expect(page).to have_title "JamKazam | Register"
|
||||
end
|
||||
end
|
||||
|
||||
def signup_invited_user
|
||||
visit "#{signup_path}?invitation_code=#{@invited_user.invitation_code}"
|
||||
shared_examples :default_signup_page do
|
||||
it "has default signup page content" do
|
||||
should have_content(/Live music platform/)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples :landing_signup_page do
|
||||
it "has landing signup page content" do
|
||||
should have_content(/JamKazam has spent the last 6 years/)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples :submit_signup_form do
|
||||
|
||||
before do
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser1@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
end
|
||||
|
||||
# Successful signup with no invitation tells you to go sign up
|
||||
it {
|
||||
should have_title("JamKazam | Congratulations")
|
||||
should have_content("Your account is ready.")
|
||||
user = User.find_by_email('newuser1@jamkazam.com')
|
||||
user.musician?.should == true
|
||||
user.musician_instruments.length.should == 1
|
||||
location = GeoIpLocations.lookup('127.0.0.1')
|
||||
user.country.should == location[:country]
|
||||
user.state.should == location[:state]
|
||||
user.city.should == location[:city]
|
||||
# an email is sent on no-invite signup
|
||||
UserMailer.deliveries.length.should == 2
|
||||
UserMailer.deliveries[0].html_part.body.include?("To confirm this email address")== 1
|
||||
}
|
||||
|
||||
describe "user can confirm email and receive welcome email" do
|
||||
|
||||
before(:each) do
|
||||
UserMailer.deliveries.clear
|
||||
visit signup_confirm_path(User.find_by_email('newuser1@jamkazam.com').signup_token)
|
||||
end
|
||||
|
||||
it {
|
||||
should have_title("Signup Confirmation")
|
||||
should have_selector('h1', text: "Email Confirmed")
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
shared_examples :submit_signup_form_with_errors do
|
||||
|
||||
before do
|
||||
#submit without filling the form
|
||||
find("#create-account-submit").click
|
||||
end
|
||||
|
||||
# Successful signup with no invitation tells you to go sign up
|
||||
it {
|
||||
should_not have_title("JamKazam | Congratulations")
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
shared_examples :with_user_invite do
|
||||
|
||||
let(:invited_user) { FactoryGirl.create(:invited_user, :email => "noone@jamkazam.com", :sender => FactoryGirl.create(:user)) }
|
||||
before do
|
||||
visit "#{path}?invitation_code=#{invited_user.invitation_code}"
|
||||
find('#jam_ruby_user_first_name')
|
||||
sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
UserMailer.deliveries.clear
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser2@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
end
|
||||
|
||||
# Successful sign-in goes to the client
|
||||
it {
|
||||
should have_title("JamKazam")
|
||||
should have_selector('.flash-content', text: "Soon you can play with #{invited_user.sender.name}")
|
||||
UserMailer.deliveries.length.should == 2
|
||||
uri = URI.parse(current_url)
|
||||
"#{uri.path}?#{uri.query}".should == congratulations_musician_path(:friend => invited_user.sender.name)
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
shared_examples :with_user_invite_and_autofriend do
|
||||
|
||||
before(:each) do
|
||||
User.destroy_all
|
||||
InvitedUser.destroy_all
|
||||
@user = FactoryGirl.create(:user)
|
||||
@invited_user = FactoryGirl.create(:invited_user, :sender => @user, :autofriend => true, :email => "noone@jamkazam.com")
|
||||
|
||||
|
||||
visit "#{path}?invitation_code=#{@invited_user.invitation_code}"
|
||||
find('#jam_ruby_user_first_name')
|
||||
sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
@invited_user_email = "newuser#{rand(10000)}@jamkazam.com"
|
||||
fill_in "jam_ruby_user[email]", with: @invited_user_email
|
||||
fill_in "jam_ruby_user[email]", with: "newuser3@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
end
|
||||
|
||||
describe "can signup with an email different than the one used to invite" do
|
||||
before do
|
||||
@invited_user = FactoryGirl.create(:invited_user, :email => "what@jamkazam.com", :sender => FactoryGirl.create(:user))
|
||||
visit "#{signup_path}?invitation_code=#{@invited_user.invitation_code}"
|
||||
find('#jam_ruby_user_first_name')
|
||||
sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
UserMailer.deliveries.clear
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser5@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
end
|
||||
|
||||
it {
|
||||
should have_title("JamKazam | Congratulations")
|
||||
should have_selector('.flash-content', text: "Soon you can play with #{@invited_user.sender.name}")
|
||||
User.find_by_email('newuser5@jamkazam.com').musician_instruments.length.should == 1
|
||||
User.find_by_email('what@jamkazam.com').should be_nil
|
||||
# an email is sent when you invite but use a different email than the one used to invite
|
||||
UserMailer.deliveries.length.should == 2
|
||||
uri = URI.parse(current_url)
|
||||
"#{uri.path}?#{uri.query}".should == congratulations_musician_path(:friend => @invited_user.sender.name)
|
||||
sign_out
|
||||
}
|
||||
end
|
||||
|
||||
describe "signup_hints" do
|
||||
it "redirects to custom location on matched signup_hint" do
|
||||
|
||||
# causes anon cookie to show
|
||||
visit '/'
|
||||
find('h2', text: 'Play music live and in sync with others from different locations')
|
||||
|
||||
# get a anonymous cookie set up
|
||||
anon_user_id = get_me_the_cookie("user_uuid")
|
||||
puts "#ANON_USER_ID #{anon_user_id.inspect}"
|
||||
anon_user = AnonymousUser.new(anon_user_id[:value], {})
|
||||
SignupHint.refresh_by_anoymous_user(anon_user, {redirect_location: '/affiliateProgram'})
|
||||
|
||||
visit signup_path
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "signup_hint_guy@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
|
||||
find('h1', text:'JamKazam Affiliate Program')
|
||||
|
||||
user = User.find_by_email('signup_hint_guy@jamkazam.com')
|
||||
user.should_not be_nil
|
||||
end
|
||||
|
||||
it "ignores expired_at signup_hint" do
|
||||
|
||||
# causes anon cookie to show
|
||||
visit '/'
|
||||
find('h2', text: 'Play music live and in sync with others from different locations')
|
||||
|
||||
# get a anonymous cookie set up
|
||||
anon_user_id = get_me_the_cookie("user_uuid")
|
||||
anon_user = AnonymousUser.new(anon_user_id[:value], {})
|
||||
hint = SignupHint.refresh_by_anoymous_user(anon_user, {redirect_location: '/products/jamblaster', want_jamblaster: true})
|
||||
hint.expires_at = 1.day.ago
|
||||
hint.save!
|
||||
|
||||
visit signup_path
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "signup_hint_guy2@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
click_button "Sign Up for JamKazam"
|
||||
|
||||
should have_title("JamKazam | Congratulations")
|
||||
|
||||
user = User.find_by_email('signup_hint_guy2@jamkazam.com')
|
||||
user.want_jamblaster.should be false
|
||||
end
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
end
|
||||
|
||||
# Successful sign-in goes to the client
|
||||
it {
|
||||
should have_title("JamKazam")
|
||||
should have_selector('.flash-content', text: "Soon you can play with #{@invited_user.sender.name}")
|
||||
@user.friends?(User.find_by_email("newuser3@jamkazam.com"))
|
||||
User.find_by_email("newuser3@jamkazam.com").friends?(@user)
|
||||
uri = URI.parse(current_url)
|
||||
"#{uri.path}?#{uri.query}".should == congratulations_musician_path(:friend => @invited_user.sender.name)
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples :with_different_email do
|
||||
let(:invited_user) { FactoryGirl.create(:invited_user, :email => "what@jamkazam.com", :sender => FactoryGirl.create(:user)) }
|
||||
before do
|
||||
|
||||
visit "#{path}?invitation_code=#{invited_user.invitation_code}"
|
||||
find('#jam_ruby_user_first_name')
|
||||
sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
UserMailer.deliveries.clear
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "newuser5@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
end
|
||||
|
||||
it {
|
||||
should have_title("JamKazam | Congratulations")
|
||||
should have_selector('.flash-content', text: "Soon you can play with #{invited_user.sender.name}")
|
||||
User.find_by_email('newuser5@jamkazam.com').musician_instruments.length.should == 1
|
||||
User.find_by_email('what@jamkazam.com').should be_nil
|
||||
# an email is sent when you invite but use a different email than the one used to invite
|
||||
UserMailer.deliveries.length.should == 2
|
||||
uri = URI.parse(current_url)
|
||||
"#{uri.path}?#{uri.query}".should == congratulations_musician_path(:friend => invited_user.sender.name)
|
||||
sign_out
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples :signup_hints do
|
||||
it "redirects to custom location on matched signup_hint" do
|
||||
# causes anon cookie to show
|
||||
visit '/'
|
||||
find('h2', text: 'Play music live and in sync with others from different locations')
|
||||
|
||||
# get a anonymous cookie set up
|
||||
anon_user_id = get_me_the_cookie("user_uuid")
|
||||
puts "#ANON_USER_ID #{anon_user_id.inspect}"
|
||||
anon_user = AnonymousUser.new(anon_user_id[:value], {})
|
||||
SignupHint.refresh_by_anoymous_user(anon_user, {redirect_location: '/affiliateProgram'})
|
||||
|
||||
visit path
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "signup_hint_guy@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
|
||||
find('h1', text:'JamKazam Affiliate Program')
|
||||
|
||||
user = User.find_by_email('signup_hint_guy@jamkazam.com')
|
||||
user.should_not be_nil
|
||||
end
|
||||
|
||||
it "ignores expired_at signup_hint" do
|
||||
|
||||
# causes anon cookie to show
|
||||
visit '/'
|
||||
find('h2', text: 'Play music live and in sync with others from different locations')
|
||||
|
||||
# get a anonymous cookie set up
|
||||
anon_user_id = get_me_the_cookie("user_uuid")
|
||||
anon_user = AnonymousUser.new(anon_user_id[:value], {})
|
||||
hint = SignupHint.refresh_by_anoymous_user(anon_user, {redirect_location: '/products/jamblaster', want_jamblaster: true})
|
||||
hint.expires_at = 1.day.ago
|
||||
hint.save!
|
||||
|
||||
visit path
|
||||
|
||||
fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
fill_in "jam_ruby_user[email]", with: "signup_hint_guy2@jamkazam.com"
|
||||
fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
check("jam_ruby_user[terms_of_service]")
|
||||
#click_button "Sign Up for JamKazam"
|
||||
find("#create-account-submit").click
|
||||
|
||||
should have_title("JamKazam | Congratulations")
|
||||
|
||||
user = User.find_by_email('signup_hint_guy2@jamkazam.com')
|
||||
user.want_jamblaster.should be false
|
||||
end
|
||||
end
|
||||
|
||||
describe "with origin" do
|
||||
describe :default_signup do
|
||||
before do
|
||||
visit "/signup?utm_source=abc&utm_medium=ads&utm_campaign=campaign1"
|
||||
end
|
||||
it_behaves_like :signup_with_origin
|
||||
it_behaves_like :default_signup_page
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
before do
|
||||
visit "/landing/general/signup?utm_source=abc&utm_medium=ads&utm_campaign=campaign1"
|
||||
end
|
||||
it_behaves_like :signup_with_origin
|
||||
it_behaves_like :landing_signup_page
|
||||
end
|
||||
end
|
||||
|
||||
describe "signup form" do
|
||||
before(:each) do
|
||||
User.destroy_all
|
||||
end
|
||||
|
||||
describe :default_signup do
|
||||
before do
|
||||
visit signup_path
|
||||
end
|
||||
it_behaves_like :page_load_success
|
||||
it_behaves_like :submit_signup_form
|
||||
it_behaves_like :default_signup_page
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
before do
|
||||
visit "/landing/general/signup"
|
||||
end
|
||||
it_behaves_like :page_load_success
|
||||
it_behaves_like :submit_signup_form
|
||||
it_behaves_like :landing_signup_page
|
||||
end
|
||||
end
|
||||
|
||||
describe "signup form with errors" do
|
||||
before(:each) do
|
||||
User.destroy_all
|
||||
end
|
||||
|
||||
describe :default_signup do
|
||||
before do
|
||||
visit signup_path
|
||||
end
|
||||
it_behaves_like :page_load_success
|
||||
it_behaves_like :submit_signup_form_with_errors
|
||||
it_behaves_like :default_signup_page
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
before do
|
||||
visit "/landing/general/signup"
|
||||
end
|
||||
it_behaves_like :page_load_success
|
||||
it_behaves_like :submit_signup_form_with_errors
|
||||
it_behaves_like :landing_signup_page
|
||||
end
|
||||
end
|
||||
|
||||
describe "with user invite" do
|
||||
|
||||
before(:each) do
|
||||
User.destroy_all
|
||||
end
|
||||
|
||||
describe :default_signup do
|
||||
it_behaves_like :with_user_invite do
|
||||
let(:path){ "/signup" }
|
||||
end
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
it_behaves_like :with_user_invite do
|
||||
let(:path){ "/landing/general/signup" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "with user invite and autofriend" do
|
||||
|
||||
describe :default_signup do
|
||||
it_behaves_like :with_user_invite_and_autofriend do
|
||||
let(:path){ "/signup" }
|
||||
end
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
it_behaves_like :with_user_invite_and_autofriend do
|
||||
let(:path){ "/landing/general/signup" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "can signup with an email different than the one used to invite" do
|
||||
before(:each) do
|
||||
User.destroy_all
|
||||
end
|
||||
|
||||
describe :default_signup do
|
||||
it_behaves_like :with_different_email do
|
||||
let(:path){ "/signup" }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
it_behaves_like :with_different_email do
|
||||
let(:path){ "/landing/general/signup" }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
describe "signup_hints" do
|
||||
before(:each) do
|
||||
User.destroy_all
|
||||
end
|
||||
|
||||
describe :default_signup do
|
||||
it_behaves_like :signup_hints do
|
||||
let(:path){ "/signup" }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe :landing_signup do
|
||||
it_behaves_like :signup_hints do
|
||||
let(:path){ "/landing/general/signup" }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# def signup_invited_user
|
||||
# visit "#{signup_path}?invitation_code=#{@invited_user.invitation_code}"
|
||||
# find('#jam_ruby_user_first_name')
|
||||
# sleep 1 # if I don't do this, first_name and/or last name intermittently fail to fill out
|
||||
|
||||
# fill_in "jam_ruby_user[first_name]", with: "Mike"
|
||||
# fill_in "jam_ruby_user[last_name]", with: "Jones"
|
||||
# @invited_user_email = "newuser#{rand(10000)}@jamkazam.com"
|
||||
# fill_in "jam_ruby_user[email]", with: @invited_user_email
|
||||
# fill_in "jam_ruby_user[password]", with: "jam123"
|
||||
# fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
|
||||
|
||||
# check("jam_ruby_user[terms_of_service]")
|
||||
# #click_button "Sign Up for JamKazam"
|
||||
# find("#create-account-submit").click
|
||||
# end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue