Clean up views and start work on edit name modal.
This commit is contained in:
@@ -5,24 +5,6 @@ from verify_student import views
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(
|
||||
r'^face_upload',
|
||||
views.face_upload,
|
||||
name="verify_student/face_upload"
|
||||
),
|
||||
url(
|
||||
r'^photo_id_upload',
|
||||
views.photo_id_upload,
|
||||
name="verify_student/photo_id_upload"
|
||||
),
|
||||
url(
|
||||
r'^final_verification',
|
||||
views.final_verification,
|
||||
name="verify_student/final_verification"
|
||||
),
|
||||
|
||||
# The above are what we did for the design mockups, but what we're really
|
||||
# looking at now is:
|
||||
url(
|
||||
r'^show_requirements/(?P<course_id>[^/]+/[^/]+/[^/]+)$',
|
||||
views.show_requirements,
|
||||
|
||||
@@ -142,20 +142,9 @@ def show_requirements(request, course_id):
|
||||
"""
|
||||
Show the requirements necessary for
|
||||
"""
|
||||
context = { "course_id": course_id, "is_not_active": not request.user.is_active}
|
||||
context = {"course_id": course_id, "is_not_active": not request.user.is_active}
|
||||
return render_to_response("verify_student/show_requirements.html", context)
|
||||
|
||||
def face_upload(request):
|
||||
context = { "course_id": "edX/Certs101/2013_Test" }
|
||||
return render_to_response("verify_student/face_upload.html", context)
|
||||
|
||||
def photo_id_upload(request):
|
||||
context = { "course_id": "edX/Certs101/2013_Test" }
|
||||
return render_to_response("verify_student/photo_id_upload.html", context)
|
||||
|
||||
def final_verification(request):
|
||||
context = { "course_id": "edX/Certs101/2013_Test" }
|
||||
return render_to_response("verify_student/final_verification.html", context)
|
||||
|
||||
def show_verification_page(request):
|
||||
pass
|
||||
|
||||
@@ -67,6 +67,26 @@ function doSnapshotButton(captureButton, resetButton, approveButton) {
|
||||
approveButton.show();
|
||||
}
|
||||
|
||||
|
||||
function submitNameChange(event) {
|
||||
event.preventDefault();
|
||||
var full_name = $('input[name="name"]').val();
|
||||
var xhr = $.post(
|
||||
"/change_name",
|
||||
{
|
||||
"new_name" : full_name,
|
||||
"rationale": "Want to match ID for ID Verified Certificates."
|
||||
},
|
||||
function(data) {
|
||||
$('#full-name').html(full_name);
|
||||
}
|
||||
)
|
||||
.fail(function(jqXhr,text_status, error_thrown) {
|
||||
$('.message-copy').html(jqXhr.responseText);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function initSnapshotHandler(names, hasHtml5CameraSupport) {
|
||||
var name = names.pop();
|
||||
if (name == undefined) {
|
||||
@@ -187,6 +207,10 @@ $(document).ready(function() {
|
||||
$('body').addClass('step-review').removeClass('step-photos-id')
|
||||
})
|
||||
|
||||
// set up edit information dialog
|
||||
$('#edit-name div[role="alert"]').hide();
|
||||
$('#edit-name .action-save').click(submitNameChange);
|
||||
|
||||
var hasHtml5CameraSupport = initVideoCapture();
|
||||
|
||||
// If HTML5 WebRTC capture is not supported, we initialize jpegcam
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%! from django.utils.translation import ugettext as _ %>
|
||||
${_("Hi {name}").format(name=order.user.first_name)}
|
||||
${_("Hi {name}").format(name=order.user.profile.name)}
|
||||
|
||||
${_("Your payment was successful. You will see the charge below on your next credit or debit card statement. The charge will show up on your statement under the company name {platform_name}. If you have billing questions, please read the FAQ or contact {billing_email}. We hope you enjoy your order.").format(platform_name=settings.PLATFORM_NAME,billing_email=settings.PAYMENT_SUPPORT_EMAIL)}
|
||||
|
||||
|
||||
@@ -12,15 +12,14 @@
|
||||
</div>
|
||||
<p>
|
||||
<label for="name">${_('Full Name')}</label>
|
||||
<input id="name" type="text" name="name" value="" placeholder="${_('example: Jane Doe')}" required aria-required="true" />
|
||||
<input id="name" type="text" name="name" value="" placeholder="${user_full_name}" required aria-required="true" />
|
||||
</p>
|
||||
|
||||
<div class="actions">
|
||||
<button class="action action-primary" type="submit">${_("Save")}</button>
|
||||
<button class="action action-secondary action-cancel">${_("Cancel")}</button>
|
||||
<button class="action action-primary action-save">${_("Save")}</button>
|
||||
</div>
|
||||
</form>
|
||||
<a href="#" data-dismiss="modal" rel="view" class="action action-close action-editname-close">
|
||||
<a href="#" data-dismiss="leanModal" rel="view" class="action action-close action-editname-close">
|
||||
<i class="icon-remove-sign"></i>
|
||||
<span class="label">${_("close")}</span>
|
||||
</a>
|
||||
|
||||
@@ -251,12 +251,12 @@
|
||||
<h4 class="title">${_("Check Your Name")}</h4>
|
||||
|
||||
<div class="copy">
|
||||
<p>${_("Make sure your full name on your edX account ({}) matches your ID. We will also use this as the name on your certificate.").format(user_full_name)}</p>
|
||||
<p>${_("Make sure your full name on your edX account ({full_name}) matches your ID. We will also use this as the name on your certificate.").format(full_name="<span id='full-name'>" + user_full_name + "</span>")}</p>
|
||||
</div>
|
||||
|
||||
<ul class="list-actions">
|
||||
<li class="action action-editname">
|
||||
<a rel="modal" class="edit-name" rel="leanModal" href="#edit-name">${_("Edit your name")}</a>
|
||||
<a class="edit-name" rel="leanModal" href="#edit-name">${_("Edit your name")}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user