proposals.forms: Link to one consistent Markdown cheat sheet.
I like this one best because it's most brief, visual, and clearly under a free license (CC BY-SA 4.0).
This commit is contained in:
parent
be179e8f64
commit
6531b0e781
1 changed files with 19 additions and 10 deletions
|
@ -3,6 +3,7 @@ from symposion.proposals.forms import ProposalMixIn
|
|||
|
||||
from .models import ConferenceSpeaker, TalkProposal
|
||||
|
||||
_MARKDOWN_CHEATSHEET_URL = 'https://www.markdownguide.org/cheat-sheet'
|
||||
|
||||
class ConferenceSpeakerForm(forms.ModelForm):
|
||||
|
||||
|
@ -21,6 +22,16 @@ class ConferenceSpeakerForm(forms.ModelForm):
|
|||
def __init__(self, *a, **k):
|
||||
super(ConferenceSpeakerForm, self).__init__(*a, **k)
|
||||
self.fields['code_of_conduct'].required = True
|
||||
for field in ('biography', 'experience'):
|
||||
self.fields[field].help_text = self.fields[field].help_text.replace(
|
||||
'http://warpedvisions.org/projects/markdown-cheat-sheet/',
|
||||
_MARKDOWN_CHEATSHEET_URL,
|
||||
).replace(
|
||||
# Fix a typo in Symposion model help text:
|
||||
# <https://github.com/pinax/symposion/blob/8cb001b16946e2d98e8e45b59c2b506e51b52937/symposion/speakers/models.py#L28-L29>
|
||||
"{}target=".format(_MARKDOWN_CHEATSHEET_URL),
|
||||
"{}' target=".format(_MARKDOWN_CHEATSHEET_URL),
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
@ -30,16 +41,14 @@ class ProposalForm(forms.ModelForm, ProposalMixIn):
|
|||
super(ProposalForm, self).__init__(*a, **k)
|
||||
self.description_required()
|
||||
self.abstract_required()
|
||||
self.fields["additional_notes"].help_text = ("Anything else "
|
||||
"you'd like the program committee to know when making their "
|
||||
"selection. This is not made public. "
|
||||
"Edit using "
|
||||
"<a href='http://daringfireball.net/projects/markdown/basics' "
|
||||
"target='_blank'>Markdown</a>.")
|
||||
self.fields["abstract"].help_text = ("Detailed abstract. Will "
|
||||
"be made public if your proposal is accepted. Edit "
|
||||
"using <a href='http://daringfireball.net/projects/markdown/basics' "
|
||||
"target='_blank'>Markdown</a>.")
|
||||
self.fields["additional_notes"].help_text = """
|
||||
Anything else you'd like the program committee to know when making their
|
||||
selection. This is not made public. Edit using
|
||||
<a href='{}' target='_blank'>Markdown</a>.""".format(_MARKDOWN_CHEATSHEET_URL)
|
||||
self.fields["abstract"].help_text = """
|
||||
Detailed abstract. Will be made public if your proposal is accepted.
|
||||
Edit using
|
||||
<a href='{}' target='_blank'>Markdown</a>.""".format(_MARKDOWN_CHEATSHEET_URL)
|
||||
|
||||
for field in ("description", "abstract", "additional_notes"):
|
||||
self.fields[field].help_text += (" Please do not include "
|
||||
|
|
Loading…
Reference in a new issue