fix session rating and signup url

This commit is contained in:
Seth Call 2017-10-15 21:32:51 -05:00
parent 951a271089
commit cd7d28c819
4 changed files with 15 additions and 7 deletions

View File

@ -21,7 +21,7 @@ module JamRuby
def confirm_email(user, signup_confirm_url)
@user = user
@signup_confirm_url = signup_confirm_url
@signup_confirm_url = "#{APP_CONFIG.external_root_url}/confirm/#{user.signup_token}"
sendgrid_category "Confirm Email"
sendgrid_unique_args :type => "confirm_email"

View File

@ -14,7 +14,6 @@
$('#btn-rate-session-up', $scopeSelector).removeClass('selected');
$('#btn-rate-session-down', $scopeSelector).removeClass('selected');
$('#txt-rate-session-comment',"[layout-id='rate-session-dialog']").val('');
$('#btn-rate-session-send', $scopeSelector).attr("disabled","disabled");
}
function showDialog() {
@ -66,7 +65,6 @@
if ($('#btn-rate-session-down').hasClass('selected')) {
$('#btn-rate-session-down').removeClass('selected')
}
$('#btn-rate-session-send', $scopeSelector).removeAttr("disabled");
return false;
});
$('#btn-rate-session-down', $scopeSelector).click(function(evt) {
@ -78,7 +76,6 @@
if ($('#btn-rate-session-up').hasClass('selected')) {
$('#btn-rate-session-up').removeClass('selected')
}
$('#btn-rate-session-send', $scopeSelector).removeAttr("disabled");
return false;
});
$('#btn-rate-session-send', $scopeSelector).click(function(evt) {
@ -87,6 +84,10 @@
closeDialog();
return false;
}
if (0 == rr) {
context.JK.Banner.showNotice('Please select the thumbs up or thumbs down when leaving a rating.<br/><br/>Thank you!')
return false;
}
var url = "/api/participant_histories/"+clientId+"/rating";
$.ajax({
type: "POST",

View File

@ -597,7 +597,9 @@ class LandingsController < ApplicationController
gift_card: @code,
terms_of_service: terms_of_service,
under_13: under_13,
skip_recaptcha: true)
skip_recaptcha: true,
musician: true,
instruments: [{:instrument_id => 'other', :proficiency_level => 1, :priority => 1}])
if @user.errors.any?
first = @user.errors.first
@error = "#{first[0].to_s.humanize} #{first[1]}"

View File

@ -36,8 +36,13 @@
javascript:
$('a.amazon-a-button-text').on('click', function(e) {
$('form.code-form').submit()
var submitted = false
$('a.amazon-a-button-text').on('click', function (e) {
if (!submitted) {
submitted = true
$('form.code-form').submit()
}
})