move code to static files
Some checks failed
Django Tests / test (push) Failing after 1m13s
Django Tests / test (pull_request) Failing after 1m3s

This commit is contained in:
Tobias Brunner 2025-06-23 13:25:46 +02:00
parent 4aebccbc7b
commit 0e88a8d13e
No known key found for this signature in database
4 changed files with 64 additions and 75 deletions

View file

@ -1834,4 +1834,22 @@ document.addEventListener('DOMContentLoaded', () => {
if (document.getElementById('cpuRange')) {
new PriceCalculator();
}
});
});
function selectPlan(element) {
const planId = element.getAttribute('data-plan-id');
const planName = element.getAttribute('data-plan-name');
// Find the plan dropdown in the contact form
const planDropdown = document.getElementById('id_choice');
if (planDropdown) {
// Find the option with matching plan id and select it
for (let i = 0; i < planDropdown.options.length; i++) {
const optionValue = planDropdown.options[i].value;
if (optionValue.startsWith(planId + '|')) {
planDropdown.selectedIndex = i;
break;
}
}
}
}