update the car finance edit form
This commit is contained in:
parent
8d82a954e8
commit
4815ae4f6a
@ -1515,7 +1515,6 @@ class CarFinanceCreateView(LoginRequiredMixin, PermissionRequiredMixin,SuccessMe
|
|||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context["car"] = self.car
|
context["car"] = self.car
|
||||||
print(self.car)
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
# def get_form(self, form_class=None):
|
# def get_form(self, form_class=None):
|
||||||
@ -1571,6 +1570,10 @@ class CarFinanceUpdateView(
|
|||||||
kwargs["instance"] = self.get_object()
|
kwargs["instance"] = self.get_object()
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
def get_context_data(self , **kwargs):
|
||||||
|
context = super().get_context_data(**kwargs)
|
||||||
|
context["car"] = self.object.car
|
||||||
|
return context
|
||||||
# def get_initial(self):
|
# def get_initial(self):
|
||||||
# initial = super().get_initial()
|
# initial = super().get_initial()
|
||||||
# instance = self.get_object()
|
# instance = self.get_object()
|
||||||
|
|||||||
@ -82,7 +82,7 @@
|
|||||||
{% include "plans/expiration_messages.html" %}
|
{% include "plans/expiration_messages.html" %}
|
||||||
{% block period_navigation %}
|
{% block period_navigation %}
|
||||||
{% endblock period_navigation %}
|
{% endblock period_navigation %}
|
||||||
<div id="main_content" class="fade-me-in" hx-boost="true" hx-target="#main_content" hx-select="#main_content" hx-swap="outerHTML transition:false" hx-select-oob="#toast-container" hx-history-elt>
|
<div id="main_content" class="fade-me-in" hx-boost="false" hx-target="#main_content" hx-select="#main_content" hx-swap="outerHTML transition:true" hx-select-oob="#toast-container" hx-history-elt>
|
||||||
<div id="spinner" class="htmx-indicator spinner-bg">
|
<div id="spinner" class="htmx-indicator spinner-bg">
|
||||||
<img src="{% static 'spinner.svg' %}" width="100" height="100" alt="">
|
<img src="{% static 'spinner.svg' %}" width="100" height="100" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -42,9 +42,6 @@
|
|||||||
<a href="{% url 'car_detail' request.dealer.slug car.slug %}" class="btn btn-lg btn-phoenix-secondary"><i class="fa-solid fa-ban me-1"></i>{% trans "Cancel" %}</a>
|
<a href="{% url 'car_detail' request.dealer.slug car.slug %}" class="btn btn-lg btn-phoenix-secondary"><i class="fa-solid fa-ban me-1"></i>{% trans "Cancel" %}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user