Specified strip=False for another bunch of CharField form fields with Textarea widgets.

- Legacy-Id: 12711
This commit is contained in:
Henrik Levkowetz 2017-01-23 17:38:56 +00:00
parent fa60671148
commit 6de7be6953
21 changed files with 67 additions and 69 deletions

View file

@ -81,7 +81,7 @@ class StatesField(forms.ModelMultipleChoiceField):
class DocumentForm(forms.ModelForm):
states = StatesField(queryset=State.objects.all(), required=False)
comment_about_changes = forms.CharField(
widget=forms.Textarea(attrs={'rows':10,'cols':40,'class':'vLargeTextField'}),
widget=forms.Textarea(attrs={'rows':10,'cols':40,'class':'vLargeTextField'}), strip=False,
help_text="This comment about the changes made will be saved in the document history.")
def __init__(self, *args, **kwargs):

View file

@ -90,8 +90,8 @@ def position_label(position_value):
# -------------------------------------------------
class EditPositionForm(forms.Form):
position = forms.ModelChoiceField(queryset=BallotPositionName.objects.all(), widget=forms.RadioSelect, initial="norecord", required=True)
discuss = forms.CharField(required=False, widget=forms.Textarea)
comment = forms.CharField(required=False, widget=forms.Textarea)
discuss = forms.CharField(required=False, widget=forms.Textarea, strip=False)
comment = forms.CharField(required=False, widget=forms.Textarea, strip=False)
def __init__(self, *args, **kwargs):
ballot_type = kwargs.pop("ballot_type")
@ -414,7 +414,7 @@ def undefer_ballot(request, name):
back_url=doc.get_absolute_url()))
class LastCallTextForm(forms.Form):
last_call_text = forms.CharField(widget=forms.Textarea, required=True)
last_call_text = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def clean_last_call_text(self):
lines = self.cleaned_data["last_call_text"].split("\r\n")
@ -500,7 +500,7 @@ def lastcalltext(request, name):
))
class BallotWriteupForm(forms.Form):
ballot_writeup = forms.CharField(widget=forms.Textarea, required=True)
ballot_writeup = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def clean_ballot_writeup(self):
return self.cleaned_data["ballot_writeup"].replace("\r", "")
@ -592,7 +592,7 @@ def ballot_writeupnotes(request, name):
))
class BallotRfcEditorNoteForm(forms.Form):
rfc_editor_note = forms.CharField(widget=forms.Textarea, label="RFC Editor Note", required=True)
rfc_editor_note = forms.CharField(widget=forms.Textarea, label="RFC Editor Note", required=True, strip=False)
def clean_rfc_editor_note(self):
return self.cleaned_data["rfc_editor_note"].replace("\r", "")
@ -643,7 +643,7 @@ def ballot_rfceditornote(request, name):
))
class ApprovalTextForm(forms.Form):
approval_text = forms.CharField(widget=forms.Textarea, required=True)
approval_text = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def clean_approval_text(self):
return self.cleaned_data["approval_text"].replace("\r", "")

View file

