[UPDT] HISTORY: History form updates
This commit is contained in:
@@ -350,7 +350,7 @@
|
|||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if request.user|check_manager:employee %}
|
{% if perms.horilla_documents.view_document %}
|
||||||
<li data-cell-index="20" data-cell-title="{% trans 'Documents' %}" class="oh-general__tab">
|
<li data-cell-index="20" data-cell-title="{% trans 'Documents' %}" class="oh-general__tab">
|
||||||
<a
|
<a
|
||||||
hx-get="{% url 'document-tab' employee.id %}?employee_view=true"
|
hx-get="{% url 'document-tab' employee.id %}?employee_view=true"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
"""
|
"""
|
||||||
forms.py
|
forms.py
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.forms.utils import ErrorList
|
from django.forms.utils import ErrorList
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from horilla_audit.models import HorillaAuditInfo, AuditTag
|
from horilla_audit.models import HorillaAuditInfo, AuditTag
|
||||||
|
|
||||||
@@ -14,16 +16,18 @@ class HistoryForm(forms.Form):
|
|||||||
HistoryForm
|
HistoryForm
|
||||||
"""
|
"""
|
||||||
|
|
||||||
history_title = forms.CharField(required=False)
|
history_title = forms.CharField(required=False, label=_("Updation title"))
|
||||||
history_description = forms.CharField(
|
history_description = forms.CharField(
|
||||||
widget=forms.Textarea(
|
widget=forms.Textarea(
|
||||||
attrs={"placeholder": "Enter text", "class": "oh-input w-100", "rows": "2"}
|
attrs={"placeholder": "Enter text", "class": "oh-input w-100", "rows": "2"}
|
||||||
),
|
),
|
||||||
required=False,
|
required=False,
|
||||||
|
label=_("Updation description"),
|
||||||
)
|
)
|
||||||
history_highlight = forms.BooleanField(required=False)
|
history_highlight = forms.BooleanField(required=False,label=_("Updation highlight"))
|
||||||
history_tags = forms.ModelMultipleChoiceField(
|
history_tags = forms.ModelMultipleChoiceField(
|
||||||
queryset=AuditTag.objects.all(), required=False
|
queryset=AuditTag.objects.all(), required=False,
|
||||||
|
label = _("Updation tag")
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs) -> None:
|
def __init__(self, *args, **kwargs) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user