Skip to content

Instantly share code, notes, and snippets.

View lscoates's full-sized avatar

Luke Scoates lscoates

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lscoates on github.
  • I am lscoates (https://keybase.io/lscoates) on keybase.
  • I have a public key ASD_L5IGoMjnx-Rdxj54CykSYHJw7WF9X4obSiEhtgaVNgo

To claim this, I am signing this object:

$(function() {
var updatingCheckboxes = false,
$components = $('.component-checkbox');
$components.change(function(e) {
if (updatingCheckboxes) { return; }
var $el = $(this),
checked = $el.is(':checked');
/* Plan Summary */
#mobile_summary {}
#summary {}
#summary-setup-fee {}
#summary-recurring-charges {}
#todays-charge {}
/* Plan Configuration */
#components_XXX_allocated_quantity { /* On/Off Components */ }
#component_allocated_quantity_XXX { /* Metered & Quantity-Based Components */ }
/*
Name: PSP CSS Cheatsheet
Author: Bob Orchard
*/
/* Body Classes */
.public-signup-page {} /* Both Signup and Success Pages */
.public-signup-page__signup {}
.public-signup-page__success {}
// Replace the values in `fieldLabel` and `field` with the field you want to add validations too.
// This example shows how you would require Organization.
$(document).ready(function() {
var fieldLabel = $('label[for="subscription_customer_attributes_organization"]');
fieldLabel.text(fieldLabel.text() + " *");
});
var field = $("#subscription_customer_attributes_organization");
var form = $("#signup-form");
// CONFIGURE YOUR PLAN
$('.form__section--configure-plan h3').html("CONFIGURE YOUR PLAN");
$('#form__section-apply-components').html("UPDATE TOTALS");
$('#form__section-apply-components').data("loading-text", "<i class='fa fa-refresh fa-spin fa-fw'></i> UPDATING...");
$('#form__section-apply-components').data("button-text", "UPDATE TOTALS");
// COUPON CODE
$('.form__section--coupon h3').html("COUPON CODE");
$('#coupon_button').html("APPLY CODE");
$('#coupon_button').data("loading-text", "<i class='fa fa-refresh fa-spin fa-fw'></i> APPLYING...");
// Just put what you want the setup fee text to be in the PLACE TEXT HERE placeholder
function changeSetupFee() {
var setupfee = $("#summary-setup-fee .plan__summary-table-row-label");
var text = setupfee.text().replace('Setup Fee', 'PLACE TEXT HERE');
setupfee.text(text);
};
$(document).bind("afterSummaryRefresh", changeSetupFee);
$(function() {
var submitBtn = $("#subscription_submit");
submitBtn.html('PLACE TEXT HERE');
});
function hideRecurringLineItem() {
$('#summary-recurring-charges').hide();
$('.plan__summary-component').hide();
};
$(document).bind("afterSummaryRefresh", hideRecurringLineItem);
$(document).ready(function() {
var phoneLabel = $('label[for="subscription_customer_attributes_phone"]');
phoneLabel.text(phoneLabel.text() + " *");
});
var form = $("form:first");
var phone = $("#subscription_customer_attributes_phone");
var submitBtn = $("#subscription_submit")
submitBtn.click(function(){