Skip to content
Snippets Groups Projects
Commit 31e293a7 authored by Tim Clark's avatar Tim Clark
Browse files

fixed some ajax probems and finished modifying the css that rc started

parent b83d6366
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ function validate(){
}
function processPostcode(){
// lookup postcode
$.getJSON("signup/ajax",{key: "postcode",value: $('input#postcode').val().replace(/ /g,'')}, function(j){
$.getJSON("/signup/ajax",{key: "postcode",value: $('input#postcode').val().replace(/ /g,'')}, function(j){
//populate dropdown
var options = '';
if (j.length > 1) {
......@@ -42,7 +42,7 @@ function processPostcode(){
}
function lookupSID(setname){
$.get("signup/ajax",{key:"sid" ,value: $('input#studentid').val()},function(j){
$.get("/signup/ajax",{key:"sid" ,value: $('input#studentid').val()},function(j){
arr=j.split(":");
key=arr.shift();
val=arr.join(":");
......@@ -68,7 +68,7 @@ function processSID(){
}
function processUsername(){
$.get("signup/ajax",{key: "username", value: $('input#username').val()},function(j){
$.get("/signup/ajax",{key: "username", value: $('input#username').val()},function(j){
if (j!="OK") {
$('div#usernamemessage').attr("style","color:red; float:right; clear:right;");
validation['username']=false;
......@@ -83,7 +83,7 @@ function processUsername(){
}
function processName(type, input){
$.get("signup/ajax",{key: type, value: $('input#'+input).val()},function(j){
$.get("/signup/ajax",{key: type, value: $('input#'+input).val()},function(j){
if (j!="OK") {
$('div#'+input+'message').attr("style","color:red; float:right; clear:right;");
validation[input]=false;
......@@ -101,7 +101,7 @@ function processContact(){
}
function processAddress(){
$.get("signup/ajax",{key: "address", value: $('textarea#address').val()},function(j){
$.get("/signup/ajax",{key: "address", value: $('textarea#address').val()},function(j){
if (j!="OK") {
$('div#addressmessage').attr("style","color:red; float:right; clear:right;");
validation['address']=false;
......@@ -116,7 +116,7 @@ function processAddress(){
}
function processEmail(){
$.get("signup/ajax",{key: "email", value: $('input#email').val()},function(j){
$.get("/signup/ajax",{key: "email", value: $('input#email').val()},function(j){
if (j!="OK") {
$('div#emailmessage').attr("style","color:red; float:right; clear:right;");
validation['email']=false;
......@@ -131,7 +131,7 @@ function processEmail(){
}
function processPhone(){
$.get("signup/ajax",{key: "phone", value: $('input#phone').val()},function(j){
$.get("/signup/ajax",{key: "phone", value: $('input#phone').val()},function(j){
if (j!="OK") {
$('div#phonemessage').attr("style","color:red; float:right; clear:right;");
validation['phone']=false;
......
......@@ -30,18 +30,18 @@
<div class="row" id="studentiddiv">
<label for="studentid">Student Number</label>
<span class="textinput"><input type="text" id="studentid" name="studentid" size="30" {if $mode=='re-form'}value='{$fields.studentid}'{/if} /></span>
<div id="studentidmessage"{if $mode=='re-form'}{if isset($errors.studentid)} style="color:red">{$errors.studentid}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="studentidmessage"{if $mode=='re-form'}{if isset($errors.studentid)} style="color:red; float:right; clear:right;">{$errors.studentid}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
{/if}
<div class="row" id="usernamediv">
<label for="username">Username</label>
<span class="textinput"><input type="text" id="username" name="username" size="30" {if $mode=='re-form'}value='{$fields.username}'{/if}/></span>
<div id="usernamemessage"{if $mode=='re-form'}{if isset($errors.username)} style="color:red">{$errors.username}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="usernamemessage"{if $mode=='re-form'}{if isset($errors.username)} style="color:red; float:right; clear:right;">{$errors.username}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
<div class="row" id="realnamediv">
<label for="realname">{if $usertype!=2}Real Name{else}Society Name{/if}</label>
<span class="textinput"><input type="text" id="realname" name="realname" size="30" {if $mode=='re-form'}value='{$fields.realname}'{/if}/></span>
<div id="realnamemessage"{if $mode=='re-form'}{if isset($errors.realname)} style="color:red">{$errors.realname}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="realnamemessage"{if $mode=='re-form'}{if isset($errors.realname)} style="color:red; float:right; clear:right;">{$errors.realname}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
{if $usertype!=2}
<div class="row" id="postcodediv" style="display:none">
......@@ -56,24 +56,24 @@
<div class="row" id="addressdiv">
<label for="address">{if $usertype==1}Term Time {/if}Address</label>
<span class="textinput"><textarea id="address" name="address" cols="35" rows="4">{if $mode=='re-form'}{$fields.address}{/if}</textarea></span>
<div id="addressmessage"{if $mode=='re-form'}{if isset($errors.address)} style="color:red">{$errors.address}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="addressmessage"{if $mode=='re-form'}{if isset($errors.address)} style="color:red; float:right; clear:right;">{$errors.address}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
{else}
<div class="row" id="contactdiv">
<label for="contact">Contact Name</label>
<span class="textinput"><input type="text" id="contact" name="contact" size="30" {if $mode=='re-form'}value='{$fields.contact}'{/if}/></span>
<div id="contactmessage"{if $mode=='re-form'}{if isset($errors.contact)} style="color:red">{$errors.contact}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="contactmessage"{if $mode=='re-form'}{if isset($errors.contact)} style="color:red; float:right; clear:right;">{$errors.contact}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
{/if}
<div class="row" id="emaildiv">
<label for="email">Email Address</label>
<span class="textinput"><input type="text" id="email" name="email" size="30" {if $mode=='re-form'}value='{$fields.email}'{/if}/></span>
<div id="emailmessage"{if $mode=='re-form'}{if isset($errors.email)} style="color:red">{$errors.email}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="emailmessage"{if $mode=='re-form'}{if isset($errors.email)} style="color:red; float:right; clear:right;">{$errors.email}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
<div class="row" id="phonediv">
<label for="phone">Phone Number</label>
<span class="textinput"><input type="text" id="phone" name="phone" size="30" {if $mode=='re-form'}value='{$fields.phone}'{/if}/></span>
<div id="phonemessage"{if $mode=='re-form'}{if isset($errors.phone)} style="color:red">{$errors.phone}{else} style="color:green">OK{/if}{else}>{/if}</div>
<div id="phonemessage"{if $mode=='re-form'}{if isset($errors.phone)} style="color:red; float:right; clear:right;">{$errors.phone}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
</div>
{if $overridable}
<div class="row" id="overridediv">
......
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