[UPDT] LEAVE: Leave type creation and updation added with helptext and design changes

This commit is contained in:
Horilla
2024-02-17 15:19:35 +05:30
parent e57b83cf99
commit bac7a40d1e
4 changed files with 357 additions and 215 deletions

View File

@@ -139,18 +139,6 @@ class ConditionForm(forms.ModelForm):
pass
class LeaveTypeForm(ConditionForm):
require_approval = forms.CharField(
label="Require Approval", widget=forms.RadioSelect(choices=CHOICES)
)
require_attachment = forms.CharField(
label="Require Attachment", widget=forms.RadioSelect(choices=CHOICES)
)
exclude_company_leave = forms.CharField(
label="Exclude Company Leave", widget=forms.RadioSelect(choices=CHOICES)
)
exclude_holiday = forms.CharField(
label="Exclude Holiday", widget=forms.RadioSelect(choices=CHOICES)
)
class Meta:
model = LeaveType
@@ -177,18 +165,6 @@ class LeaveTypeForm(ConditionForm):
class UpdateLeaveTypeForm(ConditionForm):
require_approval = forms.CharField(
label="Require Approval", widget=forms.RadioSelect(choices=CHOICES)
)
require_attachment = forms.CharField(
label="Require Attachment", widget=forms.RadioSelect(choices=CHOICES)
)
exclude_company_leave = forms.CharField(
label="Exclude Company Leave", widget=forms.RadioSelect(choices=CHOICES)
)
exclude_holiday = forms.CharField(
label="Exclude Holiday", widget=forms.RadioSelect(choices=CHOICES)
)
def __init__(self, *args, **kwargs):
super(UpdateLeaveTypeForm, self).__init__(*args, **kwargs)