Commit 5c178900 by Matt Drayer

Merge pull request #10291 from edx/asadiqbal08/SOL-1312-solution

SOL-1312 changes
parents ab8edc22 0f394656
...@@ -18,7 +18,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce ...@@ -18,7 +18,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
Notification, AjaxHelpers, TemplateHelpers, ViewHelpers, ValidationHelpers, CustomMatchers) { Notification, AjaxHelpers, TemplateHelpers, ViewHelpers, ValidationHelpers, CustomMatchers) {
'use strict'; 'use strict';
var MAX_SIGNATORIES = 4; var MAX_SIGNATORIES = 100;
var SELECTORS = { var SELECTORS = {
detailsView: '.certificate-details', detailsView: '.certificate-details',
editView: '.certificate-edit', editView: '.certificate-edit',
...@@ -198,7 +198,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce ...@@ -198,7 +198,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
expect(this.collection.length).toBe(1); expect(this.collection.length).toBe(1);
}); });
it('user can only add signatories up to max 4', function() { it('user can only add signatories up to max 100', function() {
for(var i = 1; i < MAX_SIGNATORIES ; i++) { for(var i = 1; i < MAX_SIGNATORIES ; i++) {
this.view.$(SELECTORS.addSignatoryButton).click(); this.view.$(SELECTORS.addSignatoryButton).click();
} }
......
...@@ -12,7 +12,10 @@ define([ // jshint ignore:line ...@@ -12,7 +12,10 @@ define([ // jshint ignore:line
function($, _, Backbone, gettext, function($, _, Backbone, gettext,
ListItemEditorView, SignatoryModel, SignatoryEditorView) { ListItemEditorView, SignatoryModel, SignatoryEditorView) {
'use strict'; 'use strict';
var MAX_SIGNATORIES_LIMIT = 4;
// If signatories limit is required to specific value then we can change it.
// However, Setting this limit to 100 that will allow PMs to add as many signatories as they want.
var MAX_SIGNATORIES_LIMIT = 100;
var CertificateEditorView = ListItemEditorView.extend({ var CertificateEditorView = ListItemEditorView.extend({
tagName: 'div', tagName: 'div',
events: { events: {
......
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