Remove unused fields from inquiry creation

This commit is contained in:
Kumi 2021-04-17 08:36:26 +02:00
parent 1dd4b899c2
commit 3ad8063919
2 changed files with 1 additions and 8 deletions

View file

@ -33,12 +33,7 @@ class InquiryCreateView(CreateView):
return reverse("auction:process_inquiry", args=(self.object.uuid,)) return reverse("auction:process_inquiry", args=(self.object.uuid,))
def clean_destination_coords(self): def clean_destination_coords(self):
lat = self.request.POST.get("destination_lat", "") lat, lon = name_to_coords(self.request.POST.get("destination_name"))
lon = self.request.POST.get("destination_lon", "")
if (not lat) or (not lon):
lat, lon = name_to_coords(self.request.POST.get("destination_name"))
return Point(lon, lat) return Point(lon, lat)
class InquiryProcessView(InConstructionMixin, UpdateView): class InquiryProcessView(InConstructionMixin, UpdateView):

View file

@ -60,8 +60,6 @@
<div class="col-12 col-md-6 col-lg-6"> <div class="col-12 col-md-6 col-lg-6">
<div class="form-group left-icon"> <div class="form-group left-icon">
<input id="id_destination_name" name="destination_name" type="text" class="form-control" required placeholder="{% trans "Zielort" %}" > <input id="id_destination_name" name="destination_name" type="text" class="form-control" required placeholder="{% trans "Zielort" %}" >
<input id="id_destination_lat" name="destination_lat" type="text" style="display: none;">
<input id="id_destination_lon" name="destination_lon" type="text" style="display: none;">
<i class="fa fa-map-marker"></i> <i class="fa fa-map-marker"></i>
</div> </div>
</div><!-- end columns --> </div><!-- end columns -->