change layout/template of signup and downloads

change to new layout for user signup and download pages.
This commit is contained in:
Nuwan 2021-03-13 11:40:47 +05:30
parent deadc2fd68
commit 9315a3f01a
23 changed files with 778 additions and 237 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
//= require ./jquery-3.5.1.min
//= require jquery_ujs
//= require ./bootstrap.min
//= require ./bootstrap.bundle.min
//= require AAC_underscore
//= require utils
//= require jam_rest
//= require jamkazam
//= require ga
//= require ../landing/signup
//= require ../web/downloads

File diff suppressed because one or more lines are too long

View File

@ -70,6 +70,8 @@
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));
@ -105,6 +107,7 @@
// update the 'download other platforms' buttons
$('body.web .downloads-container').empty().append(selectOthers);
// update system requirements
$('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();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
/**
*= require ./bootstrap.min
*= require ./landing
*/

View File

@ -0,0 +1,106 @@
@charset "UTF-8";
.page {
width: 100%;
}
.header {
height: auto;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Zilla Slab";
font-weight: 600;
}
body, div, p {
font-family: "Open Sans";
font-weight: 500;
font-size: 18px;
}
.main {
background-image: linear-gradient(180deg,#007582 0%,#22a39c 100%);
}
.container {
padding: 40px 15px;
}
label {
font-size: 12px;
}
input[type=text],input[type=email],input[type=password] {
border-radius: 5px;
width: 100%;
padding: 8px;
border: solid 1px #ccc;
}
button {
font-family: "Open Sans";
font-size: 20px;
font-weight: 600;
padding: 8px 20px;
border-radius: 5px;
color: #ffffff;
background-color: #F05423;
transition: 0.3s;
border: none;
}
button:hover {
background-color: #007582;
}
a {
color: #F05423;
}
.text-white a {
color: white;
}
a:hover {
color: #007582;
}
.jk-overlay {
position: absolute;
display: none;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: rgba(0,0,0,0.50);
padding-top: 40px;
}
.jk-modal {
width: 90%;
padding: 40px;
max-width: 750px;
border-radius: 10px;
background: rgba(255,255,255,1);
position: relative;
margin: 0 auto;
z-index: 100;
}
.field_with_errors input{
border-color: #dc3545;
display: table;
}
.field_with_errors .error-text{
color: #dc3545;
font-size: small;
}
.hidden{
display: none;
}
div.register-as {
margin-left:45px;
display:none;
}
.windows-requirements, .mac-requirements, .linux-requirements{
font-size: 16px;
list-style-type: disc;
}

View File

@ -114,7 +114,8 @@ class UsersController < ApplicationController
@user.gender = @fb_signup.gender
end
render :layout => 'web'
#render :layout => 'web'
render :layout => 'jk2021'
end
def create
@ -200,7 +201,7 @@ class UsersController < ApplicationController
gon.signup_errors = true
gon.musician_instruments = instruments
gon.plan_code = desired_plan_code
render "new", :layout => 'web'
render "new", :layout => 'jk2021'
else
sign_in @user
@ -224,7 +225,7 @@ class UsersController < ApplicationController
def downloads
@no_user_dropdown = true
@page_context = 'standalone'
render :layout => "web"
render :layout => "jk2021"
end
# DO NOT USE CURRENT_USER IN THIS ROUTINE UNLESS REDIRECTING. IT'S CACHED FOR THE WHOLE SITE

View File

@ -4,4 +4,24 @@ module ErrorsHelper
{"errors" => {field => [error_msg]}}
end
def errors_for(object)
if object.errors.any?
content_tag(:div, class: 'card text-white bg-danger mb-3') do
concat(content_tag(:div, class: 'card-header') do
concat(content_tag(:h4) do
concat "The form contains #{pluralize(object.errors.count, 'error')}:"
end)
end)
concat(content_tag(:div, class: 'card-body') do
concat(content_tag(:ul) do
object.errors.full_messages.each do |msg|
concat content_tag(:li, msg)
end
end)
end)
end
end
end
end

View File

@ -0,0 +1,57 @@
- provide(:page_name, 'landing_page full landing_product affiliate_program')
- provide(:description, 'Signup for JamKazam Affiliate Program')
.row
.column
h1.product-headline JamKazam Affiliate Program
p Do you have a following of musicians on Facebook, YouTube, Twitter or an email list? Generate income simply by letting them know about JamKazam.
p Let's say you make YouTube tutorial videos. You can link directly from a video on how to play "Back in Black" to our JamTrack for that song. Video watchers can get this first JamTrack free, and can buy others if they like. You get paid every time they buy something from us for 2 years.
p Or let's say you have a Facebook group for guitarist with 5,000 members. You can let them know they can play together free on JamKazam. For everyone who signs up, you get paid every time they buy something from us for 2 years.
p You don't have to sell anything. Just let your followers know about cool new stuff they'll like! To get started, simply review the affiliate agreement below, accept it (at the end of the agreement), and then start sharing links with your affiliate code. When referred users buy JamTracks, JamBlasters, JamLessons, and so on, you get paid!
.column
h1 Learn How to Make Money by Referring Users
- if !Rails.env.test?
.video-wrapper
.video-container
iframe src="//www.youtube.com/embed/96YTnO_H9a4" frameborder="0" allowfullscreen
br clear="all"
.row
h1 JamKazam Affiliate Agreement
= render "legal/partner_agreement_v1"
p.agreement-notice By clicking the "I Agree" button below, I certify that I have the authority to enter into this Agreement on behalf of myself as an individual or on behalf of the entity I have listed below, and I further certify that I have read, understood, and agree to be bound by the terms above.
.entity-options
.field.radio
= radio_button_tag(:entity, 'individual')
label I am entering into this Agreement as an individual
.field.radio
= radio_button_tag(:entity, 'entity')
label I am executing this Agreement on behalf of the company or entity listed below
.entity-info.hidden
.field.entity.name
label Entity Name
input type="text" name="entity-name"
.field.entity.type
label Entity Type
select name="entity-type"
option value="" Choose Entity Type
option value="Sole Proprietor" Sole Proprietor
option value="Limited Liability Company (LLC)" Limited Liability Company (LLC)
option value="Partnership" Partnership
option value="Trust/Estate" Trust/Estate
option value="S Corporation" S Corporation
option value="C Corporation" C Corporation
option value="Other" Other
.agree-disagree-buttons
= link_to image_tag("content/agree_button.png", {:width => 213, :height => 50 }), '#', class: "agree-button"
= link_to image_tag("content/disagree_button.png", {:width => 213, :height => 50 }), '#', class: "disagree-button"
p.disagree-text.hidden
| Thank you for your interest in the JamKazam affiliate program. We are sorry, but you cannot join the program without consenting to the terms of this Agreement.
javascript:
$(document).on('JAMKAZAM_READY', function(e, data) {
var affiliateProgram = new JK.AffiliateProgram(data.app);
affiliateProgram.initialize();
})

View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title><%= full_title(yield(:title)) %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Zilla+Slab:300,300italic,regular,italic,500,500italic,600,600italic,700,700italic|Open+Sans:300,300italic,regular,italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext&display=swap" type="text/css" media="all">
<%= stylesheet_link_tag "jk2021/jk2021", media: "all" %>
<%= include_gon(:init => true) %>
<%= csrf_meta_tags %>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="description" content="<%= meta_description(yield(:description)) %>">
<% if content_for?(:social_meta) %>
<%= yield(:social_meta) %>
<% else %>
<%= render "layouts/social_meta" %>
<% end %>
<%= render "shared/ad_sense" %>
</head>
<body class="web jam <%= yield(:page_name) %>>
<div class="page">
<header id="main-header" class="header container">
<div class="row">
<div class="col-md-4 col-sm-12">
<a href="/">
<%= image_tag 'JK_Logo_2c.png', alt: "JamKazam", id: "logo", style: "width:100%" %>
</a>
</div>
</div>
</header>
<% if content_for?(:hero_title) %>
<div class="main container-fluid">
<div class="container text-white">
<div class="row">
<div class="col-12">
<h3><%= yield :hero_title %> </h3>
</div>
</div>
</div>
</div>
<% end %>
<div class="container">
<%= yield %>
</div>
</div>
<footer class="bg-dark text-white">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-12">
&copy; 2021 JamKazam, Inc. All rights reserved.
</div>
<div class="col-md-6 col-sm-12 text-right">
<a href="https://jamkazam.com">jamkazam.com</a>
</div>
</div>
</div>
</footer>
<%= javascript_include_tag "jk2021/jk2021" %>
<% if content_for?(:scripts) %>
<%= yield :scripts %>
<% end %>
<%= render "shared/ga" %>
</body>
</html>

View File

@ -1,48 +1,44 @@
script type="text/template" id="client-download-blurb-contents"
.downloads
.downloads.text-center
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
.download-box.text-center
.download-others
| Need a different version?
br
a.choose-other-platform href="#" data-order="1" data-platform="{{data.platform1}}"
| Need a different version?
br
| Click here for to get JamKazam
br
| for {{data.platformDisplay1}} ' ''
| 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
| {% } %}

View File

@ -1,64 +1,19 @@
// used by congrats_musician, and downloads
- provide(:page_name, "downloads #{@page_context}")
- provide(:hero_title, 'Signup successful! Now download the JamKazam application.')
.w100.download-container
.download-app
.spinner-large
.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
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
| &nbsp; ($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
| &nbsp;for your first JamTrack - free! Add it to your shopping cart, and we'll
| &nbsp;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"
= render "users/download_templates"

View File

@ -0,0 +1,64 @@
// 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
| &nbsp; ($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
| &nbsp;for your first JamTrack - free! Add it to your shopping cart, and we'll
| &nbsp;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"

View File

@ -3,6 +3,8 @@
<%= render "users/downloads" %>
<script type="text/javascript">
$(function() { window.JK.Downloads.listClients(false) } );
</script>
<%= content_for :scripts do %>
<script type="text/javascript">
$(function() { window.JK.Downloads.listClients(false) } );
</script>
<% end %>

View File

@ -1,129 +1,108 @@
<% 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 &amp; play with new friends</li>
<li>Co-write music live &amp; interactively vs. trading files</li>
<li>Record session performances</li>
<li>Live broadcast session performances thru YouTube &amp; Facebook</li>
<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>
</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="register-container">
<div class="register-as">
Register as a:
<%= f.radio_button :musician, true, :class => "register-as register-musician" %>
Musician
<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, well 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 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>
<%= 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 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>
<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>
<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>
<!-- 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").removeClass("disabled")
$("#create-account-submit").prop("disabled", false)
}
function recaptcha_expired(response) {
$("#create-account-submit").addClass("disabled")
//$("#create-account-submit").addClass("disabled")
$("#create-account-submit").prop("disabled", true)
}
function get_first_error(field) {
@ -136,21 +115,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) {
@ -233,9 +212,9 @@
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>")
termsOfServiceInput.after("<div class='error-text'>" + terms_of_service + "</div>")
}
}
</script>
</script>
<% end %>

View File

@ -0,0 +1,8 @@
<% 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>

View File

@ -0,0 +1,241 @@
<% 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>

View File

@ -94,6 +94,7 @@ if defined?(Bundler)
config.assets.precompile += %w( basic/basic.js basic/basic.css )
config.assets.precompile += %w( events/events.js events/events.scss )
config.assets.precompile += %w( support/support.js support/support.scss )
config.assets.precompile += %w( jk2021/jk2021.js jk2021/jk2021.css )
# where is rabbitmq?
config.rabbitmq_host = "127.0.0.1"

View File

@ -7,9 +7,9 @@ describe "Download", :js => true, :type => :feature, :capybara_feature => true
subject { page }
before(:all) do
Capybara.javascript_driver = :poltergeist
Capybara.current_driver = Capybara.javascript_driver
Capybara.default_max_wait_time = 10
#Capybara.javascript_driver = :poltergeist
#Capybara.current_driver = Capybara.javascript_driver
#Capybara.default_max_wait_time = 10
end
let(:user) { FactoryGirl.create(:user) }
@ -42,11 +42,13 @@ describe "Download", :js => true, :type => :feature, :capybara_feature => true
remaining_platform = platforms[0]
other_download.trigger(:click)
#other_download.trigger(:click)
other_download.click
find("a.current-os-download")['data-platform'].should == other_download_platform
find(".download-others a[data-platform='#{remaining_platform}']").trigger(:click)
#find(".download-others a[data-platform='#{remaining_platform}']").trigger(:click)
find(".download-others a[data-platform='#{remaining_platform}']").click
find("a.current-os-download")['data-platform'].should == remaining_platform
end

View File

@ -19,7 +19,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
MaxMindManager.create_phony_database
end
describe "with origin" do
describe "with origin", focus: true do
# Successful signup with no invitation tells you to go sign up
it {
@ -31,7 +31,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
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')
@ -47,11 +47,12 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
user.origin_referrer.should be_nil
}
end
describe "signup page" do
before { visit signup_path }
it "should initialize successfully" do
should have_selector('h2.create-account-header', text: '1Create your free JamKazam account')
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
@ -63,7 +64,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
end
# Successful signup with no invitation tells you to go sign up
@ -111,7 +112,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
end
# Successful sign-in goes to the client
@ -139,7 +140,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
end
# Successful sign-in goes to the client
@ -167,7 +168,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
end
describe "can signup with an email different than the one used to invite" do
@ -186,7 +187,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
end
it {
@ -224,7 +225,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
find('h1', text:'JamKazam Affiliate Program')
@ -254,7 +255,7 @@ describe "Signup", :js => true, :type => :feature, :capybara_feature => true do
fill_in "jam_ruby_user[password_confirmation]", with: "jam123"
check("jam_ruby_user[terms_of_service]")
click_button "CREATE ACCOUNT"
click_button "Sign Up for JamKazam"
should have_title("JamKazam | Congratulations")