@ -37,8 +37,8 @@ from ietf.group.views import fill_in_charter_info
class ChangeStateForm(forms.Form):
charter_state = forms.ModelChoiceField(State.objects.filter(used=True, type="charter"), label="Charter state", empty_label=None, required=False)
initial_time = forms.IntegerField(initial=0, label="Review time", help_text="(in weeks)", required=False)
message = forms.CharField(widget=forms.Textarea, help_text="Leave blank to change state without notifying the Secretariat.", required=False, label=mark_safe("Message to the Secretariat"))
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the charter history.", required=False)
message = forms.CharField(widget=forms.Textarea, help_text="Leave blank to change state without notifying the Secretariat.", required=False, label=mark_safe("Message to the Secretariat"), strip=False)
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the charter history.", required=False, strip=False)
def __init__(self, *args, **kwargs):
self.hide = kwargs.pop('hide', None)
group = kwargs.pop('group')
@ -233,8 +233,8 @@ def change_state(request, name, option=None):
class ChangeTitleForm(forms.Form):
charter_title = forms.CharField(widget=forms.TextInput, label="Charter title", help_text="Enter new charter title.", required=True)
message = forms.CharField(widget=forms.Textarea, help_text="Leave blank to change the title without notifying the Secretariat.", required=False, label=mark_safe("Message to Secretariat"))
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the charter history.", required=False)
message = forms.CharField(widget=forms.Textarea, help_text="Leave blank to change the title without notifying the Secretariat.", required=False, label=mark_safe("Message to Secretariat"), strip=False)
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the charter history.", required=False, strip=False)
def __init__(self, *args, **kwargs):
charter = kwargs.pop('charter')
super(ChangeTitleForm, self).__init__(*args, **kwargs)
@ -335,7 +335,7 @@ def edit_ad(request, name):
class UploadForm(forms.Form):
content = forms.CharField(widget=forms.Textarea, label="Charter text", help_text="Edit the charter text.", required=False)
content = forms.CharField(widget=forms.Textarea, label="Charter text", help_text="Edit the charter text.", required=False, strip=False)
txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False)
def clean_content(self):
@ -454,15 +454,15 @@ def submit(request, name, option=None):
})
class ActionAnnouncementTextForm(forms.Form):
announcement_text = forms.CharField(widget=forms.Textarea, required=True)
announcement_text = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def clean_announcement_text(self):
return self.cleaned_data["announcement_text"].replace("\r", "")
class ReviewAnnouncementTextForm(forms.Form):
announcement_text = forms.CharField(widget=forms.Textarea, required=True)
new_work_text = forms.CharField(widget=forms.Textarea, required=True)
announcement_text = forms.CharField(widget=forms.Textarea, required=True, strip=False)
new_work_text = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def clean_announcement_text(self):
return self.cleaned_data["announcement_text"].replace("\r", "")
@ -612,7 +612,7 @@ def action_announcement_text(request, name):
))
class BallotWriteupForm(forms.Form):
ballot_writeup = forms.CharField(widget=forms.Textarea, required=True)
ballot_writeup = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def clean_ballot_writeup(self):
return self.cleaned_data["ballot_writeup"].replace("\r", "")

View file

@ -24,7 +24,7 @@ from ietf.mailtrigger.utils import gather_address_lists
class ChangeStateForm(forms.Form):
review_state = forms.ModelChoiceField(State.objects.filter(used=True, type="conflrev"), label="Conflict review state", empty_label=None, required=True)
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the review history.", required=False)
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the review history.", required=False, strip=False)
@role_required("Area Director", "Secretariat")
def change_state(request, name, option=None):
@ -126,7 +126,7 @@ def send_conflict_eval_email(request,review):
addrs.cc)
class UploadForm(forms.Form):
content = forms.CharField(widget=forms.Textarea, label="Conflict review response", help_text="Edit the conflict review response.", required=False)
content = forms.CharField(widget=forms.Textarea, label="Conflict review response", help_text="Edit the conflict review response.", required=False, strip=False)
txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False)
def clean_content(self):
@ -277,7 +277,7 @@ def default_approval_text(review):
class AnnouncementForm(forms.Form):
announcement_text = forms.CharField(widget=forms.Textarea, label="IETF Conflict Review Announcement", help_text="Edit the announcement message.", required=True)
announcement_text = forms.CharField(widget=forms.Textarea, label="IETF Conflict Review Announcement", help_text="Edit the announcement message.", required=True, strip=False)
@role_required("Secretariat")
def approve(request, name):

View file

@ -972,7 +972,7 @@ def document_json(request, name, rev=None):
return HttpResponse(json.dumps(data, indent=2), content_type='application/json')
class AddCommentForm(forms.Form):
comment = forms.CharField(required=True, widget=forms.Textarea)
comment = forms.CharField(required=True, widget=forms.Textarea, strip=False)
@role_required('Area Director', 'Secretariat', 'IRTF Chair', 'WG Chair', 'RG Chair', 'WG Secretary', 'RG Secretary', 'IANA', 'RFC Editor')
def add_comment(request, name):

