Commit 57a8f840 by Waheed Ahmed Committed by Awais Qureshi

Added studio instance required fields.

ECOM-6093
parent 1913318c
...@@ -18,10 +18,10 @@ class BaseCourseForm(forms.ModelForm): ...@@ -18,10 +18,10 @@ class BaseCourseForm(forms.ModelForm):
field_classes = 'field-input input-text' field_classes = 'field-input input-text'
if isinstance(field, forms.Textarea): if isinstance(field, forms.Textarea):
field_classes = 'field-textarea input-textarea' field_classes = 'field-textarea input-textarea'
if isinstance(field, (forms.BooleanField, forms.ChoiceField,)):
field_classes = 'field-input input-checkbox'
if isinstance(field, (forms.ModelChoiceField, forms.TypedChoiceField,)): if isinstance(field, (forms.ModelChoiceField, forms.TypedChoiceField,)):
field_classes = 'field-input input-select' field_classes = 'field-input input-select'
if isinstance(field, forms.BooleanField):
field_classes = 'field-input input-checkbox'
if isinstance(field, forms.DateTimeField): if isinstance(field, forms.DateTimeField):
field_classes = '{} add-pikaday'.format(field_classes) field_classes = '{} add-pikaday'.format(field_classes)
field.input_formats = ['YYYY-MM-DDTHH:mm:ss'] field.input_formats = ['YYYY-MM-DDTHH:mm:ss']
...@@ -49,13 +49,17 @@ class CustomCourseForm(CourseForm): ...@@ -49,13 +49,17 @@ class CustomCourseForm(CourseForm):
""" Course Form. """ """ Course Form. """
organization = forms.ModelChoiceField( organization = forms.ModelChoiceField(
queryset=Organization.objects.filter(organization_extension__organization_id__isnull=False), queryset=Organization.objects.filter(organization_extension__organization_id__isnull=False),
label=_('Organization Name'),
required=True required=True
) )
title = forms.CharField(label=_('Course Title'), required=True) title = forms.CharField(label=_('Course Title'), required=True)
number = forms.CharField(label=_('Course Number'), required=True) number = forms.CharField(label=_('Course Number'), required=True)
# users will be loaded through AJAX call based on organization # users will be loaded through AJAX call based on organization
team_admin = forms.ModelChoiceField(queryset=User.objects.none(), required=True) team_admin = forms.ModelChoiceField(
queryset=User.objects.none(), required=True,
label=_('Organization Course Admin'),
)
class Meta(CourseForm.Meta): class Meta(CourseForm.Meta):
model = Course model = Course
...@@ -111,11 +115,15 @@ class CourseRunForm(BaseCourseForm): ...@@ -111,11 +115,15 @@ class CourseRunForm(BaseCourseForm):
class CustomCourseRunForm(CourseRunForm): class CustomCourseRunForm(CourseRunForm):
""" Course Run Form. """ """ Course Run Form. """
contacted_partner_manager = forms.BooleanField( contacted_partner_manager = forms.ChoiceField(
widget=forms.RadioSelect(choices=((1, _("Yes")), (0, _("No")))), initial=0, required=False label=_('Contacted PM'),
widget=forms.RadioSelect,
choices=((True, _("Yes")), (False, _("No"))),
required=True
) )
start = forms.DateTimeField(label=_('Course start date'), required=True) start = forms.DateTimeField(label=_('Course start date'), required=True)
end = forms.DateTimeField(label=_('Course end date'), required=False) end = forms.DateTimeField(label=_('Course end date'), required=True)
staff = forms.ModelMultipleChoiceField( staff = forms.ModelMultipleChoiceField(
queryset=Person.objects.all(), widget=forms.SelectMultiple, required=False queryset=Person.objects.all(), widget=forms.SelectMultiple, required=False
) )
...@@ -123,22 +131,20 @@ class CustomCourseRunForm(CourseRunForm): ...@@ -123,22 +131,20 @@ class CustomCourseRunForm(CourseRunForm):
widget=forms.RadioSelect( widget=forms.RadioSelect(
choices=((1, _("Yes")), (0, _("No")))), initial=0, required=False choices=((1, _("Yes")), (0, _("No")))), initial=0, required=False
) )
is_self_paced = forms.BooleanField(label=_('Yes, course will be Self-Paced'), required=False) pacing_type = forms.ChoiceField(
label=_('Pace'),
widget=forms.RadioSelect,
choices=CourseRunPacing.choices,
required=True
)
class Meta(CourseRunForm.Meta): class Meta(CourseRunForm.Meta):
fields = ( fields = (
'length', 'transcript_languages', 'language', 'min_effort', 'max_effort', 'length', 'transcript_languages', 'language', 'min_effort', 'max_effort',
'contacted_partner_manager', 'target_content', 'pacing_type', 'contacted_partner_manager', 'target_content', 'pacing_type', 'video_language',
'video_language', 'staff', 'start', 'end', 'is_self_paced', 'staff', 'start', 'end',
) )
def clean(self):
super(CustomCourseRunForm, self).clean()
self.cleaned_data['pacing_type'] = CourseRunPacing.Self if self.cleaned_data['is_self_paced']\
else CourseRunPacing.Instructor
return self.cleaned_data
def save(self, commit=True, course=None, changed_by=None): # pylint: disable=arguments-differ def save(self, commit=True, course=None, changed_by=None): # pylint: disable=arguments-differ
course_run = super(CustomCourseRunForm, self).save(commit=False) course_run = super(CustomCourseRunForm, self).save(commit=False)
......
...@@ -57,6 +57,7 @@ class CourseRunFactory(factory.DjangoModelFactory): ...@@ -57,6 +57,7 @@ class CourseRunFactory(factory.DjangoModelFactory):
length = FuzzyInteger(1, 10) length = FuzzyInteger(1, 10)
notes = "Testing notes" notes = "Testing notes"
preview_url = FuzzyText(prefix='https://example.com/') preview_url = FuzzyText(prefix='https://example.com/')
contacted_partner_manager = FuzzyChoice((True, False))
class Meta: class Meta:
model = CourseRun model = CourseRun
......
# pylint: disable=no-member # pylint: disable=no-member
import json import json
from datetime import datetime from datetime import datetime, timedelta
import ddt import ddt
import factory import factory
...@@ -55,6 +55,7 @@ class CreateUpdateCourseViewTests(TestCase): ...@@ -55,6 +55,7 @@ class CreateUpdateCourseViewTests(TestCase):
self.site = Site.objects.get(pk=settings.SITE_ID) self.site = Site.objects.get(pk=settings.SITE_ID)
self.client.login(username=self.user.username, password=USER_PASSWORD) self.client.login(username=self.user.username, password=USER_PASSWORD)
self.start_date_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S') self.start_date_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
self.end_date_time = (datetime.now() + timedelta(days=60)).strftime('%Y-%m-%d %H:%M:%S')
# creating default organizations roles # creating default organizations roles
factories.OrganizationUserRoleFactory( factories.OrganizationUserRoleFactory(
...@@ -271,6 +272,18 @@ class CreateUpdateCourseViewTests(TestCase): ...@@ -271,6 +272,18 @@ class CreateUpdateCourseViewTests(TestCase):
response = self.client.post(reverse('publisher:publisher_courses_new'), course_dict, files=data['image']) response = self.client.post(reverse('publisher:publisher_courses_new'), course_dict, files=data['image'])
self.assertEqual(response.status_code, 400) self.assertEqual(response.status_code, 400)
@ddt.data('contacted_partner_manager', 'pacing_type')
def test_create_without_selecting_radio_buttons(self, button_field):
"""
Verify that without selecting pacing type and contacted_partner_manager
course cannot be created.
"""
data = {'number': 'course_1', 'image': ''}
course_dict = self._post_data(data, self.course, self.course_run, self.seat)
course_dict.pop(button_field)
response = self.client.post(reverse('publisher:publisher_courses_new'), course_dict)
self.assertEqual(response.status_code, 400)
def _post_data(self, data, course, course_run, seat): def _post_data(self, data, course, course_run, seat):
course_dict = model_to_dict(course) course_dict = model_to_dict(course)
course_dict.update(**data) course_dict.update(**data)
...@@ -282,6 +295,7 @@ class CreateUpdateCourseViewTests(TestCase): ...@@ -282,6 +295,7 @@ class CreateUpdateCourseViewTests(TestCase):
course_dict.pop('end') course_dict.pop('end')
course_dict.pop('priority') course_dict.pop('priority')
course_dict['start'] = self.start_date_time course_dict['start'] = self.start_date_time
course_dict['end'] = self.end_date_time
course_dict['organization'] = self.organization_extension.organization.id course_dict['organization'] = self.organization_extension.organization.id
if seat: if seat:
course_dict.update(**model_to_dict(seat)) course_dict.update(**model_to_dict(seat))
...@@ -319,7 +333,10 @@ class CreateUpdateCourseViewTests(TestCase): ...@@ -319,7 +333,10 @@ class CreateUpdateCourseViewTests(TestCase):
self.assertEqual(course.course_user_roles.filter(role=PublisherUserRole.CourseTeam).count(), 1) self.assertEqual(course.course_user_roles.filter(role=PublisherUserRole.CourseTeam).count(), 1)
course_run = course.publisher_course_runs.all()[0] course_run = course.publisher_course_runs.all()[0]
self.assertEqual(self.course_run.language, course_run.language) self.assertEqual(self.course_run.language, course_run.language)
self.assertEqual(self.course_run.contacted_partner_manager, course_run.contacted_partner_manager)
self.assertEqual(self.course_run.pacing_type, course_run.pacing_type)
self.assertEqual(course_run.start.strftime("%Y-%m-%d %H:%M:%S"), self.start_date_time) self.assertEqual(course_run.start.strftime("%Y-%m-%d %H:%M:%S"), self.start_date_time)
self.assertEqual(course_run.end.strftime("%Y-%m-%d %H:%M:%S"), self.end_date_time)
seat = course_run.seats.all()[0] seat = course_run.seats.all()[0]
self.assertEqual(seat.type, expected_type) self.assertEqual(seat.type, expected_type)
self.assertEqual(seat.price, expected_price) self.assertEqual(seat.price, expected_price)
...@@ -357,6 +374,7 @@ class CreateUpdateCourseRunViewTests(TestCase): ...@@ -357,6 +374,7 @@ class CreateUpdateCourseRunViewTests(TestCase):
] ]
) )
self.course_run_dict['start'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') self.course_run_dict['start'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
self.course_run_dict['end'] = (datetime.now() + timedelta(days=60)).strftime('%Y-%m-%d %H:%M:%S')
self.site = Site.objects.get(pk=settings.SITE_ID) self.site = Site.objects.get(pk=settings.SITE_ID)
self.client.login(username=self.user.username, password=USER_PASSWORD) self.client.login(username=self.user.username, password=USER_PASSWORD)
......
...@@ -9,7 +9,7 @@ urlpatterns = [ ...@@ -9,7 +9,7 @@ urlpatterns = [
url(r'^$', views.Dashboard.as_view(), name='publisher_dashboard'), url(r'^$', views.Dashboard.as_view(), name='publisher_dashboard'),
url(r'^api/', include('course_discovery.apps.publisher.api.urls', namespace='api')), url(r'^api/', include('course_discovery.apps.publisher.api.urls', namespace='api')),
url(r'^courses/$', views.CourseListView.as_view(), name='publisher_courses'), url(r'^courses/$', views.CourseListView.as_view(), name='publisher_courses'),
url(r'^courses/new$', views.CreateCourseView.as_view(), name='publisher_courses_new'), url(r'^courses/new/$', views.CreateCourseView.as_view(), name='publisher_courses_new'),
url(r'^courses/(?P<pk>\d+)/view/$', views.ReadOnlyView.as_view(), name='publisher_courses_readonly'), url(r'^courses/(?P<pk>\d+)/view/$', views.ReadOnlyView.as_view(), name='publisher_courses_readonly'),
url(r'^courses/(?P<pk>\d+)/edit/$', views.UpdateCourseView.as_view(), name='publisher_courses_edit'), url(r'^courses/(?P<pk>\d+)/edit/$', views.UpdateCourseView.as_view(), name='publisher_courses_edit'),
url( url(
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-29 14:13+0500\n" "POT-Creation-Date: 2016-12-30 14:38+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -438,17 +438,27 @@ msgstr "" ...@@ -438,17 +438,27 @@ msgstr ""
msgid "Studio instance created" msgid "Studio instance created"
msgstr "" msgstr ""
#: apps/publisher/forms.py templates/publisher/add_course_form.html #: apps/publisher/forms.py
#: templates/publisher/add_courserun_form.html msgid "Organization Name"
msgstr ""
#: apps/publisher/forms.py templates/publisher/add_courserun_form.html
msgid "Course Title" msgid "Course Title"
msgstr "" msgstr ""
#: apps/publisher/forms.py templates/publisher/add_course_form.html #: apps/publisher/forms.py templates/publisher/dashboard/_studio_requests.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Course Number" msgid "Course Number"
msgstr "" msgstr ""
#: apps/publisher/forms.py #: apps/publisher/forms.py
msgid "Organization Course Admin"
msgstr ""
#: apps/publisher/forms.py
msgid "Contacted PM"
msgstr ""
#: apps/publisher/forms.py
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
...@@ -465,7 +475,7 @@ msgid "Course end date" ...@@ -465,7 +475,7 @@ msgid "Course end date"
msgstr "" msgstr ""
#: apps/publisher/forms.py #: apps/publisher/forms.py
msgid "Yes, course will be Self-Paced" msgid "Pace"
msgstr "" msgstr ""
#: apps/publisher/forms.py #: apps/publisher/forms.py
...@@ -774,19 +784,26 @@ msgid "Course Form" ...@@ -774,19 +784,26 @@ msgid "Course Form"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/view_course_form.html #: templates/publisher/add_courserun_form.html
msgid "Base information" msgid "Studio instance information"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/view_course_form.html msgid ""
msgid "INSTITUTION INFORMATION" "The information in this section is required to create a course studio "
"instance. You must fill all required information but are welcome to come "
"back and enter the rest of the information when you are ready to announce "
"the course, or you can do it all at once if you are ready to do so."
msgstr ""
#: templates/publisher/add_course_form.html
msgid "CONTACTED PARTNER MANAGER"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
msgid "" msgid ""
"Please choose the school that will be providing the course. Once chosen then" "Contacted a PM about the creation of a new course is important so that edx "
" you can select an administrator for the studio shell." "can help you on marketing efforts."
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
...@@ -796,6 +813,11 @@ msgstr "" ...@@ -796,6 +813,11 @@ msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "COURSE TITLE"
msgstr ""
#: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html
msgid "Best Practices" msgid "Best Practices"
msgstr "" msgstr ""
...@@ -827,34 +849,33 @@ msgid "" ...@@ -827,34 +849,33 @@ msgid ""
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
msgid "English Grammar and Essay Writing Sequence Courses:" #: templates/publisher/add_courserun_form.html
msgid "English Grammar and Essay Writing"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "Introduction to Statistics" msgid "Sequence Courses:"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "Statistics: Inference" msgid "Introduction to Statistics"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "Statistics: Probability" msgid "Statistics: Inference"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
msgid "Priority content" #: templates/publisher/add_courserun_form.html
msgid "Statistics: Probability"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/course_run_detail/_drupal.html #: templates/publisher/add_courserun_form.html
#: templates/publisher/course_run_detail/_salesforce.html msgid "COURSE START DATE"
#: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Start Date"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
...@@ -870,46 +891,50 @@ msgid "" ...@@ -870,46 +891,50 @@ msgid ""
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/course_run_detail/_all.html #: templates/publisher/add_courserun_form.html
#: templates/publisher/course_run_detail/_studio.html msgid "COURSE END DATE"
msgid "Pacing Type"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"Will your course be open to students at the same time as it is announced?" "The date when this self-paced course run will end, replaced by an updated "
"version of the course"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
msgid "" #: templates/publisher/add_courserun_form.html
"Courses split into several modules can be denoted by adding .1, .2, etc. at " msgid "PACING TYPE"
"the end of the course number before the “x”"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"No special html characters, accents, spaces, dashes, or underscores 10 " "Will your course be open to students at the same time as it is announced?"
"character limit"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "About page information" msgid "COURSE NUMBER"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/course_run_detail/_drupal.html msgid ""
#: templates/publisher/course_run_detail/_salesforce.html "Courses split into several modules can be denoted by adding .1, .2, etc. at "
#: templates/publisher/course_run_detail/_studio.html "the end of the course number before the “x”"
msgid "End Date" msgstr ""
#: templates/publisher/add_course_form.html
msgid "No special html characters, accents, spaces, dashes, or underscores"
msgstr ""
#: templates/publisher/add_course_form.html
msgid "10 character limit"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "" msgid "About page information"
"The date when this self-paced course run will end, replaced by an updated "
"version of the course"
msgstr "" msgstr ""
#: templates/publisher/add_course_form.html #: templates/publisher/add_course_form.html
...@@ -1149,10 +1174,6 @@ msgid "" ...@@ -1149,10 +1174,6 @@ msgid ""
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "Studio instance information"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"\n" "\n"
" The information in this section is required to create a course studio instance. You must fill all required information but are welcome to come back and enter the rest of the information when you are ready to announce the course, or you can do it all at once if you are ready to do so.\n" " The information in this section is required to create a course studio instance. You must fill all required information but are welcome to come back and enter the rest of the information when you are ready to announce the course, or you can do it all at once if you are ready to do so.\n"
...@@ -1160,18 +1181,6 @@ msgid "" ...@@ -1160,18 +1181,6 @@ msgid ""
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "COURSE TITLE"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "English Grammar and Essay Writing"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "Sequence Courses:"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "Institution Course Admin" msgid "Institution Course Admin"
msgstr "" msgstr ""
...@@ -1180,10 +1189,6 @@ msgid "Change" ...@@ -1180,10 +1189,6 @@ msgid "Change"
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "COURSE START DATE"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"\n" "\n"
" Start on a weekday (preferably Tuesday, Wednesday, or Thursday) and avoid major U.S. holidays\n" " Start on a weekday (preferably Tuesday, Wednesday, or Thursday) and avoid major U.S. holidays\n"
...@@ -1200,10 +1205,6 @@ msgid "" ...@@ -1200,10 +1205,6 @@ msgid ""
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "COURSE NUMBER"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "" msgid ""
"\n" "\n"
" Courses split into several modules can be denoted by adding .1, .2, etc. at the end of the\n" " Courses split into several modules can be denoted by adding .1, .2, etc. at the end of the\n"
...@@ -1222,10 +1223,6 @@ msgid "etc." ...@@ -1222,10 +1223,6 @@ msgid "etc."
msgstr "" msgstr ""
#: templates/publisher/add_courserun_form.html #: templates/publisher/add_courserun_form.html
msgid "COURSE END DATE"
msgstr ""
#: templates/publisher/add_courserun_form.html
msgid "CERTIFICATE TYPE AND PRICE" msgid "CERTIFICATE TYPE AND PRICE"
msgstr "" msgstr ""
...@@ -1351,6 +1348,11 @@ msgid "Course Length (weeks)" ...@@ -1351,6 +1348,11 @@ msgid "Course Length (weeks)"
msgstr "" msgstr ""
#: templates/publisher/course_run_detail/_all.html #: templates/publisher/course_run_detail/_all.html
#: templates/publisher/course_run_detail/_studio.html
msgid "Pacing Type"
msgstr ""
#: templates/publisher/course_run_detail/_all.html
#: templates/publisher/course_run_detail/_drupal.html #: templates/publisher/course_run_detail/_drupal.html
msgid "Estimated Effort" msgid "Estimated Effort"
msgstr "" msgstr ""
...@@ -1474,6 +1476,19 @@ msgid "XSeries" ...@@ -1474,6 +1476,19 @@ msgid "XSeries"
msgstr "" msgstr ""
#: templates/publisher/course_run_detail/_drupal.html #: templates/publisher/course_run_detail/_drupal.html
#: templates/publisher/course_run_detail/_salesforce.html
#: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Start Date"
msgstr ""
#: templates/publisher/course_run_detail/_drupal.html
#: templates/publisher/course_run_detail/_salesforce.html
#: templates/publisher/course_run_detail/_studio.html
msgid "End Date"
msgstr ""
#: templates/publisher/course_run_detail/_drupal.html
msgid "Self Paced" msgid "Self Paced"
msgstr "" msgstr ""
...@@ -1860,5 +1875,13 @@ msgid "Seat Form" ...@@ -1860,5 +1875,13 @@ msgid "Seat Form"
msgstr "" msgstr ""
#: templates/publisher/view_course_form.html #: templates/publisher/view_course_form.html
msgid "Base information"
msgstr ""
#: templates/publisher/view_course_form.html
msgid "INSTITUTION INFORMATION"
msgstr ""
#: templates/publisher/view_course_form.html
msgid "Course information" msgid "Course information"
msgstr "" msgstr ""
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-29 14:13+0500\n" "POT-Creation-Date: 2016-12-30 14:38+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-29 14:13+0500\n" "POT-Creation-Date: 2016-12-30 14:38+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
......
...@@ -4,10 +4,10 @@ function addDatePicker() { ...@@ -4,10 +4,10 @@ function addDatePicker() {
if (el.getAttribute('datepicker-initialized') !== 'true') { if (el.getAttribute('datepicker-initialized') !== 'true') {
new Pikaday({ new Pikaday({
field: el, field: el,
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD hh:mm:ss',
defaultDate: $(el).val(), defaultDate: $(el).val(),
setDefaultDate: true, setDefaultDate: true,
showTime: false, showTime: true,
use24hour: false, use24hour: false,
autoClose: true autoClose: true
}); });
......
...@@ -398,6 +398,12 @@ $light-gray: rgba(204, 204, 204, 1); ...@@ -398,6 +398,12 @@ $light-gray: rgba(204, 204, 204, 1);
@include margin(0px, 0px, 0px, 0px); @include margin(0px, 0px, 0px, 0px);
box-shadow: none; box-shadow: none;
} }
.input-checkbox{
&.has-error{
border-radius: 100%;
box-shadow: 0px 1px 0px 2px red;
}
}
} }
input, input,
...@@ -448,6 +454,11 @@ select { ...@@ -448,6 +454,11 @@ select {
.field-label { .field-label {
font-weight: bold; font-weight: bold;
} }
.help-text {
p {
margin-bottom: 0;
}
}
.course-tabs{ .course-tabs{
@include float(left); @include float(left);
@include margin-right(10px); @include margin-right(10px);
......
...@@ -124,11 +124,19 @@ ...@@ -124,11 +124,19 @@
</label> </label>
{{ run_form.start }} {{ run_form.start }}
</div> </div>
<div class="col col-6"> </div>
<div>
<div class="field-title">{% trans "PACING TYPE" %}</div>
<div class="row">
<div class="col col-6 help-text">
{% trans "Will your course be open to students at the same time as it is announced?" %} {% trans "Will your course be open to students at the same time as it is announced?" %}
</div> </div>
{{ run_form.is_self_paced }} {{ run_form.is_self_paced.label_tag }} <div class="col col-6">
<label class="field-label">
{{ run_form.pacing_type.label_tag }}
<span class="required">* {% trans "required" %}</span>
</label>
<div class="checkbox-inline">{{ run_form.pacing_type }}</div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment