summaryrefslogtreecommitdiffstats
path: root/install/static/add.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/static/add.js')
-rw-r--r--install/static/add.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/install/static/add.js b/install/static/add.js
index b5f9c16d4..fbf9031b9 100644
--- a/install/static/add.js
+++ b/install/static/add.js
@@ -31,10 +31,19 @@ function ipa_add_field(spec) {
var that = {};
that.name = spec.name;
that.label = spec.label;
+ that._entity_name = spec.entity_name;
that.init = spec.init;
that.setup = spec.setup;
+ that.__defineGetter__("entity_name", function(){
+ return that._entity_name;
+ });
+
+ that.__defineSetter__("entity_name", function(entity_name){
+ that._entity_name = entity_name;
+ });
+
return that;
}
@@ -45,7 +54,7 @@ function ipa_add_dialog(spec) {
var that = {};
that.name = spec.name;
that.title = spec.title;
- that.entity_name = spec.entity_name;
+ that._entity_name = spec.entity_name;
that.init = spec.init;
@@ -54,6 +63,18 @@ function ipa_add_dialog(spec) {
var dialog = $('<div/>');
+ that.__defineGetter__("entity_name", function(){
+ return that._entity_name;
+ });
+
+ that.__defineSetter__("entity_name", function(entity_name){
+ that._entity_name = entity_name;
+
+ for (var i=0; i<that.fields.length; i++) {
+ that.fields[i].entity_name = entity_name;
+ }
+ });
+
that.get_fields = function() {
return that.fields;
};
@@ -85,6 +106,7 @@ function ipa_add_dialog(spec) {
} else {
dialog.append('<label>' + field.label + '</label>');
dialog.append('<input type="text" name="' + field.name + '" />');
+ dialog.append('<br/>');
}
}