[FIX] EMPLOYEE: #905
This commit is contained in:
@@ -790,9 +790,7 @@ class EmployeeNote(HorillaModel):
|
||||
on_delete=models.CASCADE,
|
||||
related_name="employee_name",
|
||||
)
|
||||
description = models.TextField(
|
||||
verbose_name=_("Description"), max_length=255, null=True
|
||||
)
|
||||
description = models.TextField(verbose_name=_("Description"), null=True) # 905
|
||||
note_files = models.ManyToManyField(NoteFiles, blank=True)
|
||||
updated_by = models.ForeignKey(Employee, on_delete=models.CASCADE)
|
||||
objects = HorillaCompanyManager(
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
{% load i18n %}
|
||||
<form class='oh-general__tab-target oh-profile-section'>
|
||||
{{note_form.as_p}}
|
||||
<div class="d-flex flex-row-reverse">
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary pr-4 pl-4"
|
||||
hx-post="{% url 'add-employee-note-post' %}"
|
||||
hx-target='#remark-content'
|
||||
>
|
||||
{% trans "Add" %}
|
||||
</button>
|
||||
</div>
|
||||
{% load basefilters %}
|
||||
|
||||
<form hx-target="#note_target" hx-post="{% url 'add-employee-note' employee.id %}" id="commentForm">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<div class="mt-4">
|
||||
<span class="oh-activity-sidebar__title fw-bold">{{employee}}'s {% trans "Notes" %}</span>
|
||||
{% if perms.employee.add_employeenote or request.user|is_reportingmanager %}
|
||||
{% if form.description.errors %}
|
||||
{{ form.description.errors }}
|
||||
{% endif %}
|
||||
<input type="text" hx-on:keyup="toggleCommentButton(this);" name="description" id="commentInput"
|
||||
class="oh-input w-100 mt-2" placeholder="{% trans 'Add notes' %}"
|
||||
value="{{ form.description.value|default:'' }}"
|
||||
>
|
||||
{% endif %}
|
||||
</div>
|
||||
<button type="submit" id="commentButton" class="oh-btn oh-btn--secondary mt-2 mr-0 oh-btn--w-100-resp"
|
||||
{% if not form.description.value %}style="display: none;"{% endif %}>
|
||||
{% trans "Add" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="oh-inner-sidebar-content__footer"></div>
|
||||
</form>
|
||||
|
||||
@@ -135,8 +135,7 @@
|
||||
</ol>
|
||||
{% else %}
|
||||
<div class="mt-4">
|
||||
<form hx-target="#note_target" hx-post="{% url 'add-employee-note' employee.id %}"
|
||||
hx-on:change="console.log('test');" id="commentForm">
|
||||
<form hx-target="#note_target" hx-post="{% url 'add-employee-note' employee.id %}" id="commentForm">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<div class="mt-4">
|
||||
|
||||
Reference in New Issue
Block a user