Compensation action
* adds compensation action to compensation detail view * adds adding/removing logic for compensation action * adds bootstrap style to select fields in forms * refactors UnitEnum into UnitChoices using models.TextChoices (Django 3.x) * adds translations
This commit is contained in:
@@ -18,23 +18,3 @@ class BaseEnum(Enum):
|
||||
empty_choice = [] if drop_empty_choice else [(None, "---")]
|
||||
choices = empty_choice + [(enum.value, enum.name) for enum in cls]
|
||||
return choices
|
||||
|
||||
|
||||
class UnitEnum(BaseEnum):
|
||||
"""
|
||||
Predefines units for selection
|
||||
"""
|
||||
mm = "mm"
|
||||
dm = "dm"
|
||||
cm = "cm"
|
||||
m = "m"
|
||||
km = "km"
|
||||
|
||||
qmm = "qmm"
|
||||
qdm = "qdm"
|
||||
qcm = "qcm"
|
||||
qm = "qm"
|
||||
qkm = "qkm"
|
||||
ha = "ha"
|
||||
|
||||
st = "St." # pieces
|
||||
|
||||
Reference in New Issue
Block a user