Skip to content

Commit

Permalink
Make 'name' field required
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlin1 committed Sep 22, 2016
1 parent c480ca4 commit 6bb81b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class AssignmentTemplateForm(BaseForm):


class EnrollmentForm(BaseForm):
name = StringField('Name', validators=[validators.optional()])
name = StringField('Name', validators=[validators.required()])
email = EmailField('Email',
validators=[validators.required(), validators.email()])
sid = StringField('SID', validators=[validators.optional()])
Expand Down
2 changes: 1 addition & 1 deletion server/templates/staff/course/enrollment/enrollment.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h3 class="box-title">Add/Edit Participant</h3>
<!-- form goes here -->
{% call forms.render_form(form, action_url=url_for('.enrollment', cid=current_course.id), action_text='Enroll',
class_='form') %}
{{ forms.render_field(form.name, label_visible=true, placeholder='Student Name (optional)', type='text') }}
{{ forms.render_field(form.name, label_visible=true, placeholder='Name', type='text') }}
{{ forms.render_field(form.email, label_visible=true, placeholder='test@test.com') }}
{{ forms.render_field(form.sid, label_visible=true, placeholder='1234567', type='text') }}
{{ forms.render_field(form.secondary, label_visible=true, placeholder='cs61a-abc', type='text') }}
Expand Down

0 comments on commit 6bb81b1

Please sign in to comment.