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
Update CAT create/edit view to support creation and modification of credit courses #299
Conversation
ae47250
to
5d36700
Compare
viewClass = this.courseSeatViewMappings[seatType]; | ||
|
||
if (viewClass && model) { | ||
if (viewClass && seats.length >= 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: > 0 would mean you can reduce the code by 1 character
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
1a3650f
to
21038ff
Compare
/* istanbul ignore next */ | ||
Backbone.Validation.bind(view, { | ||
valid: function (view, attr) { | ||
var $el = view.$('[name=' + attr + ']'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
view.$el.find('[name=' + attr + ']'),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_s.sprintf
will help avoid bugs here.
a0f113d
to
14d8c61
Compare
course: this.course | ||
}); | ||
|
||
row.render(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the rowView already calls this on initialize (https://github.com/edx/ecommerce/blob/renzo/credit-create-edit/ecommerce/static/js/views/course_seat_form_fields/credit_course_seat_form_field_row_view.js#L46)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, missed that. rowView
no longer does that.
00673d2
to
2df855f
Compare
…redit courses XCOM-511
2df855f
to
d7b1f73
Compare
@clintonb or @AlasdairSwan, any further comments? I've addressed everything up to this point. |
👍 |
@AlasdairSwan if you have further comments, let me know and I'll address them with a follow-up PR. |
Update CAT create/edit view to support creation and modification of credit courses
XCOM-511
@clintonb and @AlasdairSwan, this is still a WIP, but I'd appreciate an early look, if you have the time. I'm still trying to get the table validation to work properly, and I still need to write tests.