summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-08-17 14:53:03 -0400
committerAdam Young <ayoung@redhat.com>2010-08-17 14:53:03 -0400
commit7a007d958b502df0aa94f03489db54680bdac655 (patch)
treef8947ebd31461ea97ebf4917866c8c38bea5d066 /install
parent19466d499ba853c51f0e87bbbb1484fdee71509f (diff)
downloadfreeipa-7a007d958b502df0aa94f03489db54680bdac655.tar.gz
freeipa-7a007d958b502df0aa94f03489db54680bdac655.tar.xz
freeipa-7a007d958b502df0aa94f03489db54680bdac655.zip
Fix Update function on details page.
The problem was that parameters with no values are automatically set to None by the framework and it wasn't handled properly in baseldap.py:get_attributes function. Also, there were two logical bugs in details.js: 1) atttribute callback to update values were called for input elements instead of dt elements 2) it was always trying to update the primary key
Diffstat (limited to 'install')
-rw-r--r--install/static/details.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/install/static/details.js b/install/static/details.js
index f9da3f99..d47cfe8b 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -92,16 +92,8 @@ function ipa_details_update(pkey, on_win, on_fail)
return;
var attr = dt.attr('title');
- if (!attr)
- return;
-
- if (attr.indexOf('call_') == 0) {
- var func = window[attr.substr(5)];
- if (!func)
- return;
- func(dt, modlist, IPA_DETAILS_UPDATE);
+ if (!attr || attr.indexOf('call_') == 0)
return;
- }
var param_info = ipa_get_param_info(attr);
if (param_info) {
@@ -118,8 +110,19 @@ function ipa_details_update(pkey, on_win, on_fail)
var jobj = $(this);
var attr = jobj.attr('title');
- if (!attr || attr.indexOf('call_') == 0)
+ if (!attr)
+ return;
+
+ if (attr.indexOf('call_') == 0) {
+ var func = window[attr.substr(5)];
+ if (func)
+ func(jobj, modlist, IPA_DETAILS_UPDATE);
return;
+ }
+
+ var param_info = ipa_get_param_info(attr);
+ if (param_info && param_info['primary_key'])
+ return;
var next = jobj.next('dd');
if ((!next.length) || (!next.children('input').length))