Skip to content
Snippets Groups Projects
Commit b2117c11 authored by Brian Wilson's avatar Brian Wilson
Browse files

first dialogs

parent f3067cd8
No related branches found
No related tags found
No related merge requests found
......@@ -219,8 +219,9 @@
<h3><a href="${course_target}">${course.number} ${course.title}</a></h3>
</hgroup>
<!-- TODO: need to add logic to select which of the following to display. Like certs? -->
<div class="message message-status is-shown exam-register">
<a href="#" class="exam-button">Register for Pearson exam</a>
<a href="#exam_register" rel="leanModal" class="exam-button" id="exam_register_button">Register for Pearson exam</a>
<p class="message-copy">Registration for the Pearson exam is now open.</p>
</div>
......
<%namespace name='static' file='static_content.html'/>
<%! from django.core.urlresolvers import reverse %>
<%! from django_countries.countries import COUNTRIES %>
<%! from student.models import UserProfile %>
<%! from datetime import date %>
<%! import calendar %>
<section id="testcenter-register-modal" class="modal testcenter-register-modal">
<div class="inner-wrapper">
<div id="register">
<header>
<h2>Sign Up for Pearson VUE Test Center Proctoring</h2>
<hr>
</header>
<form id="test_register_form" class="test_register_form" method="post" data-remote="true" action="/create_test_registration">
<div class="notice"></div>
<div id="register_error" class="modal-form-error" name="register_error"></div>
<div id="register_error" name="register_error"></div>
<!-- we should first start with information that we already know about the user,
though we should also give them the option to fix it.
Some things don't change, once assigned, like client_candidate_id
or candidate_id.
-->
<div class="input-group">
<label data-field="firstname">First Name*</label>
<input name="firstname" type="text" value="${firstname}" placeholder="e.g. Jane">
<label data-field="lastname">Last Name*</label>
<input name="lastname" type="text" value="${lastname}" placeholder="e.g. Smith">
<label data-field="middlename">Middle Name</label>
<input name="middlename" type="text" value="${middlename}" placeholder="e.g. Michael">
<label data-field="suffix">Suffix</label>
<input name="suffix" type="text" value="${suffix}" placeholder="e.g. Jr.">
<label data-field="salutation">Salutation</label>
<input name="salutation" type="text" value="${salutation}" placeholder="e.g. Dr.">
</div>
<div class="input-group">
<label data-field="address1">Address1*</label>
<input name="address1" type="text" value="${address1}" placeholder="123 Main St.">
<label data-field="address2">Address2</label>
<input name="address2" type="text" value="${address2}" placeholder="Apartment 2B.">
<label data-field="address3">Address3</label>
<input name="address3" type="text" value="${address3}" placeholder="Attention: John Smith">
<label data-field="city">City</label>
<input name="city" type="text" value="${city}" placeholder="Our Fair City">
<label data-field="state">State/Province</label>
<input name="state" type="text" value="${state}" placeholder="MA">
<label data-field="postal_code">Postal Code</label>
<input name="postal_code" type="text" value="${postal_code}" placeholder="02138">
<label data-field="country">Country Code*</label>
<input name="country" type="text" value="${country}" placeholder="USA">
</div>
<!-- for now, just leave off the phone and company information -->
<div class="input-group">
<label data-field="phone">Phone*</label>
<input name="phone" type="text" value="${phone}" placeholder="1-23-456-7890">
<label data-field="phone">Extension</label>
<input name="extension" type="text" value="${extension}" placeholder="x123">
<label data-field="phone-country">Phone Country Code*</label>
<input name="phone-country" type="text" value="${phone_country}" placeholder="ABC">
<label data-field="fax">Fax</label>
<input name="fax" type="text" value="${fax}" placeholder="1-23-456-7891">
<label data-field="fax-country">Fax Country Code*</label>
<input name="fax-country" type="text" value="${fax_country}" placeholder="ABC">
<label data-field="company">Company</label>
<input name="company" type="text" value="${company}" placeholder="Acme Corporation">
</div>
<div class="input-group">
<label data-field="accommodations">Accommodations Requested</label>
<textarea name="accommodations"></textarea>
</div>
<div class="submit">
<input name="submit" type="submit" value="Register for Test">
</div>
</form>
</div>
<div class="close-modal">
<div class="inner">
<p>&#10005;</p>
</div>
</div>
</div>
</section>
<script type="text/javascript">
(function() {
$(document).delegate('#test_register_form', 'ajax:success', function(data, json, xhr) {
if(json.success) {
location.href="${reverse('dashboard')}";
} else {
$(".field-error").removeClass('field-error');
$('#register_error').html(json.value).stop().css("display", "block");
$("[data-field='"+json.field+"']").addClass('field-error')
}
});
})(this)
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment