Skip to content

Commit 2f56de6

Browse files
committed
added abstract to the upload form
- Legacy-Id: 8434
1 parent b86d5c1 commit 2f56de6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/doc/views_material.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def choose_material_type(request, acronym):
3333
class UploadMaterialForm(forms.Form):
3434
title = forms.CharField(max_length=Document._meta.get_field("title").max_length)
3535
name = forms.CharField(max_length=Document._meta.get_field("name").max_length)
36+
abstract = forms.CharField(max_length=Document._meta.get_field("abstract").max_length,widget=forms.Textarea)
3637
state = forms.ModelChoiceField(State.objects.all(), empty_label=None)
3738
material = forms.FileField(label='File', help_text="PDF or text file (ASCII/UTF-8)")
3839

@@ -121,6 +122,9 @@ def edit_material(request, name=None, acronym=None, action=None, doc_type=None):
121122
if "title" in form.cleaned_data:
122123
doc.title = form.cleaned_data["title"]
123124

125+
if "abstract" in form.cleaned_data:
126+
doc.abstract = form.cleaned_data["abstract"]
127+
124128
doc.time = datetime.datetime.now()
125129

126130
if "material" in form.fields:

ietf/templates/doc/material/edit_material.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% block morecss %}
66
{{ block.super }}
77
form.upload-material td { padding-bottom: 0.6em; }
8-
form.upload-material #id_title, form.upload-material #id_name { width: 30em; }
8+
form.upload-material #id_title, form.upload-material #id_name, form.upload-material #id_abstract { width: 30em; }
99
form.upload-material .submit-row td { padding-top: 1em; text-align: right; }
1010
{% endblock %}
1111

0 commit comments

Comments
 (0)