summaryrefslogtreecommitdiffstats
path: root/hosted
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-07-10 09:47:27 +0200
committerTorsten Grote <grote@kolabsys.com>2012-07-10 09:47:27 +0200
commit5110eac83b18e8110f135ec1e84be7d81089e7ce (patch)
tree4be187eba4a41c4cbe750ea239e69a7fd3686231 /hosted
parentf0baf6fb7391850ac74eda782c914b1167680a23 (diff)
downloadwebadmin-5110eac83b18e8110f135ec1e84be7d81089e7ce.tar.gz
enable availability checking and reorder signup form fields
Diffstat (limited to 'hosted')
-rw-r--r--hosted/js/kolab_hosted.js24
1 files changed, 5 insertions, 19 deletions
diff --git a/hosted/js/kolab_hosted.js b/hosted/js/kolab_hosted.js
index db5bd8e..577aa5c 100644
--- a/hosted/js/kolab_hosted.js
+++ b/hosted/js/kolab_hosted.js
@@ -24,15 +24,15 @@
kadm.check_user_availability = function()
{
// get form data and build new email address
- data = kadm.serialize_form('#signup-form');
- uid = data['uid'] + '@' + data['domain'];
+ var data = kadm.serialize_form('#signup-form');
+ var mail = data['uid'] + '@' + data['domain'];
- if(isValidEmailAddress(uid)) {
+ if(isValidEmailAddress(mail)) {
// update future mail form field
- $('input[name="mail"]').val(uid);
+ $('input[name="mail"]').val(mail);
// check if user with that email address already exists
- kadm.api_post('users.list', {'search': {'mail': {'value': uid} } }, 'check_user_availability_response');
+ kadm.api_post('users.list', {'search': {'mail': {'value': mail} } }, 'check_user_availability_response');
} else {
update_user_info('This will not produce a valid email address!');
}
@@ -60,15 +60,6 @@ kadm.user_signup = function()
}
-function update_ou()
-{
- // update ou string from domain field
- $('input[name="ou"]').val("ou=people,dc=" + $('select[name="domain"]').val().split(".").join(",dc="));
-
- // also update user name availability
- kadm.check_user_availability();
-}
-
function update_user_info(msg)
{
// display message next to form field
@@ -87,11 +78,6 @@ function update_user_info(msg)
} else {
$('input[type="button"]').attr("disabled", "disabled");
}
-
- // update givenname and cn
- // TODO remove when no longer needed
- $('input[name="givenname"]').val($('input[name="uid"]').val());
- $('input[name="cn"]').val($('input[name="uid"]').val());
}
function isValidEmailAddress(emailAddress) {