|
44 | 44 | class ChangeStateForm(forms.Form): |
45 | 45 | state = forms.ModelChoiceField(State.objects.filter(used=True, type="draft-iesg"), empty_label=None, required=True) |
46 | 46 | substate = forms.ModelChoiceField(DocTagName.objects.filter(slug__in=IESG_SUBSTATE_TAGS), required=False) |
47 | | - comment = forms.CharField(widget=forms.Textarea, required=False) |
| 47 | + comment = forms.CharField(widget=forms.Textarea, required=False, strip=False) |
48 | 48 |
|
49 | 49 | def clean(self): |
50 | 50 | retclean = self.cleaned_data |
@@ -210,7 +210,7 @@ def change_iana_state(request, name, state_type): |
210 | 210 |
|
211 | 211 | class ChangeStreamForm(forms.Form): |
212 | 212 | stream = forms.ModelChoiceField(StreamName.objects.exclude(slug="legacy"), required=False) |
213 | | - comment = forms.CharField(widget=forms.Textarea, required=False) |
| 213 | + comment = forms.CharField(widget=forms.Textarea, required=False, strip=False) |
214 | 214 |
|
215 | 215 | @login_required |
216 | 216 | def change_stream(request, name): |
@@ -292,7 +292,7 @@ def doc_ajax_internet_draft(request): |
292 | 292 |
|
293 | 293 | class ReplacesForm(forms.Form): |
294 | 294 | replaces = SearchableDocAliasesField(required=False) |
295 | | - comment = forms.CharField(widget=forms.Textarea, required=False) |
| 295 | + comment = forms.CharField(widget=forms.Textarea, required=False, strip=False) |
296 | 296 |
|
297 | 297 | def __init__(self, *args, **kwargs): |
298 | 298 | self.doc = kwargs.pop('doc') |
@@ -344,7 +344,7 @@ class SuggestedReplacesForm(forms.Form): |
344 | 344 | replaces = forms.ModelMultipleChoiceField(queryset=DocAlias.objects.all(), |
345 | 345 | label="Suggestions", required=False, widget=forms.CheckboxSelectMultiple, |
346 | 346 | help_text="Select only the documents that are replaced by this document") |
347 | | - comment = forms.CharField(label="Optional comment", widget=forms.Textarea, required=False) |
| 347 | + comment = forms.CharField(label="Optional comment", widget=forms.Textarea, required=False, strip=False) |
348 | 348 |
|
349 | 349 | def __init__(self, suggested, *args, **kwargs): |
350 | 350 | super(SuggestedReplacesForm, self).__init__(*args, **kwargs) |
@@ -404,7 +404,7 @@ def review_possibly_replaces(request, name): |
404 | 404 |
|
405 | 405 | class ChangeIntentionForm(forms.Form): |
406 | 406 | intended_std_level = forms.ModelChoiceField(IntendedStdLevelName.objects.filter(used=True), empty_label="(None)", required=True, label="Intended RFC status") |
407 | | - comment = forms.CharField(widget=forms.Textarea, required=False) |
| 407 | + comment = forms.CharField(widget=forms.Textarea, required=False, strip=False) |
408 | 408 |
|
409 | 409 | def change_intention(request, name): |
410 | 410 | """Change the intended publication status of a Document of type 'draft' , notifying parties |
@@ -474,7 +474,7 @@ class EditInfoForm(forms.Form): |
474 | 474 | ad = forms.ModelChoiceField(Person.objects.filter(role__name="ad", role__group__state="active",role__group__type='area').order_by('name'), label="Responsible AD", empty_label="(None)", required=True) |
475 | 475 | create_in_state = forms.ModelChoiceField(State.objects.filter(used=True, type="draft-iesg", slug__in=("pub-req", "watching")), empty_label=None, required=False) |
476 | 476 | notify = forms.CharField(max_length=255, label="Notice emails", help_text="Separate email addresses with commas.", required=False) |
477 | | - note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False) |
| 477 | + note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False, strip=False) |
478 | 478 | telechat_date = forms.TypedChoiceField(coerce=lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').date(), empty_value=None, required=False, widget=forms.Select(attrs={'onchange':'make_bold()'})) |
479 | 479 | returning_item = forms.BooleanField(required=False) |
480 | 480 |
|
@@ -812,7 +812,7 @@ def resurrect(request, name): |
812 | 812 | back_url=doc.get_absolute_url())) |
813 | 813 |
|
814 | 814 | class IESGNoteForm(forms.Form): |
815 | | - note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False) |
| 815 | + note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False, strip=False) |
816 | 816 |
|
817 | 817 | def clean_note(self): |
818 | 818 | # not munging the database content to use html line breaks -- |
@@ -858,7 +858,7 @@ def edit_iesg_note(request, name): |
858 | 858 | )) |
859 | 859 |
|
860 | 860 | class ShepherdWriteupUploadForm(forms.Form): |
861 | | - content = forms.CharField(widget=forms.Textarea, label="Shepherd writeup", help_text="Edit the shepherd writeup.", required=False) |
| 861 | + content = forms.CharField(widget=forms.Textarea, label="Shepherd writeup", help_text="Edit the shepherd writeup.", required=False, strip=False) |
862 | 862 | txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False) |
863 | 863 |
|
864 | 864 | def clean_content(self): |
@@ -1116,7 +1116,7 @@ def edit_consensus(request, name): |
1116 | 1116 |
|
1117 | 1117 | class PublicationForm(forms.Form): |
1118 | 1118 | subject = forms.CharField(max_length=200, required=True) |
1119 | | - body = forms.CharField(widget=forms.Textarea, required=True) |
| 1119 | + body = forms.CharField(widget=forms.Textarea, required=True, strip=False) |
1120 | 1120 |
|
1121 | 1121 | def request_publication(request, name): |
1122 | 1122 | """Request publication by RFC Editor for a document which hasn't |
@@ -1210,7 +1210,7 @@ def request_publication(request, name): |
1210 | 1210 | class AdoptDraftForm(forms.Form): |
1211 | 1211 | group = forms.ModelChoiceField(queryset=Group.objects.filter(type__in=["wg", "rg"], state="active").order_by("-type", "acronym"), required=True, empty_label=None) |
1212 | 1212 | newstate = forms.ModelChoiceField(queryset=State.objects.filter(type__in=['draft-stream-ietf','draft-stream-irtf'],slug__in=['wg-cand', 'c-adopt', 'adopt-wg', 'info', 'wg-doc', 'candidat','active']),required=True,label="State") |
1213 | | - comment = forms.CharField(widget=forms.Textarea, required=False, label="Comment", help_text="Optional comment explaining the reasons for the adoption.") |
| 1213 | + comment = forms.CharField(widget=forms.Textarea, required=False, label="Comment", help_text="Optional comment explaining the reasons for the adoption.", strip=False) |
1214 | 1214 | weeks = forms.IntegerField(required=False, label="Expected weeks in adoption state") |
1215 | 1215 |
|
1216 | 1216 | def __init__(self, *args, **kwargs): |
@@ -1334,7 +1334,7 @@ def adopt_draft(request, name): |
1334 | 1334 | class ChangeStreamStateForm(forms.Form): |
1335 | 1335 | new_state = forms.ModelChoiceField(queryset=State.objects.filter(used=True), label='State' ) |
1336 | 1336 | weeks = forms.IntegerField(label='Expected weeks in state',required=False) |
1337 | | - comment = forms.CharField(widget=forms.Textarea, required=False, help_text="Optional comment for the document history.") |
| 1337 | + comment = forms.CharField(widget=forms.Textarea, required=False, help_text="Optional comment for the document history.", strip=False) |
1338 | 1338 | tags = forms.ModelMultipleChoiceField(queryset=DocTagName.objects.filter(used=True), widget=forms.CheckboxSelectMultiple, required=False) |
1339 | 1339 |
|
1340 | 1340 | def __init__(self, *args, **kwargs): |
|
0 commit comments