From b01690af791bab6cd99dd5f185c47aa5930a2fad Mon Sep 17 00:00:00 2001 From: Horilla Date: Sat, 15 Mar 2025 12:51:39 +0530 Subject: [PATCH] [UPDT] HORILLA DOCUMENTS: Updated documents app by adding verbose name for model and fields --- .../document_request_create_form.html | 147 ++++++++---------- .../templates/tabs/htmx/document_form.html | 4 +- employee/templates/tabs/shift-tab.html | 34 +--- horilla_documents/forms.py | 4 - horilla_documents/models.py | 42 ++++- 5 files changed, 104 insertions(+), 127 deletions(-) diff --git a/employee/templates/documents/document_request_create_form.html b/employee/templates/documents/document_request_create_form.html index 5efb0e0e5..361ecb959 100644 --- a/employee/templates/documents/document_request_create_form.html +++ b/employee/templates/documents/document_request_create_form.html @@ -1,91 +1,76 @@ {% load i18n %}
-
- {% trans "Document Request" %} -
- +
+ {{form.verbose_name}} +
+
-
- {{form.errors}} -
-
-
- - {{form.title}} -
-
- {% if form.employee_id %} -
-
- - {{form.employee_id}} -
-
- {% elif form.candidate_id %} -
-
- - {{form.candidate_id}} + + {{form.errors}} +
+
+
+ + {{form.title}} +
+
+ {% if form.employee_id %} +
+
+ + {{form.employee_id}} +
+
+ {% elif form.candidate_id %} +
+
+ + {{form.candidate_id}} +
-
- {% endif %} -
-
-
-
- - {{form.format}} + {% endif %}
-
-
-
- - {{form.max_size}} +
+
+
+ + {{form.format}} +
+
+
+
+ + {{form.max_size}} +
+
-
-
-
-
-
- - {{form.description}} +
+
+
+ + {{form.description}} +
+
-
-
- - + +
diff --git a/employee/templates/tabs/htmx/document_form.html b/employee/templates/tabs/htmx/document_form.html index 1155e5f5a..0e1918b0c 100644 --- a/employee/templates/tabs/htmx/document_form.html +++ b/employee/templates/tabs/htmx/document_form.html @@ -1,6 +1,6 @@ {% load i18n %} {% load widget_tweaks %}
- {% trans "Upload File" %} + {% trans "Upload" %} {{form.verbose_name}} -
- -
-
-
-
str: return f"{self.title}"