View file

@ -44,7 +44,7 @@ from ietf.mailtrigger.utils import gather_address_lists
class ChangeStateForm(forms.Form):
state = forms.ModelChoiceField(State.objects.filter(used=True, type="draft-iesg"), empty_label=None, required=True)
substate = forms.ModelChoiceField(DocTagName.objects.filter(slug__in=IESG_SUBSTATE_TAGS), required=False)
comment = forms.CharField(widget=forms.Textarea, required=False)
comment = forms.CharField(widget=forms.Textarea, required=False, strip=False)
def clean(self):
retclean = self.cleaned_data
@ -210,7 +210,7 @@ def change_iana_state(request, name, state_type):
class ChangeStreamForm(forms.Form):
stream = forms.ModelChoiceField(StreamName.objects.exclude(slug="legacy"), required=False)
comment = forms.CharField(widget=forms.Textarea, required=False)
comment = forms.CharField(widget=forms.Textarea, required=False, strip=False)
@login_required
def change_stream(request, name):
@ -292,7 +292,7 @@ def doc_ajax_internet_draft(request):
class ReplacesForm(forms.Form):
replaces = SearchableDocAliasesField(required=False)
comment = forms.CharField(widget=forms.Textarea, required=False)
comment = forms.CharField(widget=forms.Textarea, required=False, strip=False)
def __init__(self, *args, **kwargs):
self.doc = kwargs.pop('doc')
@ -344,7 +344,7 @@ class SuggestedReplacesForm(forms.Form):
replaces = forms.ModelMultipleChoiceField(queryset=DocAlias.objects.all(),
label="Suggestions", required=False, widget=forms.CheckboxSelectMultiple,
help_text="Select only the documents that are replaced by this document")
comment = forms.CharField(label="Optional comment", widget=forms.Textarea, required=False)
comment = forms.CharField(label="Optional comment", widget=forms.Textarea, required=False, strip=False)
def __init__(self, suggested, *args, **kwargs):
super(SuggestedReplacesForm, self).__init__(*args, **kwargs)
@ -404,7 +404,7 @@ def review_possibly_replaces(request, name):
class ChangeIntentionForm(forms.Form):
intended_std_level = forms.ModelChoiceField(IntendedStdLevelName.objects.filter(used=True), empty_label="(None)", required=True, label="Intended RFC status")
comment = forms.CharField(widget=forms.Textarea, required=False)
comment = forms.CharField(widget=forms.Textarea, required=False, strip=False)
def change_intention(request, name):
"""Change the intended publication status of a Document of type 'draft' , notifying parties
@ -474,7 +474,7 @@ class EditInfoForm(forms.Form):
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)
create_in_state = forms.ModelChoiceField(State.objects.filter(used=True, type="draft-iesg", slug__in=("pub-req", "watching")), empty_label=None, required=False)
notify = forms.CharField(max_length=255, label="Notice emails", help_text="Separate email addresses with commas.", required=False)
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False)
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False, strip=False)
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()'}))
returning_item = forms.BooleanField(required=False)
@ -812,7 +812,7 @@ def resurrect(request, name):
back_url=doc.get_absolute_url()))
class IESGNoteForm(forms.Form):
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False)
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False, strip=False)
def clean_note(self):
# not munging the database content to use html line breaks --
@ -858,7 +858,7 @@ def edit_iesg_note(request, name):
))
class ShepherdWriteupUploadForm(forms.Form):
content = forms.CharField(widget=forms.Textarea, label="Shepherd writeup", help_text="Edit the shepherd writeup.", required=False)
content = forms.CharField(widget=forms.Textarea, label="Shepherd writeup", help_text="Edit the shepherd writeup.", required=False, strip=False)
txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False)
def clean_content(self):
@ -1116,7 +1116,7 @@ def edit_consensus(request, name):
class PublicationForm(forms.Form):
subject = forms.CharField(max_length=200, required=True)
body = forms.CharField(widget=forms.Textarea, required=True)
body = forms.CharField(widget=forms.Textarea, required=True, strip=False)
def request_publication(request, name):
"""Request publication by RFC Editor for a document which hasn't
@ -1210,7 +1210,7 @@ def request_publication(request, name):
class AdoptDraftForm(forms.Form):
group = forms.ModelChoiceField(queryset=Group.objects.filter(type__in=["wg", "rg"], state="active").order_by("-type", "acronym"), required=True, empty_label=None)
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")
comment = forms.CharField(widget=forms.Textarea, required=False, label="Comment", help_text="Optional comment explaining the reasons for the adoption.")
comment = forms.CharField(widget=forms.Textarea, required=False, label="Comment", help_text="Optional comment explaining the reasons for the adoption.", strip=False)
weeks = forms.IntegerField(required=False, label="Expected weeks in adoption state")
def __init__(self, *args, **kwargs):
@ -1334,7 +1334,7 @@ def adopt_draft(request, name):
class ChangeStreamStateForm(forms.Form):
new_state = forms.ModelChoiceField(queryset=State.objects.filter(used=True), label='State' )
weeks = forms.IntegerField(label='Expected weeks in state',required=False)
comment = forms.CharField(widget=forms.Textarea, required=False, help_text="Optional comment for the document history.")
comment = forms.CharField(widget=forms.Textarea, required=False, help_text="Optional comment for the document history.", strip=False)
tags = forms.ModelMultipleChoiceField(queryset=DocTagName.objects.filter(used=True), widget=forms.CheckboxSelectMultiple, required=False)
def __init__(self, *args, **kwargs):

