Skip to content

Commit

Permalink
Merge pull request #238 from vipulkanade/gh-pages
Browse files Browse the repository at this point in the history
Resolved error #229 , #244
  • Loading branch information
Andrew Hyder committed Apr 12, 2015
2 parents 0b414b2 + 3957628 commit ab03d6d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ th {
position: relative;
top: -7px;
list-style:disc;
overflow: auto;
}

.plain li {
Expand Down
10 changes: 9 additions & 1 deletion js/BfUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,21 @@ var BfUser = (function (BfUser) {
// Send sign up info to server on signup click.
function _signUpClicked(event){
if (config.debug) console.log("Submitting signup info.")
newUser = {
if ($('#name').val() === "") {
alert("Enter Name");
} else if ($('#email').val() === "") {
alert("Enter Email");
} else if ($('#password').val() === "") {
alert("Enter Password");
} else {
newUser = {
name : $('#name').val(),
email : $('#email').val(),
password : $('#password').val()
}
if (config.debug) console.log(JSON.stringify(newUser));
$.post(config.bfUrl + '/signup', newUser, _signedUp).fail(_badPost);
}
}

// Send sign in info to server on signin click.
Expand Down
9 changes: 9 additions & 0 deletions js/teach.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var teach = (function (teach) {
$("#preview").click(_previewClicked);
$("#save-draft").click(_saveDraft);
$("#submit").click(_submitClicked);
$("#terms").click(_termsChecked);
$(".temp-close-btn").click(_closeClicked);
$("#step-options-btn").click(_optionsClicked);
$('li.progress-button').click(_progressClicked);
Expand Down Expand Up @@ -901,6 +902,14 @@ var teach = (function (teach) {
}
}

function _termsChecked () {
if ($("#terms").prop("checked")) {
$("#alert").addClass("hidden")
} else {
$("#alert").removeClass("hidden").text("You need to agree to the Creative Commons terms.")
};
}

function _submitClicked(){
if ($("#terms").prop("checked")){
if (serviceId) {
Expand Down

0 comments on commit ab03d6d

Please sign in to comment.