VRFS-4145 - remove extra dollar sign

This commit is contained in:
Seth Call 2016-05-27 13:35:33 -05:00
parent 0a9078f94e
commit b4bf6319fd
11 changed files with 100 additions and 15 deletions

View File

@ -0,0 +1,23 @@
module JamRuby
# UserMailer must be configured to work
# Some common configs occur in jam_ruby/init.rb
# Environment specific configs occur in spec_helper.rb in jam-ruby and jam-web (to put it into test mode),
# and in config/initializers/email.rb in rails to configure sendmail account settings
# If UserMailer were to be used in another project, it would need to be configured there, as well.
# Templates for UserMailer can be found in jam_ruby/app/views/jam_ruby/user_mailer
class UserMailer < ActionMailer::Base
include SendGrid
layout "auto_mailer"
DEFAULT_SENDER = "JamKazam <support@jamkazam.com>"
default :from => DEFAULT_SENDER
sendgrid_category :use_subject_lines
#sendgrid_enable :opentrack, :clicktrack # this makes our emails creepy, imo (seth)
sendgrid_unique_args :env => Environment.mode
end
end

View File

@ -8,7 +8,7 @@
<% if @school %>
<h3>We hope you enjoyed your TestDrive lesson today with <%= @distribution.student.name %>.</h3>
<% else %>
<h3>You have earned $<%= @distribution.real_distribution_display %> for your TestDrive lesson with <%= @distribution.student.name %>.</h3>
<h3>You have earned <%= @distribution.real_distribution_display %> for your TestDrive lesson with <%= @distribution.student.name %>.</h3>
<% end %>
<p>
<% if !@teacher_payment.teacher.has_rated_student(@distribution.student) %>
@ -20,7 +20,7 @@
<% if @school %>
<h3>we hope you enjoyed your lesson today with <%= @distribution.student.name %>.</h3>
<% else %>
<h3>You have earned $<%= @distribution.real_distribution_display %> for your lesson with <%= @distribution.student.name %>.</h3>
<h3>You have earned <%= @distribution.real_distribution_display %> for your lesson with <%= @distribution.student.name %>.</h3>
<% end %>
<p>
<% if !@teacher_payment.teacher.has_rated_student(@distribution.student) %>
@ -32,7 +32,7 @@
<% if @school %>
<h3>we hope you enjoyed your <%= @distribution.month_name %> lessons with <%= @distribution.student.name %>.</h3>
<% else %>
<h3>You have earned $<%= @distribution.real_distribution_display %> for your <%= @distribution.month_name%> lessons with <%= @distribution.student.name %>.</h3>
<h3>You have earned <%= @distribution.real_distribution_display %> for your <%= @distribution.month_name%> lessons with <%= @distribution.student.name %>.</h3>
<% end %>
<p>
<% if !@teacher_payment.teacher.has_rated_student(@distribution.student) %>

View File

@ -6,7 +6,7 @@ Hello <%= @name %>,
<% if @school %>
We hope you enjoyed your TestDrive lesson today with <%= @distribution.student.name %>.
<% else %>
You have earned $<%= @distribution.amount %> for your TestDrive lesson with <%= @distribution.student.name %>.
You have earned <%= @distribution.real_distribution_display %> for your TestDrive lesson with <%= @distribution.student.name %>.
<% end %>
<% if !@teacher_payment.teacher.has_rated_student(@distribution.student) %>
If you haven't already done so, please rate your student now to help us monitor for any issues with students who may cause issues for our instructor community. <%= @distribution.student.student_ratings_url %>
@ -16,7 +16,7 @@ If you had technical problems during your lesson, or have questions, or would li
<% if @school %>
We hope you enjoyed your lesson today with <%= @distribution.student.name %>.
<% else %>
You have earned $<%= @distribution.amount %> for your lesson with <%= @distribution.student.name %>.
You have earned <%= @distribution.real_distribution_display %>for your lesson with <%= @distribution.student.name %>.
<% end %>
<% if !@teacher_payment.teacher.has_rated_student(@distribution.student) %>
If you haven't already done so, please rate your student now to help us monitor for any issues with students who may cause issues for our instructor community. <%= @distribution.student.student_ratings_url %>
@ -26,7 +26,7 @@ If you had technical problems during your lesson, or have questions, or would li
<% if @school %>
We hope you enjoyed your <%= @distribution.month_name%> lessons with <%= @distribution.student.name %>.
<% else %>
You have earned $<%= @distribution.amount %> for your <%= @distribution.month_name%> lessons with <%= @distribution.student.name %>.
You have earned <%= @distribution.real_distribution_display %>for your <%= @distribution.month_name%> lessons with <%= @distribution.student.name %>.
<% end %>
<% if !@teacher_payment.teacher.has_rated_student(@distribution.student) %>
If you haven't already done so, please rate your student now to help us monitor for any issues with students who may cause issues for our instructor community. <%= @distribution.student.student_ratings_url %>

