summaryrefslogtreecommitdiffstats
path: root/public_html
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-02-21 13:05:14 +0100
committerAleksander Machniak <alec@alec.pl>2012-02-21 13:05:14 +0100
commit64a5c4f7a510dd7fed443ec3d5a3c4b6898eabf4 (patch)
treebe3878e3a0c5639cbaa472600cdc370a59d98933 /public_html
parent30998a87f6804b900d060fd66d86c53791950858 (diff)
downloadwebadmin-64a5c4f7a510dd7fed443ec3d5a3c4b6898eabf4.tar.gz
Don't hardcode user_type_id
Diffstat (limited to 'public_html')
-rw-r--r--public_html/js/kolab_admin.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index 8be609c..4e49f5e 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -444,10 +444,15 @@ function kolab_admin()
return;
};
+ /*********************************************************/
+ /********* Forms *********/
+ /*********************************************************/
+
this.form_value_change = function(form_id, events)
{
var i, j, data, e, elem, name, elem_name,
- form = $('#'+form_id);
+ form = $('#'+form_id),
+ type_id = $('[name="user_type_id"]', form).val();
this.set_busy(true, 'loading');
@@ -458,7 +463,7 @@ function kolab_admin()
if (!e)
continue;
- data = {user_type_id: 1}; // @TODO: get user account type from the form
+ data = {user_type_id: type_id};
for (j=0; j<e.data.length; j++) {
elem_name = e.data[j];
if (elem = $('[name="'+elem_name+'"]', form))