View file

@ -31,7 +31,7 @@ def choose_material_type(request, acronym):
class UploadMaterialForm(forms.Form):
title = forms.CharField(max_length=Document._meta.get_field("title").max_length)
name = forms.CharField(max_length=Document._meta.get_field("name").max_length)
abstract = forms.CharField(max_length=Document._meta.get_field("abstract").max_length,widget=forms.Textarea)
abstract = forms.CharField(max_length=Document._meta.get_field("abstract").max_length,widget=forms.Textarea, strip=False)
state = forms.ModelChoiceField(State.objects.all(), empty_label=None)
material = forms.FileField(label='File')

View file

@ -284,7 +284,7 @@ def assign_reviewer(request, name, request_id):
})
class RejectReviewerAssignmentForm(forms.Form):
message_to_secretary = forms.CharField(widget=forms.Textarea, required=False, help_text="Optional explanation of rejection, will be emailed to team secretary if filled in")
message_to_secretary = forms.CharField(widget=forms.Textarea, required=False, help_text="Optional explanation of rejection, will be emailed to team secretary if filled in", strip=False)
@login_required
def reject_reviewer_assignment(request, name, request_id):
@ -354,7 +354,7 @@ class CompleteReviewForm(forms.Form):
review_url = forms.URLField(label="Link to message", required=False)
review_file = forms.FileField(label="Text file to upload", required=False)
review_content = forms.CharField(widget=forms.Textarea, required=False)
review_content = forms.CharField(widget=forms.Textarea, required=False, strip=False)
completion_date = DatepickerDateField(date_format="yyyy-mm-dd", picker_settings={ "autoclose": "1" }, initial=datetime.date.today, help_text="Date of announcement of the results of this review")
completion_time = forms.TimeField(widget=forms.HiddenInput, initial=datetime.time.min)
cc = MultiEmailField(required=False, help_text="Email addresses to send to in addition to the review team list")
@ -621,7 +621,7 @@ def search_mail_archive(request, name, request_id):
return JsonResponse(res)
class EditReviewRequestCommentForm(forms.ModelForm):
comment = forms.CharField(widget=forms.Textarea)
comment = forms.CharField(widget=forms.Textarea, strip=False)
class Meta:
fields = ['comment',]
model = ReviewRequest

