order button implementation to send message

This commit is contained in:
Tobias Brunner 2025-06-04 16:58:47 +02:00
parent 206e46aa6a
commit c8c224cfb8
No known key found for this signature in database
3 changed files with 115 additions and 4 deletions

View file

@ -73,14 +73,29 @@
{% endif %}
<div class="mb-3">
<label for="id_message" class="form-label">Your Message (Optional)</label>
<label for="id_message" class="form-label">
{% if source == "Configuration Order" %}
Configuration Details & Additional Message
{% else %}
Your Message (Optional)
{% endif %}
</label>
{{ form.message|addclass:"form-control" }}
{% if form.message.errors %}
<div class="invalid-feedback d-block">{{ form.message.errors }}</div>
{% endif %}
{% if source == "Configuration Order" %}
<small class="form-text text-muted">Your selected configuration will be automatically filled here when you click "Order This Configuration".</small>
{% endif %}
</div>
<button type="submit" class="btn btn-primary">Send Message</button>
<button type="submit" class="btn btn-primary">
{% if source == "Configuration Order" %}
Submit Order Request
{% else %}
Send Message
{% endif %}
</button>
</form>
</div>
</div>

View file

@ -306,10 +306,20 @@
<!-- Order Button -->
<div class="text-center mt-4">
<a href="#interest" class="btn btn-primary btn-lg px-5 py-3 fw-semibold">
<a href="#order-form" class="btn btn-primary btn-lg px-5 py-3 fw-semibold">
<i class="bi bi-cart me-2"></i>Order This Configuration
</a>
</div>
<!-- Order Form Section -->
<div id="order-form" class="pt-40" style="scroll-margin-top: 30px;">
<h4 class="fs-22 fw-semibold lh-1 mb-12">Order Your Configuration</h4>
<div class="row">
<div class="col-12">
{% embedded_contact_form source="Configuration Order" service=offering.service offering_id=offering.id %}
</div>
</div>
</div>
{% elif offering.plans.all %}
<!-- Traditional Plans -->
<h3 class="fs-24 fw-semibold lh-1 mb-12">Available Plans</h3>
@ -356,7 +366,7 @@
</div>
{% endif %}
{% if offering.plans.exists %}
{% if offering.plans.exists and not pricing_data_by_group_and_service_level %}
<div id="form" class="pt-40">
<h4 class="fs-22 fw-semibold lh-1 mb-12">I'm interested in a plan</h4>
<div class="row">