add id generation and validation

This commit is contained in:
Brian Wilson
2013-01-04 18:45:46 -05:00
parent e32dfcf0a0
commit ea8a56da0a
5 changed files with 161 additions and 86 deletions

View File

@@ -247,7 +247,7 @@
<div class="message message-status is-shown exam-schedule">
<!-- TODO: pull Pearson destination out into a Setting -->
<a href="https://www1.pearsonvue.com/testtaker/signin/SignInPage/EDX" class="exam-button">Schedule Pearson exam</a>
<p class="exam-registration-number"><a href="${testcenter_register_target}" id="exam_register_link">Registration</a> number: <strong>edx00015879548</strong></p>
<p class="exam-registration-number"><a href="${testcenter_register_target}" id="exam_register_link">Registration</a> number: <strong>${registrations[0].client_authorization_id}</strong></p>
<p class="message-copy">Write this down! Youll need it to schedule your exam.</p>
</div>
% endif

View File

@@ -68,17 +68,6 @@
$("label").removeClass("is-focused");
});
$(document).delegate('#testcenter_register_form', 'ajax:success', function(data, json, xhr) {
if(json.success) {
location.href="${reverse('dashboard')}";
} else {
if($('#testcenter_register_error').length == 0) {
$('#testcenter_register_form').prepend('<div id="testcenter_register_error" class="modal-form-error"></div>');
}
$('#testcenter_register_error').text(json.field_errors).stop().css("display", "block");
}
});
})(this)
</script>
</%block>
@@ -262,9 +251,9 @@
</li>
% endif
% else:
<li class="field">
<li data-field="accommodation_request" class="field">
<label for="accommodations">Accommodations Requested</label>
<textarea class="long" id="accommodations" name="accommodations" value="" placeholder=""></textarea>
<textarea class="long" id="accommodations" name="accommodation_request" value="" placeholder=""></textarea>
</li>
% endif
</ol>
@@ -290,7 +279,7 @@
<% regstatus = "Registration approved by Pearson" %>
<div class="message message-status registration-accepted is-shown">
<p class="registration-status"><span class="label">Registration Status: </span><span class="value">${regstatus}</span></p>
<p class="registration-number"><span class="label">Registration number: </span> <span class="value">edx00015879548</span></p>
<p class="registration-number"><span class="label">Registration number: </span> <span class="value">${registration.client_authorization_id}</span></p>
<p class="message-copy">Write this down! Youll need it to schedule your exam.</p>
<a href="https://www1.pearsonvue.com/testtaker/signin/SignInPage/EDX" class="button exam-button">Schedule Pearson exam</a>
</div>