View file

@ -25,7 +25,7 @@ from ietf.mailtrigger.utils import gather_address_lists
class ChangeStateForm(forms.Form):
new_state = forms.ModelChoiceField(State.objects.filter(type="statchg", used=True), label="Status Change Evaluation State", empty_label=None, required=True)
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the review history.", required=False)
comment = forms.CharField(widget=forms.Textarea, help_text="Optional comment for the review history.", required=False, strip=False)
@role_required("Area Director", "Secretariat")
@ -305,7 +305,7 @@ def default_approval_text(status_change,relateddoc):
from django.forms.formsets import formset_factory
class AnnouncementForm(forms.Form):
announcement_text = forms.CharField(widget=forms.Textarea, label="Status Change Announcement", help_text="Edit the announcement message.", required=True)
announcement_text = forms.CharField(widget=forms.Textarea, label="Status Change Announcement", help_text="Edit the announcement message.", required=True, strip=False)
label = None
def __init__(self, *args, **kwargs):

View file

@ -481,7 +481,7 @@ def group_about_status_meeting(request, acronym, num, group_type=None):
)
class StatusUpdateForm(forms.Form):
content = forms.CharField(widget=forms.Textarea, label='Status update', help_text = 'Edit the status update', required=False)
content = forms.CharField(widget=forms.Textarea, label='Status update', help_text = 'Edit the status update', required=False, strip=False)
txt = forms.FileField(label='.txt format', help_text='Or upload a .txt file', required=False)
def clean_content(self):

View file

@ -394,7 +394,7 @@ def edit(request, group_type=None, acronym=None, action="edit"):
class ConcludeForm(forms.Form):
instructions = forms.CharField(widget=forms.Textarea(attrs={'rows': 30}), required=True)
instructions = forms.CharField(widget=forms.Textarea(attrs={'rows': 30}), required=True, strip=False)
@login_required
def conclude(request, acronym, group_type=None):

View file

@ -340,7 +340,7 @@ class EmailOpenAssignmentsForm(forms.Form):
cc = MultiEmailField(required=False)
reply_to = MultiEmailField(required=False)
subject = forms.CharField()
body = forms.CharField(widget=forms.Textarea)
body = forms.CharField(widget=forms.Textarea, strip=False)
@login_required
def email_open_review_assignments(request, acronym, group_type=None):

View file

