Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions are entered in textarea now #509

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions moderator/moderate/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class QuestionForm(forms.ModelForm):
question = forms.CharField(
validators=[MaxLengthValidator(280), MinLengthValidator(10)],
max_length=280,
widget=forms.TextInput(
widget=forms.Textarea(
attrs={
"placeholder": QUESTION,
"class": "form-control",
Expand Down Expand Up @@ -111,7 +111,7 @@ def clean(self):
msg = "Only members of the NDA group can create NDA events."
raise forms.ValidationError(msg)
# Don't allow non-superusers to modify moderation status or moderators
if not cdata['moderators']:
if not cdata["moderators"]:
msg = "An event should have at least one moderator."
raise forms.ValidationError(msg)

Expand All @@ -127,7 +127,7 @@ class Meta:
"moderators",
"archived",
"users_can_vote",
"event_date"
"event_date",
]
widgets = (
{
Expand Down
4 changes: 4 additions & 0 deletions moderator/moderate/templates/questions.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
{% if q_form.question.errors %}
has-error
{% endif %}" id="question-input">
<label for="{{ q_form.question.id_for_label }}">
Ask your question below.
<a href="https://guides.github.com/features/mastering-markdown/" target="_blank">Markdown supported.</a>
</label>
{{ q_form.question }}
{{ q_form.question.errors }}
</div>
Expand Down
Loading