Skip to content

no template literals in yuicompressor land :/ #1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions static/js/sponsors/applicationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $(document).ready(function(){
let packageInfo = $("#package_benefits_" + package);
packageInfo.children().each(function(){
let benefit = $(this).html()
let benefitInput = checkboxesContainer.find(`[value=${benefit}]`);
let benefitInput = checkboxesContainer.find('[value=' + benefit + ']');
let packageOnlyBenefit = benefitInput.attr("package_only");
benefitInput.removeAttr("disabled");
benefitInput.trigger("click");
Expand All @@ -34,25 +34,25 @@ $(document).ready(function(){
let data = $("form").serialize();

let cost = packageInfo.attr("data-cost");
costLabel.html(`Sponsorship cost is $${cost}.00`)
costLabel.html('Sponsorship cost is $' + cost + '.00')
});

$("input[id^=id_benefits_]").change(function(){
let benefit = this.value;
if (benefit.length == 0) return;
if (costLabel.html() != "Updating cost...") costLabel.html("Submit your application and we'll get in touch...");

let active = checkboxesContainer.find(`[value=${benefit}]`).prop("checked");
let active = checkboxesContainer.find('[value=' + benefit + ']').prop("checked");
if (!active) {
let packageOnlyBenefit = $(this).attr("package_only");
if (packageOnlyBenefit) $(this).attr("disabled", true);
return;
}


$(`#conflicts_with_${benefit}`).children().each(function(){
$('#conflicts_with_' + benefit).children().each(function(){
let conflictId = $(this).html();
let conflictCheckbox = checkboxesContainer.find(`[value=${conflictId}]`);
let conflictCheckbox = checkboxesContainer.find('[value=' + conflictId + ']');
let checked = conflictCheckbox.prop("checked");
if (checked){
conflictCheckbox.trigger("click");
Expand Down