Commit 6b12ec97 by John Eskew

Merge remote-tracking branch 'origin/release' into jeskew/resolve_issues_with_release

parents 684f9017 2b24d3df
...@@ -54,11 +54,6 @@ function(_, str, Backbone, BackboneRelational, gettext) { ...@@ -54,11 +54,6 @@ function(_, str, Backbone, BackboneRelational, gettext) {
} }
} }
if(_.has(attrs, 'organization') && attrs.organization.length > 40) {
errors = _.extend({
'organization': gettext('Signatory organization should not be more than 40 characters long.')
}, errors);
}
if (errors !== null){ if (errors !== null){
return errors; return errors;
} }
......
...@@ -242,10 +242,6 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce ...@@ -242,10 +242,6 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
inputSignatoryTitle: 'This is a certificate signatory title that has waaaaaaay more than 106 characters, in order to cause an exception.' inputSignatoryTitle: 'This is a certificate signatory title that has waaaaaaay more than 106 characters, in order to cause an exception.'
}); });
setValuesToInputs(this.view, {
inputSignatoryOrganization: 'New Signatory Organization longer than 40 characters'
});
this.view.$(SELECTORS.saveCertificateButton).click(); this.view.$(SELECTORS.saveCertificateButton).click();
expect(this.view.$('.certificate-edit-error')).toHaveClass('is-shown'); expect(this.view.$('.certificate-edit-error')).toHaveClass('is-shown');
}); });
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
</div> </div>
<div class="input-wrap field text add-signatory-organization <% if(error && error.organization) { print('error'); } %>"> <div class="input-wrap field text add-signatory-organization <% if(error && error.organization) { print('error'); } %>">
<label for="signatory-organization-<%= signatory_number %>"><%= gettext("Organization ") %></label> <label for="signatory-organization-<%= signatory_number %>"><%= gettext("Organization ") %></label>
<input id="signatory-organization-<%= signatory_number %>" class="collection-name-input input-text signatory-organization-input" name="signatory-organization" type="text" placeholder="<%= gettext("Organization of the signatory") %>" value="<%= organization %>" aria-describedby="signatory-organization-<%= signatory_number %>-tip" maxlength="40" /> <input id="signatory-organization-<%= signatory_number %>" class="collection-name-input input-text signatory-organization-input" name="signatory-organization" type="text" placeholder="<%= gettext("Organization of the signatory") %>" value="<%= organization %>" aria-describedby="signatory-organization-<%= signatory_number %>-tip" />
<span id="signatory-organization-<%= signatory_number %>-tip" class="tip tip-stacked"><%= gettext("The organization that this signatory belongs to, as it should appear on certificates. Maximum 40 characters.") %></span> <span id="signatory-organization-<%= signatory_number %>-tip" class="tip tip-stacked"><%= gettext("The organization that this signatory belongs to, as it should appear on certificates.") %></span>
<% if(error && error.organization) { %> <% if(error && error.organization) { %>
<span class="message-error"><%= error.organization %></span> <span class="message-error"><%= error.organization %></span>
<% } %> <% } %>
......
...@@ -273,7 +273,7 @@ class PayAndVerifyView(View): ...@@ -273,7 +273,7 @@ class PayAndVerifyView(View):
# separate out the payment flow and use the product SKU to figure out what # separate out the payment flow and use the product SKU to figure out what
# the user is trying to purchase. # the user is trying to purchase.
# #
# Nonethless, for the time being we continue to make the really ugly assumption # Nonetheless, for the time being we continue to make the really ugly assumption
# that at some point there was a paid course mode we can query for the price. # that at some point there was a paid course mode we can query for the price.
relevant_course_mode = self._get_paid_mode(course_key) relevant_course_mode = self._get_paid_mode(course_key)
...@@ -509,9 +509,12 @@ class PayAndVerifyView(View): ...@@ -509,9 +509,12 @@ class PayAndVerifyView(View):
# Retrieve all the modes at once to reduce the number of database queries # Retrieve all the modes at once to reduce the number of database queries
all_modes, unexpired_modes = CourseMode.all_and_unexpired_modes_for_courses([course_key]) all_modes, unexpired_modes = CourseMode.all_and_unexpired_modes_for_courses([course_key])
# Retrieve the first unexpired, paid mode, if there is one # Retrieve the first mode that matches the following criteria:
# * Unexpired
# * Price > 0
# * Not credit
for mode in unexpired_modes[course_key]: for mode in unexpired_modes[course_key]:
if mode.min_price > 0: if mode.min_price > 0 and not CourseMode.is_credit_mode(mode):
return mode return mode
# Otherwise, find the first expired mode # Otherwise, find the first expired mode
......
...@@ -131,6 +131,9 @@ if STATIC_URL_BASE: ...@@ -131,6 +131,9 @@ if STATIC_URL_BASE:
if not STATIC_URL.endswith("/"): if not STATIC_URL.endswith("/"):
STATIC_URL += "/" STATIC_URL += "/"
# Enable uglification of JavaScript
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
# DEFAULT_COURSE_ABOUT_IMAGE_URL specifies the default image to show for courses that don't provide one # DEFAULT_COURSE_ABOUT_IMAGE_URL specifies the default image to show for courses that don't provide one
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get('DEFAULT_COURSE_ABOUT_IMAGE_URL', DEFAULT_COURSE_ABOUT_IMAGE_URL) DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get('DEFAULT_COURSE_ABOUT_IMAGE_URL', DEFAULT_COURSE_ABOUT_IMAGE_URL)
......
...@@ -64,6 +64,7 @@ var edx = edx || {}; ...@@ -64,6 +64,7 @@ var edx = edx || {};
providerDiv = this.$el.find("#receipt-provider"); providerDiv = this.$el.find("#receipt-provider");
context.course_key = this.courseKey; context.course_key = this.courseKey;
context.username = this.username; context.username = this.username;
context.platformName = this.$el.data('platform-name');
providerDiv.html(_.template(templateHtml, context)).removeClass('hidden'); providerDiv.html(_.template(templateHtml, context)).removeClass('hidden');
}, },
...@@ -301,7 +302,7 @@ function completeOrder (event) { ...@@ -301,7 +302,7 @@ function completeOrder (event) {
); );
$.ajax({ $.ajax({
url: '/api/credit/v1/provider/' + providerId + '/request/', url: '/api/credit/v1/providers/' + providerId + '/request/',
type: 'POST', type: 'POST',
headers: { headers: {
'X-CSRFToken': $.cookie('csrftoken') 'X-CSRFToken': $.cookie('csrftoken')
......
...@@ -246,42 +246,33 @@ ...@@ -246,42 +246,33 @@
} }
.report-receipt-provider { .report-receipt-provider {
@extend %ui-window; @extend %ui-window;
border-top: 3px solid $credit-color-base; padding: ($baseline*0.75) $baseline;
.provider-wrapper { .provider-wrapper {
width: 70%; width: 70%;
@include float(left); @include float(left);
padding-left: $baseline;
.provider-info { .provider-info {
padding: $baseline $baseline $baseline 0; margin-bottom: $baseline;
font-weight: 600; font-weight: 600;
} }
.provider-more-info {
}
.provider-instructions {
}
} }
.provider-buttons-logos { .provider-buttons-logos {
width: 30%;
@include float(right); @include float(right);
@include text-align(center); @include text-align(center);
.provider-logo { .provider-logo img {
padding: $baseline; width: 100px;
}
.provider-logo image {
width: 100px;
} }
.complete-order { .complete-order {
@include text-align(center); @include text-align(center);
padding: $baseline;
} button {
.complete-order button { @extend %btn-pl-primary-base;
@extend %btn-pl-primary-base; white-space: nowrap;
white-space: nowrap; }
} }
} }
} }
......
<div class="provider-wrapper"> <div class="provider-wrapper">
<div class="provider-info"> <div class="provider-info">
<%= interpolate(gettext("You still need to visit %s to complete the credit process."), [display_name]) %> <%= interpolate(gettext("You still need to visit the %s website to complete the credit process."), [display_name]) %>
</div> </div>
<div class="provider-more-info"> <div class="provider-more-info">
<%= interpolate(gettext("In order to learn credit, %s requires learner to:"), [display_name]) %> <%= interpolate(gettext("To finalize course credit, %s requires %s learners to submit a credit request."), [provider_id.toUpperCase(), platformName]) %>
</div> </div>
<div class="provider-instructions"> <div class="provider-instructions">
<%= fulfillment_instructions %> <%= fulfillment_instructions %>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="provider-buttons-logos"> <div class="provider-buttons-logos">
<div class="provider-logo"> <div class="provider-logo">
<%= interpolate("<img src='%s' alt='%s'></image>", ["", display_name]) %> <%= interpolate("<img src='%s' alt='%s'></image>", [thumbnail_url, display_name]) %>
</div> </div>
<div class="complete-order"> <div class="complete-order">
<%= interpolate('<button data-provider="%s" data-course-key="%s" data-username="%s" class="complete-course" onClick=completeOrder(this)>%s</button>', [provider_id, course_key, username, gettext( "Complete Order")]) %> <%= interpolate('<button data-provider="%s" data-course-key="%s" data-username="%s" class="complete-course" onClick=completeOrder(this)>%s</button>', [provider_id, course_key, username, gettext( "Complete Order")]) %>
......
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