[UPDT] HORILLA DOCUMENTS: Updated horilla documents app by adding htmx script to trigger the bulk rejection action
This commit is contained in:
@@ -92,13 +92,18 @@ class DocumentUpdateForm(ModelForm):
|
||||
}
|
||||
|
||||
|
||||
class DocumentRejectForm(ModelForm):
|
||||
"""form to add rejection reason while rejecting a Document"""
|
||||
|
||||
class Meta:
|
||||
model = Document
|
||||
fields = ["reject_reason"]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields["reject_reason"].widget.attrs["required"] = True
|
||||
class DocumentRejectForm(forms.Form):
|
||||
verbose_name = Document()._meta.get_field("reject_reason").verbose_name
|
||||
reject_reason = forms.CharField(
|
||||
widget=forms.Textarea(
|
||||
attrs={
|
||||
"class": "oh-input w-100",
|
||||
"placeholder": verbose_name,
|
||||
"rows": 2,
|
||||
"cols": 40,
|
||||
}
|
||||
),
|
||||
max_length=255,
|
||||
required=True,
|
||||
label=verbose_name,
|
||||
)
|
||||
|
||||
@@ -90,7 +90,9 @@ class Document(HorillaModel):
|
||||
status = models.CharField(
|
||||
choices=STATUS, max_length=10, default="requested", verbose_name=_("Status")
|
||||
)
|
||||
reject_reason = models.TextField(blank=True, null=True, max_length=255)
|
||||
reject_reason = models.TextField(
|
||||
blank=True, null=True, max_length=255, verbose_name=_("Reject Reason")
|
||||
)
|
||||
issue_date = models.DateField(null=True, blank=True, verbose_name=_("Issue Date"))
|
||||
expiry_date = models.DateField(null=True, blank=True, verbose_name=_("Expiry Date"))
|
||||
notify_before = models.IntegerField(
|
||||
|
||||
Reference in New Issue
Block a user