@ -46,14 +46,14 @@ class MessageModelChoiceField(forms.ModelChoiceField):
# Forms
# ----------------------------------------------------------------
class AddCommentForm(forms.Form):
comment = forms.CharField(required=True, widget=forms.Textarea)
comment = forms.CharField(required=True, widget=forms.Textarea, strip=False)
private = forms.BooleanField(label="Private comment", required=False,help_text="If this box is checked the comment will not appear in the disclosure's public history view.")
class AddEmailForm(forms.Form):
direction = forms.ChoiceField(choices=(("incoming", "Incoming"), ("outgoing", "Outgoing")),
widget=forms.RadioSelect)
in_reply_to = MessageModelChoiceField(queryset=Message.objects,label="In Reply To",required=False)
message = forms.CharField(required=True, widget=forms.Textarea)
message = forms.CharField(required=True, widget=forms.Textarea, strip=False)
def __init__(self, *args, **kwargs):
self.ipr = kwargs.pop('ipr', None)
@ -107,16 +107,16 @@ class GenericDisclosureForm(forms.Form):
otherwise create a GenericIprDisclosure object."""
compliant = forms.BooleanField(label="This disclosure complies with RFC 3979", required=False)
holder_legal_name = forms.CharField(max_length=255)
notes = forms.CharField(label="Additional notes", max_length=255,widget=forms.Textarea,required=False)
notes = forms.CharField(label="Additional notes", max_length=255,widget=forms.Textarea,required=False, strip=False)
other_designations = forms.CharField(label="Designations for other contributions", max_length=255,required=False)
holder_contact_name = forms.CharField(label="Name", max_length=255)
holder_contact_email = forms.EmailField(label="Email")
holder_contact_info = forms.CharField(label="Other Info (address, phone, etc.)", max_length=255,widget=forms.Textarea,required=False)
holder_contact_info = forms.CharField(label="Other Info (address, phone, etc.)", max_length=255,widget=forms.Textarea,required=False, strip=False)
submitter_name = forms.CharField(max_length=255,required=False)
submitter_email = forms.EmailField(required=False)
patent_info = forms.CharField(max_length=255,widget=forms.Textarea, required=False, help_text="Patent, Serial, Publication, Registration, or Application/File number(s), Date(s) granted or applied for, Country, and any additional notes.")
patent_info = forms.CharField(max_length=255,widget=forms.Textarea, required=False, help_text="Patent, Serial, Publication, Registration, or Application/File number(s), Date(s) granted or applied for, Country, and any additional notes.", strip=False)
has_patent_pending = forms.BooleanField(required=False)
statement = forms.CharField(max_length=255,widget=forms.Textarea,required=False)
statement = forms.CharField(max_length=255,widget=forms.Textarea,required=False, strip=False)
updates = SearchableIprDisclosuresField(required=False, help_text="If this disclosure <strong>updates</strong> other disclosures identify here which ones. Leave this field blank if this disclosure does not update any prior disclosures. <strong>Note</strong>: Updates to IPR disclosures must only be made by authorized representatives of the original submitters. Updates will automatically be forwarded to the current Patent Holder's Contact and to the Submitter of the original IPR disclosure.")
same_as_ii_above = forms.BooleanField(label="Same as in section II above", required=False)
@ -262,7 +262,7 @@ class NonDocSpecificIprDisclosureForm(IprDisclosureFormBase):
class NotifyForm(forms.Form):
type = forms.CharField(widget=forms.HiddenInput)
text = forms.CharField(widget=forms.Textarea)
text = forms.CharField(widget=forms.Textarea, strip=False)
class ThirdPartyIprDisclosureForm(IprDisclosureFormBase):
class Meta:
@ -298,5 +298,5 @@ class SearchForm(forms.Form):
class StateForm(forms.Form):
state = forms.ModelChoiceField(queryset=IprDisclosureStateName.objects,label="New State",empty_label=None)
comment = forms.CharField(required=False, widget=forms.Textarea, help_text="You may add a comment to be included in the disclosure history.")
comment = forms.CharField(required=False, widget=forms.Textarea, help_text="You may add a comment to be included in the disclosure history.", strip=False)
private = forms.BooleanField(label="Private comment", required=False, help_text="If this box is checked the comment will not appear in the disclosure's public history view.")

View file

@ -118,7 +118,7 @@ def validate_emails(value):
# Form Classes
# -------------------------------------------------
class AddCommentForm(forms.Form):
comment = forms.CharField(required=True, widget=forms.Textarea)
comment = forms.CharField(required=True, widget=forms.Textarea, strip=False)
private = forms.BooleanField(label="Private comment", required=False,help_text="If this box is checked the comment will not appear in the statement's public history view.")
class RadioRenderer(RadioFieldRenderer):
@ -210,7 +210,7 @@ class LiaisonModelForm(BetterModelForm):
'''
from_groups = forms.ModelMultipleChoiceField(queryset=Group.objects.all(),label=u'Groups',required=False)
from_contact = forms.EmailField()
to_contacts = forms.CharField(label="Contacts", widget=forms.Textarea(attrs={'rows':'3', }))
to_contacts = forms.CharField(label="Contacts", widget=forms.Textarea(attrs={'rows':'3', }), strip=False)
to_groups = forms.ModelMultipleChoiceField(queryset=Group.objects,label=u'Groups',required=False)
deadline = DatepickerDateField(date_format="yyyy-mm-dd", picker_settings={"autoclose": "1" }, label='Deadline', required=True)
related_to = SearchableLiaisonStatementsField(label=u'Related Liaison Statement', required=False)

View file

@ -139,7 +139,7 @@ class InterimSessionModelForm(forms.ModelForm):
requested_duration = DurationField(required=True)
end_time = forms.TimeField(required=False)
remote_instructions = forms.CharField(max_length=1024, required=True)
agenda = forms.CharField(required=False, widget=forms.Textarea)
agenda = forms.CharField(required=False, widget=forms.Textarea, strip=False)
agenda_note = forms.CharField(max_length=255, required=False)
class Meta:
@ -236,7 +236,7 @@ class InterimAnnounceForm(forms.ModelForm):
class InterimCancelForm(forms.Form):
group = forms.CharField(max_length=255, required=False)
date = forms.DateField(required=False)
comments = forms.CharField(required=False, widget=forms.Textarea(attrs={'placeholder': 'enter optional comments here'}))
comments = forms.CharField(required=False, widget=forms.Textarea(attrs={'placeholder': 'enter optional comments here'}), strip=False)
def __init__(self, *args, **kwargs):
super(InterimCancelForm, self).__init__(*args, **kwargs)

View file

@ -339,7 +339,7 @@ class MergePersonForm(forms.Form):
class NominateForm(forms.ModelForm):
searched_email = SearchableEmailField(only_users=False)
qualifications = forms.CharField(label="Candidate's qualifications for the position",
widget=forms.Textarea())
widget=forms.Textarea(), strip=False)
confirmation = forms.BooleanField(label='Email comments back to me as confirmation.',
help_text="If you want to get a confirmation mail containing your feedback in cleartext, please check the 'email comments back to me as confirmation'.",
required=False)
@ -440,7 +440,7 @@ class NominateForm(forms.ModelForm):
class NominateNewPersonForm(forms.ModelForm):
qualifications = forms.CharField(label="Candidate's qualifications for the position",
widget=forms.Textarea())
widget=forms.Textarea(), strip=False)
confirmation = forms.BooleanField(label='Email comments back to me as confirmation.',
help_text="If you want to get a confirmation mail containing your feedback in cleartext, please check the 'email comments back to me as confirmation'.",
required=False)
@ -551,9 +551,7 @@ class NominateNewPersonForm(forms.ModelForm):
class FeedbackForm(forms.ModelForm):
nominator_email = forms.CharField(label='Commenter email',required=False)
comments = forms.CharField(label='Comments',
widget=forms.Textarea())
comments = forms.CharField(label='Comments', widget=forms.Textarea(), strip=False)
confirmation = forms.BooleanField(label='Email comments back to me as confirmation (if selected, your comments will be emailed to you in cleartext when you press Save).',
required=False)
@ -634,7 +632,7 @@ class FeedbackForm(forms.ModelForm):
class FeedbackEmailForm(forms.Form):
email_text = forms.CharField(label='Email text', widget=forms.Textarea())
email_text = forms.CharField(label='Email text', widget=forms.Textarea(), strip=False)
def __init__(self, *args, **kwargs):
self.nomcom = kwargs.pop('nomcom', None)
@ -646,7 +644,7 @@ class FeedbackEmailForm(forms.Form):
class QuestionnaireForm(forms.ModelForm):
comments = forms.CharField(label='Questionnaire response from this candidate',
widget=forms.Textarea())
widget=forms.Textarea(), strip=False)
def __init__(self, *args, **kwargs):
self.nomcom = kwargs.pop('nomcom', None)
self.user = kwargs.pop('user', None)
@ -676,7 +674,7 @@ class QuestionnaireForm(forms.ModelForm):
fields = ( 'comments', )
class NomComTemplateForm(DBTemplateForm):
content = forms.CharField(label="Text", widget=forms.Textarea(attrs={'cols': '120', 'rows':'40', }))
content = forms.CharField(label="Text", widget=forms.Textarea(attrs={'cols': '120', 'rows':'40', }), strip=False)
class PositionForm(forms.ModelForm):
@ -695,7 +693,7 @@ class PositionForm(forms.ModelForm):
class PrivateKeyForm(forms.Form):
key = forms.CharField(label='Private key', widget=forms.Textarea(), required=False)
key = forms.CharField(label='Private key', widget=forms.Textarea(), required=False, strip=False)
def clean_key(self):
key = self.cleaned_data.get('key', None)
@ -883,5 +881,5 @@ class EditNomineeForm(forms.ModelForm):
fields = ('nominee_email',)
class NominationResponseCommentForm(forms.Form):
comments = forms.CharField(widget=forms.Textarea,required=False,help_text="Any comments provided will be encrytped and will only be visible to the NomCom.")
comments = forms.CharField(widget=forms.Textarea,required=False,help_text="Any comments provided will be encrytped and will only be visible to the NomCom.", strip=False)

View file

@ -145,7 +145,7 @@ class AddAreaModelForm(forms.ModelForm):
# name = forms.CharField(max_length=80,required=True)
# status = forms.IntegerField(widget=forms.Select(choices=STATE_CHOICES),required=True)
# start_date = forms.DateField()
# comments = forms.CharField(widget=forms.Textarea(attrs={'rows':'1'}),required=False)
# comments = forms.CharField(widget=forms.Textarea(attrs={'rows':'1'}),required=False, strip=False)
#
# def clean_acronym(self):
# # get name, strip leading and trailing spaces

View file

@ -214,7 +214,7 @@ class EmailForm(forms.Form):
to = forms.CharField(max_length=255)
cc = forms.CharField(required=False)
subject = forms.CharField(max_length=255)
body = forms.CharField(widget=forms.Textarea())
body = forms.CharField(widget=forms.Textarea(), strip=False)
class ExtendForm(forms.Form):
expiration_date = forms.DateField()

View file

@ -38,7 +38,7 @@ def get_person(name):
# ---------------------------------------------
class DescriptionForm (forms.Form):
description = forms.CharField(widget=forms.Textarea(attrs={'rows':'20'}),required=True)
description = forms.CharField(widget=forms.Textarea(attrs={'rows':'20'}),required=True, strip=False)
class GroupMilestoneForm(forms.ModelForm):
class Meta:

View file

@ -132,5 +132,5 @@ class SessionForm(forms.Form):
return data
class ToolStatusForm(forms.Form):
message = forms.CharField(widget=forms.Textarea(attrs={'rows':'3','cols':'80'}))
message = forms.CharField(widget=forms.Textarea(attrs={'rows':'3','cols':'80'}), strip=False)

View file

@ -376,9 +376,9 @@ class EditSubmissionForm(forms.ModelForm):
rev = forms.CharField(label=u'Revision', max_length=2, required=True)
document_date = forms.DateField(required=True)
pages = forms.IntegerField(required=True)
abstract = forms.CharField(widget=forms.Textarea, required=True)
abstract = forms.CharField(widget=forms.Textarea, required=True, strip=False)
note = forms.CharField(label=mark_safe(u'Comment to the Secretariat'), widget=forms.Textarea, required=False)
note = forms.CharField(label=mark_safe(u'Comment to the Secretariat'), widget=forms.Textarea, required=False, strip=False)
class Meta:
model = Submission
@ -446,7 +446,7 @@ class SubmissionEmailForm(forms.Form):
submission_pk = forms.IntegerField(required=False, widget=forms.HiddenInput())
direction = forms.ChoiceField(choices=(("incoming", "Incoming"), ("outgoing", "Outgoing")),
widget=forms.RadioSelect)
message = forms.CharField(required=True, widget=forms.Textarea,
message = forms.CharField(required=True, widget=forms.Textarea, strip=False,
help_text="Copy the entire message including headers. To do so, view the source, select all, copy then paste into the text area above")
#in_reply_to = MessageModelChoiceField(queryset=Message.objects,label="In Reply To",required=False)