[FIX] LEAVE: Remove leave type leave calculation method, leave type creation/updation form
This commit is contained in:
@@ -112,6 +112,8 @@ class LeaveTypeForm(ConditionForm):
|
||||
}
|
||||
widgets = {
|
||||
"color": TextInput(attrs={"type": "color", "style": "height:40px;"}),
|
||||
"period_in": forms.HiddenInput(),
|
||||
"total_days": forms.HiddenInput(),
|
||||
}
|
||||
|
||||
def clean(self):
|
||||
@@ -161,7 +163,7 @@ class UpdateLeaveTypeForm(ConditionForm):
|
||||
class Meta:
|
||||
model = LeaveType
|
||||
fields = "__all__"
|
||||
|
||||
exclude = ["period_in", "total_days"]
|
||||
widgets = {
|
||||
"color": TextInput(attrs={"type": "color", "style": "height:40px;"}),
|
||||
}
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-4">
|
||||
<div class="oh-input-group">
|
||||
<label for="" class="oh-label">{% trans "Leave Count" %}</label>
|
||||
<label for="" class="oh-label">{% trans "Total Days" %}</label>
|
||||
{{form.count}}
|
||||
{{form.count.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-4">
|
||||
<div class="oh-input-group">
|
||||
<label for="" class="oh-label">{% trans "Period In" %}</label>
|
||||
{% comment %} <label for="" class="oh-label">{% trans "Period In" %}</label> {% endcomment %}
|
||||
{{form.period_in}}
|
||||
{{form.period_in.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-4">
|
||||
<div class="oh-input-group">
|
||||
<label for="" class="oh-label">{% trans "Total Days" %}</label>
|
||||
{% comment %} <label for="" class="oh-label">{% trans "Total Days" %}</label> {% endcomment %}
|
||||
{{form.total_days}}
|
||||
{{form.total_days.errors}}
|
||||
</div>
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-4">
|
||||
<div class="oh-input-group">
|
||||
<label for="" class="oh-label">{% trans "Leave Count" %}</label>
|
||||
<label for="" class="oh-label">{% trans "Total Days" %}</label>
|
||||
{{form.count}}
|
||||
{{form.count.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-4">
|
||||
<div class="oh-input-group">
|
||||
<label for="" class="oh-label">{% trans "Period In" %}</label>
|
||||
{% comment %} <label for="" class="oh-label">{% trans "Period In" %}</label> {% endcomment %}
|
||||
{{form.period_in}}
|
||||
{{form.period_in.errors}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-4">
|
||||
<div class="oh-input-group">
|
||||
<label for="" class="oh-label">{% trans "Total Days" %}</label>
|
||||
{% comment %} <label for="" class="oh-label">{% trans "Total Days" %}</label> {% endcomment %}
|
||||
{{form.total_days}}
|
||||
{{form.total_days.errors}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user