summaryrefslogtreecommitdiffstats
path: root/install/ui/add.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-01-28 09:36:25 -0600
committerAdam Young <ayoung@redhat.com>2011-01-28 14:15:43 -0500
commitb96138ba56d33fb3b84d992a731d797c2c8492be (patch)
tree42883d4e5b80c86a99ec016bdb9f340b9f915253 /install/ui/add.js
parent4486341c83a746cb9960cdf8e5da7811a5a5ef7b (diff)
downloadfreeipa-b96138ba56d33fb3b84d992a731d797c2c8492be.tar.gz
freeipa-b96138ba56d33fb3b84d992a731d797c2c8492be.tar.xz
freeipa-b96138ba56d33fb3b84d992a731d797c2c8492be.zip
Fixed delegation UI issues
This patch fixes several issues in delegation UI: When adding a new delegation, only the first attribute selected was saved. Now all attributes will be saved properly. When loading the details page, the custom widgets did not store the original values properly so is_dirty() did not work correctly. Now this has been fixed except for the memberof attribute because of these issues: - https://fedorahosted.org/freeipa/ticket/869 - https://fedorahosted.org/freeipa/ticket/870 When saving the details page, the attrs were saved as an array which was rejected by the server. Now it is stored as comma- separated list.
Diffstat (limited to 'install/ui/add.js')
-rw-r--r--install/ui/add.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/install/ui/add.js b/install/ui/add.js
index 89527ba23..33712b45e 100644
--- a/install/ui/add.js
+++ b/install/ui/add.js
@@ -36,7 +36,8 @@ IPA.add_dialog = function (spec) {
that.init = function() {
that.add_button('Add', function() {
- var record = that.get_record();
+ var record = {};
+ that.save(record);
that.add(
record,
function() {
@@ -51,7 +52,8 @@ IPA.add_dialog = function (spec) {
that.add_button('Add and Add Another', function() {
- var record = that.get_record();
+ var record = {};
+ that.save(record);
that.add(
record,
function() {
@@ -65,7 +67,8 @@ IPA.add_dialog = function (spec) {
});
that.add_button('Add and Edit', function() {
- var record = that.get_record();
+ var record = {};
+ that.save(record);
that.add(
record,
function() {
@@ -113,6 +116,8 @@ IPA.add_dialog = function (spec) {
}
}
+ //alert(JSON.stringify(command.to_json()));
+
command.execute();
};