move plan choice into form

This commit is contained in:
Tobias Brunner 2025-03-04 16:49:30 +01:00
parent 928bd0818e
commit aa4ec33c93
No known key found for this signature in database
4 changed files with 56 additions and 7 deletions

View file

@ -54,6 +54,17 @@
{% endif %}
</div>
{% if choices %}
<div class="mb-3">
<label for="id_choice" class="form-label">{{ choice_label|default:"Please Select" }}</label>
<select name="selected_choice" id="id_choice" class="form-control">
{% for choice_id, choice_name in choices %}
<option value="{{ choice_id }}|{{ choice_name }}">{{ choice_name }}</option>
{% endfor %}
</select>
</div>
{% endif %}
<div class="mb-3">
<label for="id_message" class="form-label">Your Message (Optional)</label>
{{ form.message|addclass:"form-control" }}

View file

@ -149,11 +149,6 @@
</div>
{% endif %}
</div>
<div>
<h4 class="mb-3">Order This Plan</h4>
{% load contact_tags %}
{% embedded_contact_form source="Plan Order" service=offering.service offering_id=offering.id plan_id=plan.id %}
</div>
</div>
</div>
{% empty %}
@ -167,6 +162,18 @@
</div>
{% endfor %}
</div>
{% if offering.plans.exists %}
<div class="pt-40">
<h4 class="fs-22 fw-semibold lh-1 mb-12">I'm interested in a plan</h4>
<div class="row">
<div class="col-12">
{% load contact_tags %}
{% embedded_contact_form source="Plan Order" service=offering.service offering_id=offering.id choices=offering.plans.all choice_label="Select a Plan" %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>