fix: planner quote button — use lang-prefixed URL to prevent 404
The "Get Supplier Quotes" CTA in planner.js used a hardcoded /leads/quote path which 404s because the route is registered at /<lang>/leads/quote. Inject the correct URL server-side via window.__PADELNOMICS_QUOTE_URL__ using url_for, consistent with the existing __PADELNOMICS_CALC_URL__ / __PADELNOMICS_SAVE_URL__ pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -254,6 +254,7 @@ window.__PADELNOMICS_INITIAL_D__ = {{ initial_d | safe }};
|
||||
window.__PADELNOMICS_CALC_URL__ = "{{ url_for('planner.calculate') }}";
|
||||
window.__PADELNOMICS_SAVE_URL__ = "{{ url_for('planner.save_scenario') }}";
|
||||
window.__PADELNOMICS_SCENARIO_URL__ = "{{ url_for('planner.index') }}scenarios/";
|
||||
window.__PADELNOMICS_QUOTE_URL__ = "{{ url_for('leads.quote_request') }}";
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='js/planner.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -819,7 +819,7 @@ function goToQuoteForm(){
|
||||
country: S.country,
|
||||
});
|
||||
if(S.budgetTarget) p.set('budget', S.budgetTarget);
|
||||
window.location.href = '/leads/quote?' + p.toString();
|
||||
window.location.href = (window.__PADELNOMICS_QUOTE_URL__ || '/leads/quote') + '?' + p.toString();
|
||||
}
|
||||
|
||||
// ── Init ──────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user