Reduce the height of the notes field in taskDetail

This commit is contained in:
Adam Goldsmith 2021-05-20 18:00:12 -04:00
parent 726b79c990
commit 8be59ecff7
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
from datetime import datetime
from django import forms
from markdownx.widgets import MarkdownxWidget
from .models import Event
@ -8,6 +9,9 @@ class EventForm(forms.ModelForm):
class Meta:
model = Event
fields = ['date', 'user', 'notes']
widgets = {
'notes': MarkdownxWidget(attrs={'rows': 2}),
}
def __init__(self, *args, **kwargs):
user = kwargs.pop('user')

View File

@ -82,7 +82,7 @@
{% csrf_token %}
<td> {% render_field form.date type="date" class="form-control" %} </td>
<td> {% render_field form.user class="form-control" style="width: initial;" %} </td>
<td> {% render_field form.notes class="form-control form-control-sm" rows="2" %} </td>
<td> {% render_field form.notes class="form-control form-control-sm" %} </td>
<td> <input type="submit" class="btn btn-primary" value="Submit"> </td>
</form>
</tr>