summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-12-21 15:14:08 -0500
committerRob Crittenden <rcritten@redhat.com>2010-12-22 12:48:26 -0500
commit82b03ddfc16164a13bf1ffc531255496e8b72e25 (patch)
tree4519b78b6e5eb8f47a4320f7416d3f2b04553da6 /install
parent5747568e5dfd5898c35beb89024df7a7068730e8 (diff)
downloadfreeipa-82b03ddfc16164a13bf1ffc531255496e8b72e25.tar.gz
freeipa-82b03ddfc16164a13bf1ffc531255496e8b72e25.tar.xz
freeipa-82b03ddfc16164a13bf1ffc531255496e8b72e25.zip
hidden filter
The filter field on aci add is hidden, and prefilled with an object class that doesn't exist. Fixed the error where the other fields were removed
Diffstat (limited to 'install')
-rw-r--r--install/static/aci.js25
-rw-r--r--install/static/details.js6
-rwxr-xr-xinstall/static/widget.js4
3 files changed, 30 insertions, 5 deletions
diff --git a/install/static/aci.js b/install/static/aci.js
index f31449f02..43fa8f0f2 100644
--- a/install/static/aci.js
+++ b/install/static/aci.js
@@ -260,6 +260,28 @@ IPA.rights_widget = function(spec){
return that;
}
+IPA.hidden_widget = function(spec){
+ spec.label = '';
+ var that = ipa_widget(spec);
+ that.id = spec.id;
+ var value = spec.value || '';
+ that.create = function(container){
+ $('<input/>',{
+ type:'hidden',
+ 'id':that.id,
+ value: value
+ }).
+ appendTo(container);
+ }
+
+ that.save = function(){
+ return [value];
+ }
+ that.reset = function(){
+
+ }
+ return that;
+}
@@ -600,9 +622,8 @@ function ipa_permission_add_dialog(spec) {
}));
that.add_field(IPA.rights_widget({name:'permissions'}));
- that.add_field(ipa_text_widget({name:'filter'}));
+ that.add_field(IPA.hidden_widget({name:'filter','value':'objectClass=changethisvalue'}));
that.add_dialog_init();
-
};
diff --git a/install/static/details.js b/install/static/details.js
index 1aeffb1df..1e5106929 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -332,12 +332,14 @@ function ipa_details_list_section(spec){
var field = fields[i];
var label = field.label;
-
+ if (label !== ''){
+ label += ':';
+ }
var param_info = ipa_get_param_info(that.entity_name, field.name);
if (param_info && param_info['label']) label = param_info['label'];
$('<dt/>', {
- html: label + ':'
+ html: label
}).appendTo(dl);
var span = $('<span/>', { 'name': field.name }).appendTo(dl);
diff --git a/install/static/widget.js b/install/static/widget.js
index 07973c7ff..4da5df03f 100755
--- a/install/static/widget.js
+++ b/install/static/widget.js
@@ -55,7 +55,9 @@ function ipa_widget(spec) {
function init() {
if (that.entity_name && !that.label){
var param_info = ipa_get_param_info(that.entity_name, spec.name);
- if (param_info) that.label = param_info.label;
+ if ((param_info) && (that.label === undefined)){
+ that.label = param_info.label;
+ }
}
}