[UPDT] BASE: Updated rotating work type assign delete and archive method by adding hx-attribute

This commit is contained in:
Horilla
2024-03-07 15:44:41 +05:30
parent 3e5c4f80e2
commit f6d4a6843a
6 changed files with 236 additions and 119 deletions

View File

@@ -12,7 +12,7 @@ from datetime import date, timedelta
from django.contrib.auth import authenticate
from django import forms
from django.contrib.auth.models import Group, Permission, User
from django.forms import DateInput, TextInput
from django.forms import DateInput, HiddenInput, TextInput
from django.core.exceptions import ValidationError
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy as _trans
@@ -529,6 +529,7 @@ class RotatingWorkTypeAssignForm(ModelForm):
exclude = ("next_change_date", "current_work_type", "next_work_type")
widgets = {
"start_date": DateInput(attrs={"type": "date"}),
"is_active":HiddenInput()
}
labels = {
"is_active": _trans("Is Active"),