<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Laurence Sebastian Bowes pushed to branch master at <a href="https://projects.sucs.org/sucssite/sucs-site">sucssite / sucs-site</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/sucssite/sucs-site/commit/a7b59e82da9101980f9c27987bb25051a0208052">a7b59e82</a></strong>
<div>
<span>by Laurence Sebastian Bowes</span>
<i>at 2015-11-09T15:26:14Z</i>
</div>
<pre class='commit-message'>Hopefully kill some JS errors</pre>
</li>
<li>
<strong><a href="https://projects.sucs.org/sucssite/sucs-site/commit/d9387cf93a999eafa2614e0185e262f8c7e6a098">d9387cf9</a></strong>
<div>
<span>by Laurence Sebastian Bowes</span>
<i>at 2015-11-09T15:26:30Z</i>
</div>
<pre class='commit-message'>what
Merge branch 'master' of https://projects.sucs.org/sucssite/sucs-site</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
htdocs/js/signup.js
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://projects.sucs.org/sucssite/sucs-site/compare/ad9d9fb64447a4ad9ed1138927ecd066f6e24e09...d9387cf93a999eafa2614e0185e262f8c7e6a098#diff-0'>
<strong>
htdocs/js/signup.js
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/htdocs/js/signup.js
</span><span style="color: #000000;background-color: #ddffdd">+++ b/htdocs/js/signup.js
</span><span style="color: #aaaaaa">@@ -72,21 +72,21 @@ function lookupSID(setname) {
</span> key = arr.shift();
val = arr.join(":");
if (key == "OK") {
<span style="color: #000000;background-color: #ffdddd">- if (setname = true)
</span><span style="color: #000000;background-color: #ddffdd">+ if (setname === true)
</span> $("input#realname").val(val);
$('div#studentidmessage').attr("style", "color:green; float:right; clear:right;");
$('div#studentidmessage').html(key);
<span style="color: #000000;background-color: #ffdddd">- validation['studentid'] = true;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.studentid = true;
</span> processName("realname", "realname");
}
else {
$('div#studentidmessage').attr("style", "color:red; float:right; clear:right;");
$('div#studentidmessage').html(val);
<span style="color: #000000;background-color: #ffdddd">- validation['email'] = false;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.email = false;
</span> validate();
}
<span style="color: #000000;background-color: #ffdddd">- }, 'text')
</span><span style="color: #000000;background-color: #ddffdd">+ }, 'text');
</span> }
function processSID() {
lookupSID(true);
<span style="color: #aaaaaa">@@ -96,15 +96,15 @@ function processUsername() {
</span> $.get("/signup/ajax", {key: "username", value: $('input#username').val()}, function (j) {
if (j != "OK") {
$('div#usernamemessage').attr("style", "color:red; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['username'] = false;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.username = false;
</span> }
else {
$('div#usernamemessage').attr("style", "color:green; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['username'] = true;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.username = true;
</span> }
$('div#usernamemessage').html(j);
validate();
<span style="color: #000000;background-color: #ffdddd">- }, 'text')
</span><span style="color: #000000;background-color: #ddffdd">+ }, 'text');
</span> }
function processName(type, input) {
<span style="color: #aaaaaa">@@ -119,7 +119,7 @@ function processName(type, input) {
</span> }
$('div#' + input + 'message').html(j);
validate();
<span style="color: #000000;background-color: #ffdddd">- }, 'text')
</span><span style="color: #000000;background-color: #ddffdd">+ }, 'text');
</span> }
function processContact() {
processName('realname', 'contact');
<span style="color: #aaaaaa">@@ -129,45 +129,45 @@ function processAddress() {
</span> $.get("/signup/ajax", {key: "address", value: $('textarea#address').val()}, function (j) {
if (j != "OK") {
$('div#addressmessage').attr("style", "color:red; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['address'] = false;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.address = false;
</span> }
else {
$('div#addressmessage').attr("style", "color:green; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['address'] = true;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.address = true;
</span> }
$('div#addressmessage').html(j);
validate();
<span style="color: #000000;background-color: #ffdddd">- }, 'text')
</span><span style="color: #000000;background-color: #ddffdd">+ }, 'text');
</span> }
function processEmail() {
$.get("/signup/ajax", {key: "email", value: $('input#email').val()}, function (j) {
if (j != "OK") {
$('div#emailmessage').attr("style", "color:red; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['email'] = false;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.email = false;
</span> }
else {
$('div#emailmessage').attr("style", "color:green; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['email'] = true;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.email = true;
</span> }
$('div#emailmessage').html(j);
validate();
<span style="color: #000000;background-color: #ffdddd">- }, 'text')
</span><span style="color: #000000;background-color: #ddffdd">+ }, 'text');
</span> }
function processPhone() {
$.get("/signup/ajax", {key: "phone", value: $('input#phone').val()}, function (j) {
if (j != "OK") {
$('div#phonemessage').attr("style", "color:red; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['phone'] = false;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.phone = false;
</span> }
else {
$('div#phonemessage').attr("style", "color:green; float:right; clear:right;");
<span style="color: #000000;background-color: #ffdddd">- validation['phone'] = true;
</span><span style="color: #000000;background-color: #ddffdd">+ validation.phone = true;
</span> }
$('div#phonemessage').html(j);
validate();
<span style="color: #000000;background-color: #ffdddd">- }, 'text')
</span><span style="color: #000000;background-color: #ddffdd">+ }, 'text');
</span> }
$(function () {
<span style="color: #aaaaaa">@@ -197,25 +197,25 @@ $(function () {
</span> $('div#postcodediv').removeAttr("style");
$('input#submit').attr("disabled", "disabled");
// if the fields are not empty validate them
<span style="color: #000000;background-color: #ffdddd">- if ($('input#username').val() != "") processUsername();
- if ($('input#email').val() != "") processEmail();
- if ($('input#phone').val() != "") processPhone();
- if (usertype != 2) {
- if ($('input#postcode').val() != "") processPostcode();
- if ($('textarea#address').val() != "") processAddress();
- if ($('input#realname').val() != "") processName("realname", "realname");
</span><span style="color: #000000;background-color: #ddffdd">+ if ($('input#username').val() !== "") processUsername();
+ if ($('input#email').val() !== "") processEmail();
+ if ($('input#phone').val() !== "") processPhone();
+ if (usertype !== 2) {
+ if ($('input#postcode').val() !== "") processPostcode();
+ if ($('textarea#address').val() !== "") processAddress();
+ if ($('input#realname').val() !== "") processName("realname", "realname");
</span> }
else {
<span style="color: #000000;background-color: #ffdddd">- if ($('input#contact').val() != "") processContact();
- if ($('input#realname').val() != "") processName("socname", "realname");
</span><span style="color: #000000;background-color: #ddffdd">+ if ($('input#contact').val() !== "") processContact();
+ if ($('input#realname').val() !== "") processName("socname", "realname");
</span> }
<span style="color: #000000;background-color: #ffdddd">- if ((usertype == 1) && ($('input#studentid').val() != "")) {
- if ($('input#realname').val() == "") lookupSID(true);
</span><span style="color: #000000;background-color: #ddffdd">+ if ((usertype == 1) && ($('input#studentid').val() !== "")) {
+ if ($('input#realname').val() === "") lookupSID(true);
</span> else lookupSID(false);
}
validate();
<span style="color: #000000;background-color: #ffdddd">- })
</span><span style="color: #000000;background-color: #ddffdd">+ });
</span> // dont do address stuff for societies
if (usertype != 2) {
// process postcode when the box changes
<span style="color: #aaaaaa">@@ -235,21 +235,21 @@ $(function () {
</span> $("textarea#address").text(strUser);
$('div#addressmessage').attr("style", "color:green; float:right; clear:right;");
$('div#addressmessage').html("OK");
<span style="color: #000000;background-color: #ffdddd">- validation['address'] = true;
- })
</span><span style="color: #000000;background-color: #ddffdd">+ validation.address = true;
+ });
</span> }
//else deal with the contact field
else {
<span style="color: #000000;background-color: #ffdddd">- $("input#contact").change(processContact)
</span><span style="color: #000000;background-color: #ddffdd">+ $("input#contact").change(processContact);
</span>
}
//if is a student
if (usertype == 1) {
//lookup the real name from the studentid
<span style="color: #000000;background-color: #ffdddd">- $("input#studentid").change(processSID)
</span><span style="color: #000000;background-color: #ddffdd">+ $("input#studentid").change(processSID);
</span> }
//validate username
<span style="color: #000000;background-color: #ffdddd">- $("input#username").change(processUsername)
</span><span style="color: #000000;background-color: #ddffdd">+ $("input#username").change(processUsername);
</span> //validate personal and society names differntly
if (usertype != 2) {
persoc = 'realname';
<span style="color: #aaaaaa">@@ -260,7 +260,7 @@ $(function () {
</span> //validate real name
$("input#realname").change(function () {
processName(persoc, 'realname');
<span style="color: #000000;background-color: #ffdddd">- })
</span><span style="color: #000000;background-color: #ddffdd">+ });
</span>
//validate email address
$("input#email").change(processEmail);
<span style="color: #aaaaaa">@@ -280,5 +280,5 @@ $(function () {
</span> }
return valid;
});
<span style="color: #000000;background-color: #ffdddd">-})
</span><span style="color: #000000;background-color: #ddffdd">+});
</span>
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://projects.sucs.org/sucssite/sucs-site/compare/ad9d9fb64447a4ad9ed1138927ecd066f6e24e09...d9387cf93a999eafa2614e0185e262f8c7e6a098">View it on GitLab</a>
<br>
You're receiving this email because of your account on <a href="https://projects.sucs.org/">projects.sucs.org</a>.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":["merge_requests","issues","commit"],"url":"https://projects.sucs.org/sucssite/sucs-site/compare/ad9d9fb64447a4ad9ed1138927ecd066f6e24e09...d9387cf93a999eafa2614e0185e262f8c7e6a098"}}</script>
</p>
</div>
</body>
</html>