View File

@ -0,0 +1,12 @@
module JamRuby
class AutoEmailer
belongs_to :user, class_name: "JamRuby::User"
def hourly_job
AutoEmailer.where('mailed = false').where("email_at < ", Time.now).each do |auto_emailer|
AutoMailer.public_send(auto_emailer.name.to_sym, auto_emailer)
end
end
end
end

View File

@ -5,6 +5,25 @@ logger = context.JK.logger
@CheckBoxList = React.createClass({
objects: []
componentDidMount: () ->
@root = $(@getDOMNode())
@wireICheck()
componentDidUpdate: () ->
@wireICheck()
wireICheck: () ->
checkBoxes = @root.find('input[type="checkbox"]')
if checkBoxes.length > 0
context.JK.checkbox(checkBoxes, true)
checkBoxes.on('ifChanged', (e) => @checkIfCanFire(e))
checkIfCanFire: (e) ->
if @iCheckIgnore
return
@onItemChanged()
onItemChanged: (e) ->
# e.preventDefault()
@ -25,7 +44,7 @@ logger = context.JK.logger
for object in this.props.sourceObjects
nm = "check_#{object.id}"
checked = @isChecked(object.id)
object_options.push `<div className='checkItem'><input type='checkbox' key={object.id} name={nm} data-object-id={object.id} onChange={this.onItemChanged} checked={checked}></input><label htmlFor={nm}>{object.description}</label></div>`
object_options.push `<div className='checkItem'><input type='checkbox' key={object.id} name={nm} data-object-id={object.id} checked={checked}></input><label htmlFor={nm}>{object.description}</label></div>`
`<div className="CheckBoxList react-component">
<div className="checkbox-scroller left">

View File

@ -127,7 +127,7 @@ context = window
render: () ->
submitClasses = classNames({'button-orange': true, disabled: @disabled()})
if false
if @isRatingTeacher()
title = 'Rate Teacher'
help = `<h2>Please rate this teacher based on your experience with them:</h2>`
descriptionPrompt = `<h2>Please help other students by explaining what you like or dont like about this teacher:</h2>`

View File

@ -3,6 +3,18 @@ logger = context.JK.logger
@TeacherStudentLevel = React.createClass({
mixens: [ICheckMixin]
componentDidMount: () ->
@checkboxes = [{selector: 'input.slot-decision', stateKey: 'slot-decision'}]
@root = $(@getDOMNode())
@iCheckify()
componentDidUpdate: () ->
@iCheckify()
render: () ->
`<span>

View File

@ -1194,12 +1194,21 @@
return false;
}
context.JK.checkbox = function ($checkbox) {
return $checkbox.iCheck({
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
inheritClass: true
});
context.JK.checkbox = function ($checkbox, dark) {
if (dark){
return $checkbox.iCheck({
checkboxClass: 'icheckbox_minimal dark',
radioClass: 'iradio_minimal dark',
inheritClass: true
});
}else {
return $checkbox.iCheck({
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
inheritClass: true
});
}
}
context.JK.dropdown = function ($select, options) {

View File

@ -611,7 +611,7 @@ hr {
text-align:center;
}
body.jam .icheckbox_minimal {
body.jam .icheckbox_minimal, .icheckbox_minimal_dark {
display:inline-block;
position:relative;
}

View File

@ -45,6 +45,13 @@
float: left;
font-size: 1em;
}
.icheckbox_minimal {
color: black;
display: inline;
float: left;
font-size: 1em;
margin-right:5px;
}
input {
width: auto;
text-align: left;

View File

@ -11,6 +11,9 @@
border: none;
cursor: pointer;
}
.icheckbox_minimal.dark {
background: url(/assets/icheck/jamkazam-dark.png) no-repeat;
}
.icheckbox_minimal {