.
This commit is contained in:
@@ -790,7 +790,7 @@ input {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-selection__choice {
|
.select2-selection .select2-selection__rendered .select2-selection__choice {
|
||||||
background-color: #5897fb;
|
background-color: #5897fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-3
@@ -595,12 +595,13 @@ class ConditionAutocomplete(autocomplete.Select2QuerySetView):
|
|||||||
if self.q:
|
if self.q:
|
||||||
# This raises a fielderror which breaks creating a new item if not caught
|
# This raises a fielderror which breaks creating a new item if not caught
|
||||||
try:
|
try:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
except FieldError:
|
except FieldError:
|
||||||
return Condition.objects.none()
|
return Condition.objects.none()
|
||||||
|
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
|
|
||||||
class FindingAutocomplete(autocomplete.Select2QuerySetView):
|
class FindingAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
# Don't forget to filter out results depending on the visitor !
|
# Don't forget to filter out results depending on the visitor !
|
||||||
@@ -612,12 +613,13 @@ class FindingAutocomplete(autocomplete.Select2QuerySetView):
|
|||||||
if self.q:
|
if self.q:
|
||||||
# This raises a fielderror which breaks creating a new item if not caught
|
# This raises a fielderror which breaks creating a new item if not caught
|
||||||
try:
|
try:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
except FieldError:
|
except FieldError:
|
||||||
return Finding.objects.none()
|
return Finding.objects.none()
|
||||||
|
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
|
|
||||||
class StructureAutocomplete(autocomplete.Select2QuerySetView):
|
class StructureAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
# Don't forget to filter out results depending on the visitor !
|
# Don't forget to filter out results depending on the visitor !
|
||||||
@@ -629,7 +631,7 @@ class StructureAutocomplete(autocomplete.Select2QuerySetView):
|
|||||||
if self.q:
|
if self.q:
|
||||||
# This raises a fielderror which breaks creating a new item if not caught
|
# This raises a fielderror which breaks creating a new item if not caught
|
||||||
try:
|
try:
|
||||||
qs = qs.filter(name__contains=self.q)
|
qs = qs.filter(name__icontains=self.q)
|
||||||
except FieldError:
|
except FieldError:
|
||||||
return Structure.objects.none()
|
return Structure.objects.none()
|
||||||
|
|
||||||
|
|||||||
@@ -790,7 +790,7 @@ input {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-selection__choice {
|
.select2-selection .select2-selection__rendered .select2-selection__choice {
|
||||||
background-color: #5897fb;
|
background-color: #5897fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user