update track selection page, use only min price for course modes

ECOM-1228
This commit is contained in:
zubair-arbi
2015-04-09 13:02:37 +05:00
parent 2c080af646
commit 2c10eeb3aa
13 changed files with 168 additions and 332 deletions

View File

@@ -65,8 +65,9 @@ class CourseModeAdmin(admin.ModelAdmin):
search_fields = ('course_id',)
list_display = (
'id', 'course_id', 'mode_slug', 'mode_display_name', 'min_price',
'suggested_prices', 'currency', 'expiration_date', 'expiration_datetime_custom', 'sku'
'currency', 'expiration_date', 'expiration_datetime_custom', 'sku'
)
exclude = ('suggested_prices',)
def expiration_datetime_custom(self, obj):
"""adding custom column to show the expiry_datetime"""

View File

@@ -553,8 +553,8 @@ class CourseMode(models.Model):
)
def __unicode__(self):
return u"{} : {}, min={}, prices={}".format(
self.course_id.to_deprecated_string(), self.mode_slug, self.min_price, self.suggested_prices
return u"{} : {}, min={}".format(
self.course_id, self.mode_slug, self.min_price
)

View File

@@ -1,32 +0,0 @@
<ul class="list-fields contribution-options">
% for price in suggested_prices:
<li class="field contribution-option">
<input type="radio" name="contribution" value="${price|h}" ${'checked' if price == chosen_price else ''} id="contribution-${price|h}" />
<label for="contribution-${price|h}">
<span class="deco-denomination">$</span>
<span class="label-value">${price}</span>
<span class="denomination-name">${currency}</span>
</label>
</li>
% endfor
<li class="field contribution-option">
<ul class="field-group field-group-other">
<li class="contribution-option contribution-option-other1">
<input type="radio" id="contribution-other" name="contribution" value="" ${'checked' if (chosen_price and chosen_price not in suggested_prices) else ''} />
<label for="contribution-other"><span class="sr">Other</span></label>
</li>
<li class="contribution-option contribution-option-other2">
<label for="contribution-other-amt">
<span class="sr">Other Amount</span>
</label>
<div class="wrapper">
<span class="deco-denomination">$</span>
<input type="text" size="9" name="contribution-other-amt" id="contribution-other-amt" value="${chosen_price if (chosen_price and chosen_price not in suggested_prices) else ''}"/>
<span class="denomination-name">${currency}</span>
</div>
</li>
</ul>
</li>
</ul>

View File

@@ -62,13 +62,9 @@
<div class="container">
<section class="wrapper">
<%include file="/verify_student/_verification_header.html" args="course_name=course_name" />
<div class="wrapper-register-choose wrapper-content-main">
<article class="register-choose content-main">
% if not upgrade:
<h3 class="title">${_("Now choose your course track:")}</h3>
% endif
<%include file="/verify_student/_verification_header.html" args="course_name=course_name" />
<form class="form-register-choose" method="post" name="enrollment_mode_form" id="enrollment_mode_form">
% if "verified" in modes:
@@ -77,39 +73,31 @@
<span class="deco-ribbon"></span>
<h4 class="title">${_("Pursue a Verified Certificate")}</h4>
% if upgrade:
<div class="copy">
<p>${_("Plan to use your completed coursework for job applications, career advancement, or school applications? Upgrade to work toward a Verified Certificate of Achievement to document your accomplishment. A minimum fee applies.")}</p>
</div>
% else:
<div class="copy">
<p>${_("Plan to use your completed coursework for job applications, career advancement, or school applications? Then work toward a Verified Certificate of Achievement to document your accomplishment. A minimum fee applies.")}</p>
</div>
% endif
</div>
<div class="field field-certificate-contribution">
<h5 class="label">${_("Select your contribution for this course (min. $")} ${min_price} <span class="denomination-name">${currency}</span>${_("):")}</h5>
% if error:
<div class="msg msg-error msg-inline">
<div class="copy">
<p><i class="msg-icon icon fa fa-exclamation-triangle"></i> ${error}</p>
<div class="copy">
<p>${_("Highlight you new knowledge and skills with a verified certificate. Use this valuable credential to improve your job prospects and advance your career, or highlight your certificate in school applications.")}</p>
<p>
<div class="wrapper-copy-inline">
<div class="copy-inline">
<h4>
${_("Benefits of a verified Certificate")}
</h4>
<ul>
<li><b>${_("Official")}: </b>${_("Receive an instructor-signed certificate with the institution's logo")}</li>
<li><b>${_("Easily sharable")}: </b>${_("Add the certificate to your CV or resume, or post it directly on LinkedIn")}</li>
<li><b>${_("Motivating")}: </b>${_("Give yourself an additional incentive to complete the course")}</li>
</ul>
</div>
<div class="copy-inline list-actions">
<ul class="list-actions">
<li class="action action-select">
<input type="hidden" name="contribution" value="${min_price}" />
<input type="submit" name="verified_mode" value="${_('Pursue a Verified Certificate')} ($${min_price})" />
</li>
</ul>
</div>
</div>
</div>
% endif
<%include file="_contribution.html" args="suggested_prices=suggested_prices, currency=currency, chosen_price=chosen_price, min_price=min_price"/>
<ul class="list-actions">
<li class="action action-select">
% if upgrade:
<input type="submit" name="verified_mode" value="${_('Upgrade Your Enrollment')}" />
% else:
<input type="submit" name="verified_mode" value="${_('Pursue a Verified Certificate')}" />
% endif
</li>
</ul>
</p>
</div>
</div>
</div>
% endif
@@ -131,7 +119,7 @@
<ul class="list-actions">
<li class="action action-select">
<input type="submit" name="honor_mode" value="${_('Pursue an Honor Code Certificate')}" />
<input type="submit" name="honor_mode" value="${_('Audit This Course')}" />
</li>
</ul>
</div>