Reduce the height of the notes field in taskDetail
This commit is contained in:
parent
726b79c990
commit
8be59ecff7
@ -1,6 +1,7 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from markdownx.widgets import MarkdownxWidget
|
||||||
|
|
||||||
from .models import Event
|
from .models import Event
|
||||||
|
|
||||||
@ -8,6 +9,9 @@ class EventForm(forms.ModelForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Event
|
model = Event
|
||||||
fields = ['date', 'user', 'notes']
|
fields = ['date', 'user', 'notes']
|
||||||
|
widgets = {
|
||||||
|
'notes': MarkdownxWidget(attrs={'rows': 2}),
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
user = kwargs.pop('user')
|
user = kwargs.pop('user')
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<td> {% render_field form.date type="date" class="form-control" %} </td>
|
<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.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>
|
<td> <input type="submit" class="btn btn-primary" value="Submit"> </td>
|
||||||
</form>
|
</form>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user