Skip to content

Instantly share code, notes, and snippets.

@lscoates
Last active September 12, 2016 19:53
Show Gist options
  • Save lscoates/aa350cdbb39fbec20a920912f7207e87 to your computer and use it in GitHub Desktop.
Save lscoates/aa350cdbb39fbec20a920912f7207e87 to your computer and use it in GitHub Desktop.
// 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...");
$('#coupon_button').data("button-text", "APPLY CODE");
// VAT INFORMATION
$('.form__section--vat-information h3').html("VAT INFORMATION");
$('#vat_button').html("VALIDATE VAT");
$('#vat_button').data("loading-text", "<i class='fa fa-refresh fa-spin fa-fw'></i> VALIDATING...");
$('#vat_button').data("button-text", "VALIDATE VAT");
// CUSTOMER INFORMATION
$('.form__section--customer-information h3').html("CUSTOMER INFORMATION");
$('label[for="subscription_customer_attributes_first_name"]').html("FIRST NAME *");
$('label[for="subscription_customer_attributes_last_name"]').html("LAST NAME *");
$('label[for="subscription_customer_attributes_email"]').html("EMAIL ADDRESS *");
$('label[for="subscription_customer_attributes_phone"]').html("PHONE");
$('label[for="subscription_customer_attributes_organization"]').html("ORGANIZATION");
$('label[for="subscription_customer_attributes_address"]').html("SHIPPING ADDRESS 1 *");
$('label[for="subscription_customer_attributes_address_2"]').html("SHIPPING ADDRESS 2");
$('label[for="subscription_customer_attributes_city"]').html("SHIPPING CITY *");
$('label[for="subscription_customer_attributes_country"]').html("SHIPPING COUNTRY *");
$('#subscription_customer_attributes_country').find('option').html("COUNTRY");
$('label[for="subscription_customer_attributes_state"]').html("SHIPPING STATE *");
$('#subscription_customer_attributes_state').find('option').html("STATE");
$('label[for="subscription_customer_attributes_zip"]').html("SHIPPING ZIP CODE");
// BILLING INFORMATION
$('.form__section--billing-information h3').html("BILLING INFORMATION");
$('.form__section--billing-information p:first').html("ALL TRANSACTIONS ARE SECURE AND ENCRYPTED.");
$('.form__section--credit-card .form__header-section--title').html('CREDIT CARD');
$('label[for="subscription_payment_profile_attributes_first_name"]').html("FIRST NAME ON ACCOUNT *");
$('label[for="subscription_payment_profile_attributes_last_name"]').html("LAST NAME ON ACCOUNT *");
$('label[for="subscription_payment_profile_attributes_full_number"]').html("CARD NUMBER *");
$('label[for="subscription_payment_profile_attributes_cvv"]').html("CVV");
$('label[for="subscription_payment_profile_attributes_expiration_month"]').html("EXPIRATION MONTH *");
$('label[for="subscription_payment_profile_attributes_expiration_year"]').html("EXPIRATION YEAR *");
// BILLING ADDRESS
$('.form__section--billing-address h3').html("BILLING ADDRESS");
$('.form__section--billing-address header label:first').contents().last().replaceWith("USE SHIPPING ADDRESS");
$('.form__section--billing-address header label:last').contents().last().replaceWith("USE A DIFFERENT BILLING ADDRESS");
$('label[for="subscription_payment_profile_attributes_billing_address"]').html("BILLING ADDRESS 1 *");
$('label[for="subscription_payment_profile_attributes_billing_address_2"]').html("BILLING ADDRESS 2");
$('label[for="subscription_payment_profile_attributes_billing_city"]').html("CITY *");
$('label[for="subscription_payment_profile_attributes_billing_country"]').html("COUNTRY *");
$('#subscription_payment_profile_attributes_billing_country').find('option').html("COUNTRY");
$('label[for="subscription_payment_profile_attributes_billing_state"]').html("STATE *");
$('#subscription_payment_profile_attributes_billing_state').find('option').html("STATE");
$('label[for="subscription_payment_profile_attributes_billing_zip"]').html("ZIP CODE");
// ADDITIONAL INFORMATION
$('.form__section--additional-information h3').html("ADDITIONAL INFORMATION");
// TERMS
$('.form__section--terms-submit label').contents().slice(3).remove();
$('.form__section--terms-submit label').append('I ACCEPT THE <a href="" target="_blank">TERMS AND CONDITIONS</a>');
// SUBMIT
$('#subscription_submit').html("PLACE MY ORDER");
// PLAN SUMMARY
$('.content__secondary .content__heading h2').html("PLAN SUMMARY");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment